xuezhiji
xuezhiji
采纳率0%
2016-05-03 05:56

mapreduce提交作业出现报错信息

我最近采用这种方法提交作业,把mr作业的业务逻辑打包上传至hdfs中,在eclipse中提交任务(不安装hadoop插件),报错Error: java.io.IOException: Unable to initialize any output collector,如果把mr作业的业务逻辑打包上传至hdfs节点上,就可以顺利完成。
这是为什么?
Configuration conf = new Configuration();
conf.set("mapreduce.job.name","count22");
conf.set("mapreduce.job.jar", "hdfs://172.16.200.210:8020/user/root/testjar/hadoopTest.jar");
conf.set("mapreduce.job.output.key.class", "org.apache.hadoop.io.Text");
conf.set("mapreduce.job.output.value.class", "org.apache.hadoop.io.IntWritable");
conf.set("mapred.mapper.class", "hadoop.test$Map");
conf.set("mapred.reducer.class", "hadoop.test$Reduce");
conf.set("mapred.combiner.class", "hadoop.test$Reduce");
conf.set("mapred.input.format.class", "org.apache.hadoop.mapred.TextInputFormat");
conf.set("mapred.output.format.class", "org.apache.hadoop.mapred.TextOutputFormat");
conf.set("mapreduce.input.fileinputformat.inputdir",
"hdfs://172.16.200.210:8020/user/root/input/count.txt");
conf.set("mapreduce.output.fileoutputformat.outputdir",
"hdfs://172.16.200.210:8020/user/root/sc");
JobConf jobconf=new JobConf(conf);
JobClient.runJob(jobconf);

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

相关推荐