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:13:28 +05:30
parent 991c946593
commit abe7fc22c1
1 changed files with 1 additions and 2 deletions

View File

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