Hi,
    When I tried to run the demo of Rowcounter.java, which is a demo 
of mapreduce, the console printed something beblow.


20/03/24 14:19:29 INFO mapreduce.JobSubmitter: number of splits:1

20/03/24 14:19:31 INFO mapreduce.JobSubmitter: Submitting tokens for job: 
job_1585019845649_0001

20/03/24 14:19:31 INFO mapreduce.JobSubmitter: java.lang.NullPointerException

20/03/24 14:19:34 INFO mapreduce.JobSubmitter: Cleaning up the staging area 
/tmp/hadoop-yarn/staging/root/.staging/job_1585019845649_0001

Exception in thread "main" java.lang.NullPointerException

        at 
org.apache.hadoop.security.token.Token.write(Token.java:221)

        at 
org.apache.hadoop.security.Credentials.write(Credentials.java:252)

        at 
org.apache.hadoop.security.Credentials.writeTokenStorageToStream(Credentials.java:230)

        at 
org.apache.hadoop.mapred.YARNRunner.createApplicationSubmissionContext(YARNRunner.java:397)

        at 
org.apache.hadoop.mapred.YARNRunner.submitJob(YARNRunner.java:296)

        at 
org.apache.hadoop.mapreduce.JobSubmitter.submitJobInternal(JobSubmitter.java:240)

        at 
org.apache.hadoop.mapreduce.Job$10.run(Job.java:1290)

        at 
org.apache.hadoop.mapreduce.Job$10.run(Job.java:1287)

        at 
java.security.AccessController.doPrivileged(Native Method)

        at 
javax.security.auth.Subject.doAs(Subject.java:422)

        at 
org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1746)

        at 
org.apache.hadoop.mapreduce.Job.submit(Job.java:1287)

        at 
org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:1308)

        at com.tools.mr.RowCounter.run(RowCounter.java:129)

        at 
org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)

        at 
org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)

        at com.tools.mr.RowCounter.main(RowCounter.java:173)

        at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:498)

        at 
org.apache.hadoop.util.RunJar.run(RunJar.java:221)

        at 
org.apache.hadoop.util.RunJar.main(RunJar.java:136)



    Information about my development environment, Jkd 1.7, Haoop 
2.7.4, Kudu 1.5.
    There is configuration about authentication of the kudu cluster.
    The demo could run by using cmd like 'java -jar xxx.jar'. But 
when I submitted it to the Hadoop cluster by using 'hadoop jar', the 
application's log show "java.lang.NullPointerException", and the application 
ended.
    Any tips about how to solve the null point exception when running 
the demo at Hadoop cluster?



   Best Regards, zhu si cheng.

Reply via email to