Reputation: 41
I couldn't find a way out, how I can export Hadoop Mapreduce results back to, e.g. CSV or other file formats.
Does anyone know how to do this? Love to know.
Please note I am referring to the results from Hadoop, e.g. output1/part.00000
Upvotes: 0
Views: 1729
Reputation: 5450
By Default they are actually TSV (tab separated) which you can change by setting
mapred.textoutputformat.separator=","
and then you can download it from HDFS either by hdfs -get command , or using -merge command to get a merged output of all the part-ooo* files in a single local file
hadoop fs -get hdfs://nn.example.com/user/hadoop/file localfile
or
Usage: hadoop fs -getmerge <src> <localdst> [addnl]
Upvotes: 2
Reputation: 900
If you want to change delimiter between your key and value pair file generated out of your java map reduce code you can set :
mapred.textoutputformat.separator to ","
Upvotes: 0