hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjs...@apache.org
Subject git commit: HADOOP-11241. Fixed intermittent TestNMSimulator failure due to timing issue. Contributed by Varun Vasudev.
Date Sat, 01 Nov 2014 01:05:33 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.6 5492370a4 -> eb1718b71


HADOOP-11241. Fixed intermittent TestNMSimulator failure due to timing issue. Contributed
by Varun Vasudev.

(cherry picked from commit 260ab6d5f462d0fe1a4312cbba1c098141e3870e)


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

Branch: refs/heads/branch-2.6
Commit: eb1718b71a19c28944766c6c12bcaf9bd1a1bcc3
Parents: 5492370
Author: Zhijie Shen <zjshen@apache.org>
Authored: Fri Oct 31 18:02:39 2014 -0700
Committer: Zhijie Shen <zjshen@apache.org>
Committed: Fri Oct 31 18:05:05 2014 -0700

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt           |  3 +++
 .../hadoop/yarn/sls/nodemanager/TestNMSimulator.java      | 10 ++++++++++
 2 files changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/eb1718b7/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index 827a69a..bb8e2ec 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -665,6 +665,9 @@ Release 2.6.0 - UNRELEASED
     HADOOP-11221. IdentityHashStore assumes System.identityHashCode() is
     non-negative. (Jinghui Wang via szetszwo)
 
+    HADOOP-11241. Fixed intermittent TestNMSimulator failure due to timing issue.
+    (Varun Vasudev via zjshen)
+
 Release 2.5.1 - 2014-09-05
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/eb1718b7/hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/nodemanager/TestNMSimulator.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/nodemanager/TestNMSimulator.java
b/hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/nodemanager/TestNMSimulator.java
index 84be231..2381549 100644
--- a/hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/nodemanager/TestNMSimulator.java
+++ b/hadoop-tools/hadoop-sls/src/test/java/org/apache/hadoop/yarn/sls/nodemanager/TestNMSimulator.java
@@ -54,6 +54,16 @@ public class TestNMSimulator {
     node1.init("rack1/node1", GB * 10, 10, 0, 1000, rm);
     node1.middleStep();
 
+    int numClusterNodes = rm.getResourceScheduler().getNumClusterNodes();
+    int cumulativeSleepTime = 0;
+    int sleepInterval = 100;
+
+    while(numClusterNodes != 1 && cumulativeSleepTime < 5000) {
+      Thread.sleep(sleepInterval);
+      cumulativeSleepTime = cumulativeSleepTime + sleepInterval;
+      numClusterNodes = rm.getResourceScheduler().getNumClusterNodes();
+    }
+
     Assert.assertEquals(1, rm.getResourceScheduler().getNumClusterNodes());
     Assert.assertEquals(GB * 10,
         rm.getResourceScheduler().getRootQueueMetrics().getAvailableMB());


Mime
View raw message