简体   繁体   English

MapReduce读取文本文件并将结果写入Excel文件

[英]MapReduce read text files and write results in an excel file

I want to write a MapReduce program in which i can write my output to an excel file. 我想编写一个MapReduce程序,可以在其中将输出写入Excel文件。 Can this be done using hadoop API writer classes or i have to use some other API for this. 可以使用hadoop API writer类来完成此操作,或者我必须为此使用其他一些API。 I don't have a vast knowledge of hadoop so i need your help in doing this 我对hadoop并不了解,所以我需要您的帮助

It is very easy to output to a comma-separated values (CSV) file, which can be opened in Excel: CSV File 输出到逗号分隔值(CSV)文件非常容易,可以在Excel中打开该文件CSV File

If you have an actual need to read/write Excel files, I recommend you look at Apache POI . 如果您确实需要读取/写入Excel文件,建议您查看Apache POI That being said, CSV files are much easier. 话虽如此,CSV文件要容易得多。 You can try using OpenCSV , if that helps; 您可以尝试使用OpenCSV ,如果有帮助的话; although it's easy enough to work with CSV files that you can use Hadoop by itself for that. 尽管使用CSV文件非常容易,但您可以单独使用Hadoop。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM