如何设置OutputCommitter配置? [英] How to set OutputCommitter config?
本文介绍了如何设置OutputCommitter配置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个使用JobClient提交作业的mapreduce代码。我一直得到这个空指针错误堆栈
I have a mapreduce code that submits job using JobClient . I keep getting this null pointer error stack
12/12/10 12:42:44 INFO mapred.LocalJobRunner: OutputCommitter set in config null
Exception in thread "main" java.lang.NullPointerException
at org.apache.hadoop.mapred.JobClient$NetworkedJob.<init>(JobClient.java:226)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:924)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:844)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1232)
at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:844)
at org.apache.hadoop.mapred.JobClient.submitJob(JobClient.java:818)
at FTPIF.run(FTPIF.java:193)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
at FTPIF.main(FTPIF.java:273)
导致这个错误的那段代码是
The piece of code that gets me this error is
JobClient j = new JobClient();
j.init(conf);
RunningJob check = j.submitJob(conf);
有什么想法?
Any ideas ?
推荐答案
我从来没有想过为什么我打空指针。设置j.setConf(conf)也不起作用。所以我使用 runJob
来代替正在运行的作业。
I never figured out why I hit on the null pointer . Setting j.setConf(conf) also did not work . So I used runJob
instead to get a handle on the running job .
RunningJob job= JobClient.runJob(conf);
这篇关于如何设置OutputCommitter配置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文