YARN-5182. MockNodes.newNodes creates one more node per rack than requested. (Karthik Kambatla via Varun Saxena).
This commit is contained in:
parent
1285035c67
commit
527cd9852a
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue