lazyoutputformat(hadoop api 2.x)中出现错误

slsn1g29  于 2021-05-30  发布在  Hadoop
关注(0)|答案(1)|浏览(353)

对于配置中的多次输出,我使用lazyoutput,但它会产生错误。我已经检查了一些其他的例子懒人输出,他们正在工作,它不工作,在我想要的程序。

LazyOutputFormat.setOutputFormatClass(job, TextOutputFormat.class);

错误是

The method setOutputFormatClass(Job, Class<? extends OutputFormat>) in the  
type LazyOutputFormat is  not applicable for the arguments (Job, Class<TextOutputFormat>)

虽然和这里一样https://hadoop.apache.org/docs/current/api/org/apache/hadoop/mapreduce/lib/output/multipleoutputs.html

nxagd54h

nxagd54h1#

这个 OutputFormat 作为第二个参数提供给 LazyOutputFormat.setOutputFormatClass() 必须与实际相同 OutputFormat 你的工作。我猜你没有用 TextOutputFormat ?

相关问题