输入参数和方法参数不匹配的问题(未正确导包)

  • 报错截图

The method setOutputFormatClass in the type Job is not applicable for the arguments

  • 简单问题:
    基本上就是导入包错误导致
    此包导入错误是因为代码自动提示时未显示想要的包,导成了其他包,编写代码时要注意导入包是否准确 !

  • 错误导入
    The method setOutputFormatClass in the type Job is not applicable for the arguments

  • 正确导入
    The method setOutputFormatClass in the type Job is not applicable for the arguments

  • 包对比
    import org.apache.hadoop.mapred.SequenceFileOutputFormat;
    import org.apache.hadoop.mapreduce.lib.output.SequenceFileOutputFormat;

相关文章:

相似解决方案