我正在尝试使用以下命令将作业的OutputFormat设置为MapFileOutputFormat:
jobConf.setOutputFormat(MapFileOutputFormat.class);我得到这个错误: mapred.output.format.class与新的reduce API模式不兼容。
我想我应该使用新作业类的set setOutputFormatClass(),但问题是当我尝试这样做时:
job.setOutputFormatClass(MapFileOutputFormat.class);它希望我使用这个类:org.apache.hadoop.mapreduce.lib.output.MapFileOutputFormat。在Hadoop1.0.x中没有这样的类。它只存在于早期版本中(例如0.x)
我该如何解决这个问题?
谢谢!
发布于 2012-09-16 02:47:15
这个问题没有非常容易实现的解决方案。
我放弃了,也使用了符合我要求的序列文件。
发布于 2014-03-13 09:29:32
你有没有尝试过下面的方法?
import org.apache.hadoop.mapreduce.lib.output;
...
LazyOutputFormat.setOutputFormatClass(job, MapFileOutputFormat.class);https://stackoverflow.com/questions/11626328
复制相似问题