hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xg...@apache.org
Subject hadoop git commit: YARN-4313. Race condition in MiniMRYarnCluster when getting history server address. Contributed by Jian He
Date Fri, 30 Oct 2015 00:38:26 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.7 3287a50cf -> ceefabc44


YARN-4313. Race condition in MiniMRYarnCluster when getting history
server address. Contributed by Jian He

(cherry picked from commit 7412ff48eeb967c972c19c1370c77a41c5b3b81f)
(cherry picked from commit b505bf9e582f5bca59be28296a4b4a640b3389eb)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/ceefabc4
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/ceefabc4
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/ceefabc4

Branch: refs/heads/branch-2.7
Commit: ceefabc44a76821f2efc1cc971969bc8952bc537
Parents: 3287a50
Author: Xuan <xgong@apache.org>
Authored: Thu Oct 29 17:36:36 2015 -0700
Committer: Xuan <xgong@apache.org>
Committed: Thu Oct 29 17:38:09 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/mapreduce/v2/MiniMRYarnCluster.java  | 5 ++++-
 hadoop-yarn-project/CHANGES.txt                                 | 3 +++
 2 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/ceefabc4/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/MiniMRYarnCluster.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/MiniMRYarnCluster.java
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/MiniMRYarnCluster.java
index 47b38a1..207d0f6 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/MiniMRYarnCluster.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/mapreduce/v2/MiniMRYarnCluster.java
@@ -190,6 +190,7 @@ public class MiniMRYarnCluster extends MiniYARNCluster {
     public JobHistoryServerWrapper() {
       super(JobHistoryServerWrapper.class.getName());
     }
+    private volatile boolean jhsStarted = false;
 
     @Override
     public synchronized void serviceStart() throws Exception {
@@ -211,9 +212,11 @@ public class MiniMRYarnCluster extends MiniYARNCluster {
         new Thread() {
           public void run() {
             historyServer.start();
+            jhsStarted = true;
           };
         }.start();
-        while (historyServer.getServiceState() == STATE.INITED) {
+
+        while (!jhsStarted) {
           LOG.info("Waiting for HistoryServer to start...");
           Thread.sleep(1500);
         }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/ceefabc4/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 94bdf7b..232bf95 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -100,6 +100,9 @@ Release 2.7.2 - UNRELEASED
     YARN-4183. Enabling generic application history forces every job to get a
     timeline service delegation token (Mit Desai via jeagles)
 
+    YARN-4313. Race condition in MiniMRYarnCluster when getting history server
+    address. (Jian He via xgong)
+
 Release 2.7.1 - 2015-07-06
 
   INCOMPATIBLE CHANGES


Mime
View raw message