HDFS-15146. TestBalancerRPCDelay.testBalancerRPCDelay fails
intermittently. Contributed by Ahmed Hussein.
This commit is contained in:
parent
b897f6834b
commit
799d4c1cf4
@ -870,6 +870,7 @@ private void doTest(Configuration conf, long[] capacities,
|
|||||||
cluster.startDataNodes(conf, 1, true, null,
|
cluster.startDataNodes(conf, 1, true, null,
|
||||||
new String[]{newRack}, null,new long[]{newCapacity});
|
new String[]{newRack}, null,new long[]{newCapacity});
|
||||||
totalCapacity += newCapacity;
|
totalCapacity += newCapacity;
|
||||||
|
cluster.triggerHeartbeats();
|
||||||
} else {
|
} else {
|
||||||
//if running a test with "include list", include original nodes as well
|
//if running a test with "include list", include original nodes as well
|
||||||
if (nodes.getNumberofIncludeNodes()>0) {
|
if (nodes.getNumberofIncludeNodes()>0) {
|
||||||
@ -886,10 +887,12 @@ private void doTest(Configuration conf, long[] capacities,
|
|||||||
if (nodes.getNames() != null) {
|
if (nodes.getNames() != null) {
|
||||||
cluster.startDataNodes(conf, nodes.getNumberofNewNodes(), true, null,
|
cluster.startDataNodes(conf, nodes.getNumberofNewNodes(), true, null,
|
||||||
newRacks, nodes.getNames(), newCapacities);
|
newRacks, nodes.getNames(), newCapacities);
|
||||||
|
cluster.triggerHeartbeats();
|
||||||
totalCapacity += newCapacity * nodes.getNumberofNewNodes();
|
totalCapacity += newCapacity * nodes.getNumberofNewNodes();
|
||||||
} else { // host names are not specified
|
} else { // host names are not specified
|
||||||
cluster.startDataNodes(conf, nodes.getNumberofNewNodes(), true, null,
|
cluster.startDataNodes(conf, nodes.getNumberofNewNodes(), true, null,
|
||||||
newRacks, null, newCapacities);
|
newRacks, null, newCapacities);
|
||||||
|
cluster.triggerHeartbeats();
|
||||||
totalCapacity += newCapacity * nodes.getNumberofNewNodes();
|
totalCapacity += newCapacity * nodes.getNumberofNewNodes();
|
||||||
//populate the include nodes
|
//populate the include nodes
|
||||||
if (nodes.getNumberofIncludeNodes() > 0) {
|
if (nodes.getNumberofIncludeNodes() > 0) {
|
||||||
@ -1905,6 +1908,7 @@ public void testManyBalancerSimultaneously() throws Exception {
|
|||||||
// start up an empty node with the same capacity and on the same rack
|
// start up an empty node with the same capacity and on the same rack
|
||||||
cluster.startDataNodes(conf, 1, true, null, new String[] { newRack },
|
cluster.startDataNodes(conf, 1, true, null, new String[] { newRack },
|
||||||
new long[] { newCapacity });
|
new long[] { newCapacity });
|
||||||
|
cluster.triggerHeartbeats();
|
||||||
|
|
||||||
// Case1: Simulate first balancer by creating 'balancer.id' file. It
|
// Case1: Simulate first balancer by creating 'balancer.id' file. It
|
||||||
// will keep this file until the balancing operation is completed.
|
// will keep this file until the balancing operation is completed.
|
||||||
|
Loading…
Reference in New Issue
Block a user