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 static List<RMNode> newNodes(int racks, int nodesPerRack,
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 {