hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject hadoop git commit: YARN-7294. TestSignalContainer#testSignalRequestDeliveryToNM fails intermittently with Fair Scheduler. (Contributed by Miklos Szegedi)
Date Thu, 19 Oct 2017 23:41:54 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 2e3b7130c -> 3828b33b8


YARN-7294. TestSignalContainer#testSignalRequestDeliveryToNM fails intermittently with Fair
Scheduler. (Contributed by Miklos Szegedi)

(cherry picked from commit cbd2b73ef81a7e275c5d4f842cac5b81ff2f8c84)


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

Branch: refs/heads/branch-2
Commit: 3828b33b8b3b6f1863178212dd21242532c063f8
Parents: 2e3b713
Author: Yufei Gu <yufei@apache.org>
Authored: Thu Oct 19 16:39:25 2017 -0700
Committer: Yufei Gu <yufei@apache.org>
Committed: Thu Oct 19 16:41:25 2017 -0700

----------------------------------------------------------------------
 .../yarn/server/resourcemanager/TestSignalContainer.java     | 8 ++++++++
 1 file changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/3828b33b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestSignalContainer.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestSignalContainer.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestSignalContainer.java
index 2688987..fac0b96 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestSignalContainer.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestSignalContainer.java
@@ -21,6 +21,7 @@ package org.apache.hadoop.yarn.server.resourcemanager;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fair.FairScheduler;
 import org.junit.Assert;
 
 import org.apache.commons.logging.Log;
@@ -50,6 +51,10 @@ public class TestSignalContainer {
     Logger rootLogger = LogManager.getRootLogger();
     rootLogger.setLevel(Level.DEBUG);
     MockRM rm = new MockRM();
+    FairScheduler fs = null;
+    if (rm.getResourceScheduler().getClass() == FairScheduler.class) {
+      fs = (FairScheduler)rm.getResourceScheduler();
+    }
     rm.start();
 
     MockNM nm1 = rm.registerNode("h1:1234", 5000);
@@ -78,6 +83,9 @@ public class TestSignalContainer {
       List<Container> allocation = am.allocate(new ArrayList<ResourceRequest>(),
           new ArrayList<ContainerId>()).getAllocatedContainers();
       conts.addAll(allocation);
+      if (fs != null) {
+        nm1.nodeHeartbeat(true);
+      }
     }
     Assert.assertEquals(request, conts.size());
 


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message