[ https://issues.apache.org/jira/browse/PIG-4967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15427814#comment-15427814 ]
Xiang Li commented on PIG-4967: ------------------------------- [~daijy] I uploaded the very first patch 1. It is almost to clone ControlledJob.toString() and then add try and catch to handle NPE. 2. The patch applies to branch-0.15, branch-0.16 and trunk. 3. PigJobControl for hadoop20 (shims/src/hadoop20/org/apache/pig/backend/hadoop20/PigJobControl.java) does not have the same issue 4. PigJobControl originally has indent=2 spaces. I am trying to see if I can add UT for this fix, but currently, I have no idea how to simulate the condition of status=null. Keep studying. Would you please review the patch at your earliest convenience? Thanks for your patience and guidance. > NPE in PigJobControl.run() when job status is null > -------------------------------------------------- > > Key: PIG-4967 > URL: https://issues.apache.org/jira/browse/PIG-4967 > Project: Pig > Issue Type: Bug > Reporter: Xiang Li > Assignee: Xiang Li > Priority: Critical > Attachments: PIG-4967-0.patch > > > {code} > [JobControl] ERROR org.apache.pig.backend.hadoop23.PigJobControl - Error > while trying to run jobs. > java.lang.NullPointerException > at org.apache.hadoop.mapreduce.Job.getJobName(Job.java:426) > at > org.apache.hadoop.mapreduce.lib.jobcontrol.ControlledJob.toString(ControlledJob.java:93) > at java.lang.String.valueOf(String.java:2982) > at java.lang.StringBuilder.append(StringBuilder.java:131) > at > org.apache.pig.backend.hadoop23.PigJobControl.run(PigJobControl.java:182) > at java.lang.Thread.run(Thread.java:745) > at > org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher$1.run(MapReduceLauncher.java:276) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)