From 747bafaf969857b66233a8b4660590bdd712ed7d Mon Sep 17 00:00:00 2001 From: Jian He Date: Thu, 2 Mar 2017 10:58:56 -0800 Subject: [PATCH] MAPREDUCE-6852. Job#updateStatus() failed with NPE due to race condition. Contributed by Junping Du --- .../src/main/java/org/apache/hadoop/mapreduce/Job.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Job.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Job.java index 45c065da5e..84d90deff6 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Job.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Job.java @@ -323,7 +323,7 @@ synchronized void updateStatus() throws IOException { this.status = ugi.doAs(new PrivilegedExceptionAction() { @Override public JobStatus run() throws IOException, InterruptedException { - return cluster.getClient().getJobStatus(status.getJobID()); + return cluster.getClient().getJobStatus(getJobID()); } }); }