How can i output hadoop result in csv format

后端 未结 1 820
被撕碎了的回忆
被撕碎了的回忆 2021-01-02 04:03

I need to output my hadoop result in .csv format. how will i do this? My code :https://github.com/studhadoop/xml/blob/master/XmlParser11.java

should i simply include

相关标签:
1条回答
  • 2021-01-02 04:41

    You can use TextOutputFormat. The default key/ value separator is a tab character. You can change the separator by setting the property "mapred.textoutputformat.separatorText" in your driver.

    conf.set("mapred.textoutputformat.separatorText", ",");
    
    0 讨论(0)
提交回复
热议问题