Repository: hadoop Updated Branches: refs/heads/branch-2 41fe85f86 -> a19859c3f
YARN-5544. TestNodeBlacklistingOnAMFailures fails on trunk. Contributed by Sunil G. (cherry picked from commit 0d5997d2b98eb89e72828dfcd78f02aa4e7e1e67) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/a19859c3 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/a19859c3 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/a19859c3 Branch: refs/heads/branch-2 Commit: a19859c3f5d5417ecbd7b882f75f34a91db97204 Parents: 41fe85f Author: Rohith Sharma K S <rohithsharm...@apache.org> Authored: Tue Aug 23 10:33:28 2016 +0530 Committer: Rohith Sharma K S <rohithsharm...@apache.org> Committed: Tue Aug 23 14:39:19 2016 +0530 ---------------------------------------------------------------------- .../TestNodeBlacklistingOnAMFailures.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/a19859c3/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestNodeBlacklistingOnAMFailures.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/TestNodeBlacklistingOnAMFailures.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestNodeBlacklistingOnAMFailures.java index ef6d43b..7a24b7a 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestNodeBlacklistingOnAMFailures.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestNodeBlacklistingOnAMFailures.java @@ -68,6 +68,9 @@ public class TestNodeBlacklistingOnAMFailures { MockRM rm = startRM(conf, dispatcher); CapacityScheduler scheduler = (CapacityScheduler) rm.getResourceScheduler(); + // Register 5 nodes, so that we can blacklist atleast one if AM container + // is failed. As per calculation it will be like, 5nodes * 0.2 (default)=1. + // First register 2 nodes, and after AM lauched register 3 more nodes. MockNM nm1 = new MockNM("127.0.0.1:1234", 8000, rm.getResourceTrackerService()); nm1.registerNode(); @@ -93,6 +96,19 @@ public class TestNodeBlacklistingOnAMFailures { otherNode = nm1; } + // register 3 nodes now + MockNM nm3 = + new MockNM("127.0.0.3:2345", 8000, rm.getResourceTrackerService()); + nm3.registerNode(); + + MockNM nm4 = + new MockNM("127.0.0.4:2345", 8000, rm.getResourceTrackerService()); + nm4.registerNode(); + + MockNM nm5 = + new MockNM("127.0.0.5:2345", 8000, rm.getResourceTrackerService()); + nm5.registerNode(); + // Set the exist status to INVALID so that we can verify that the system // automatically blacklisting the node makeAMContainerExit(rm, amContainerId, currentNode, --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org