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:37:01 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk e5b1733e0 -> 7412ff48e


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


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

Branch: refs/heads/trunk
Commit: 7412ff48eeb967c972c19c1370c77a41c5b3b81f
Parents: e5b1733
Author: Xuan <xgong@apache.org>
Authored: Thu Oct 29 17:36:36 2015 -0700
Committer: Xuan <xgong@apache.org>
Committed: Thu Oct 29 17:36:36 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/7412ff48/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 1dd6fca..3521834 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/7412ff48/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 0da15bd..d0fa27d 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -1144,6 +1144,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