diff --git shims/src/hadoop23/org/apache/pig/backend/hadoop23/PigJobControl.java shims/src/hadoop23/org/apache/pig/backend/hadoop23/PigJobControl.java index 6b03b50..87a1ad2 100644 --- shims/src/hadoop23/org/apache/pig/backend/hadoop23/PigJobControl.java +++ shims/src/hadoop23/org/apache/pig/backend/hadoop23/PigJobControl.java @@ -179,7 +179,19 @@ public class PigJobControl extends JobControl { } while(it.hasNext()) { ControlledJob j = it.next(); - log.debug("Checking state of job "+j); + + // TODO: Need to re-visit the following try...catch + // when Pig picks up a Hadoop release with MAPREDUCE-6762 applied + // as its dependency. + // Because MAPREDUCE-6762 fixes PIG-4967 from Hadoop side. + try { + log.debug("Checking state of job " + j); + } catch(NullPointerException npe) { + log.warn("Failed to get job name " + + "when checking state of job. " + + "Check if job status is null.", npe); + } + switch(checkState(j)) { case SUCCESS: getJobs(successfulJobs).add(j);