我有一个使用 JobClient 提交作业的 mapreduce 代码。我不断收到这个空指针错误堆栈
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)
让我遇到这个错误的代码是
JobClient j = new JobClient();
j.init(conf);
RunningJob check = j.submitJob(conf);
有任何想法吗 ?