YARN-5182. MockNodes.newNodes creates one more node per rack than requested. (Karthik Kambatla via Varun Saxena).

This commit is contained in:
Varun Saxena 2016-06-30 00:06:17 +05:30
parent 1285035c67
commit 527cd9852a
1 changed files with 1 additions and 2 deletions

View File

@ -57,8 +57,7 @@ public class MockNodes {
if (j == (nodesPerRack - 1)) { if (j == (nodesPerRack - 1)) {
// One unhealthy node per rack. // One unhealthy node per rack.
list.add(nodeInfo(i, perNode, NodeState.UNHEALTHY)); list.add(nodeInfo(i, perNode, NodeState.UNHEALTHY));
} } else if (j == 0) {
if (j == 0) {
// One node with label // One node with label
list.add(nodeInfo(i, perNode, NodeState.RUNNING, ImmutableSet.of("x"))); list.add(nodeInfo(i, perNode, NodeState.RUNNING, ImmutableSet.of("x")));
} else { } else {