阅读背景:

Hadoop开发常用的InputFormat和OutputFormat

来源:互联网 

在用hadoop的streaming读数据时,如果输入是sequence file,如果用“-inputformat org.apache.hadoop.mapred.SequenceFileInputFormat”配置读的话,读入的数据显示的话为乱码,其实是因为读入的还是sequence file格式的,包括sequencefile的头信息在内.改为“inputformat org.apache.hadoop.mapred.SequenceFileAsTextInputFormat”即可正常读取。在用hadoop的streaming读数据时,如果输入是sequence file,如果用“-




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: