example assumed that hdfs will write flat files.