hadoop - 修复-运行hadoop作业时警告 “Use GenericOptionsParser for parsing the arguments”?

标签 hadoop

当我提交Hadoop工作时,总是说
WARN [JobClient] Use GenericOptionsParser for parsing the arguments. Applications should implement Tool for the same
我怎样才能解决这个问题?
我正在使用CDH 4.6.0。

最佳答案

您应该使用下面的驱动程序代码之类的内容来启动MapReduce作业以摆脱警告(尽管它没有任何危害):

public class MyClass extends Configured implements Tool {
   public int run(String [] args) throws IOException {
     JobConf conf = new JobConf(getConf(), MyClass.class);
     // run the job here.
     return 0;
   }

   public static void main(String [] args) throws Exception {
      int status = ToolRunner.run(new MyClass(), args); // calls your run() method.
      System.exit(status);
   }
}

关于hadoop - 修复-运行hadoop作业时警告 “Use GenericOptionsParser for parsing the arguments”?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27957723/

相关文章:

database - 执行查询时,hive 是否运行 hadoop?

hadoop - 在hadoop 2环境中输入简单脚本时出现Pig错误

hadoop - 在 Oozie 中动态创建 fork

hadoop - Windows Install hadoop无法格式化

json - Hive Metastore 列宽限制

shell - 将配置单元查询输出写入HDFS文件

hadoop - 在HDFS上载期间可以读取数据吗?

scala - 从自定义数据格式创建 spark 数据框

hadoop - spark-ml 朴素贝叶斯保存到 hdfs

mysql - 如何在数据集中生成值