converted dictionary writer to run on hdfs