HBASE-15864 Reuse the testing helper to wait regions in transition
This commit is contained in:
parent
a27504c701
commit
7a84ee262f
|
@ -3887,13 +3887,20 @@ public class HBaseTestingUtility extends HBaseCommonTestingUtility {
|
||||||
/**
|
/**
|
||||||
* Wait until no regions in transition.
|
* Wait until no regions in transition.
|
||||||
* @param timeout How long to wait.
|
* @param timeout How long to wait.
|
||||||
* @throws Exception
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
public void waitUntilNoRegionsInTransition(
|
public void waitUntilNoRegionsInTransition(final long timeout) throws IOException {
|
||||||
final long timeout) throws Exception {
|
|
||||||
waitFor(timeout, predicateNoRegionsInTransition());
|
waitFor(timeout, predicateNoRegionsInTransition());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Wait until no regions in transition. (time limit 15min)
|
||||||
|
* @throws IOException
|
||||||
|
*/
|
||||||
|
public void waitUntilNoRegionsInTransition() throws IOException {
|
||||||
|
waitUntilNoRegionsInTransition(15 * 60000);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wait until labels is ready in VisibilityLabelsCache.
|
* Wait until labels is ready in VisibilityLabelsCache.
|
||||||
* @param timeoutMillis
|
* @param timeoutMillis
|
||||||
|
|
|
@ -103,39 +103,39 @@ public class TestRegionRebalancing {
|
||||||
admin.createTable(this.desc, Arrays.copyOfRange(HBaseTestingUtility.KEYS,
|
admin.createTable(this.desc, Arrays.copyOfRange(HBaseTestingUtility.KEYS,
|
||||||
1, HBaseTestingUtility.KEYS.length));
|
1, HBaseTestingUtility.KEYS.length));
|
||||||
this.regionLocator = connection.getRegionLocator(this.desc.getTableName());
|
this.regionLocator = connection.getRegionLocator(this.desc.getTableName());
|
||||||
|
|
||||||
MetaTableAccessor.fullScanMetaAndPrint(admin.getConnection());
|
MetaTableAccessor.fullScanMetaAndPrint(admin.getConnection());
|
||||||
|
|
||||||
assertEquals("Test table should have right number of regions",
|
assertEquals("Test table should have right number of regions",
|
||||||
HBaseTestingUtility.KEYS.length,
|
HBaseTestingUtility.KEYS.length,
|
||||||
this.regionLocator.getStartKeys().length);
|
this.regionLocator.getStartKeys().length);
|
||||||
|
|
||||||
// verify that the region assignments are balanced to start out
|
// verify that the region assignments are balanced to start out
|
||||||
assertRegionsAreBalanced();
|
assertRegionsAreBalanced();
|
||||||
|
|
||||||
// add a region server - total of 2
|
// add a region server - total of 2
|
||||||
LOG.info("Started second server=" +
|
LOG.info("Started second server=" +
|
||||||
UTIL.getHBaseCluster().startRegionServer().getRegionServer().getServerName());
|
UTIL.getHBaseCluster().startRegionServer().getRegionServer().getServerName());
|
||||||
UTIL.getHBaseCluster().getMaster().balance();
|
UTIL.getHBaseCluster().getMaster().balance();
|
||||||
assertRegionsAreBalanced();
|
assertRegionsAreBalanced();
|
||||||
|
|
||||||
// On a balanced cluster, calling balance() should return true
|
// On a balanced cluster, calling balance() should return true
|
||||||
assert(UTIL.getHBaseCluster().getMaster().balance() == true);
|
assert(UTIL.getHBaseCluster().getMaster().balance() == true);
|
||||||
|
|
||||||
// if we add a server, then the balance() call should return true
|
// if we add a server, then the balance() call should return true
|
||||||
// add a region server - total of 3
|
// add a region server - total of 3
|
||||||
LOG.info("Started third server=" +
|
LOG.info("Started third server=" +
|
||||||
UTIL.getHBaseCluster().startRegionServer().getRegionServer().getServerName());
|
UTIL.getHBaseCluster().startRegionServer().getRegionServer().getServerName());
|
||||||
assert(UTIL.getHBaseCluster().getMaster().balance() == true);
|
assert(UTIL.getHBaseCluster().getMaster().balance() == true);
|
||||||
assertRegionsAreBalanced();
|
assertRegionsAreBalanced();
|
||||||
|
|
||||||
// kill a region server - total of 2
|
// kill a region server - total of 2
|
||||||
LOG.info("Stopped third server=" + UTIL.getHBaseCluster().stopRegionServer(2, false));
|
LOG.info("Stopped third server=" + UTIL.getHBaseCluster().stopRegionServer(2, false));
|
||||||
UTIL.getHBaseCluster().waitOnRegionServer(2);
|
UTIL.getHBaseCluster().waitOnRegionServer(2);
|
||||||
waitOnCrashProcessing();
|
waitOnCrashProcessing();
|
||||||
UTIL.getHBaseCluster().getMaster().balance();
|
UTIL.getHBaseCluster().getMaster().balance();
|
||||||
assertRegionsAreBalanced();
|
assertRegionsAreBalanced();
|
||||||
|
|
||||||
// start two more region servers - total of 4
|
// start two more region servers - total of 4
|
||||||
LOG.info("Readding third server=" +
|
LOG.info("Readding third server=" +
|
||||||
UTIL.getHBaseCluster().startRegionServer().getRegionServer().getServerName());
|
UTIL.getHBaseCluster().startRegionServer().getRegionServer().getServerName());
|
||||||
|
@ -253,10 +253,7 @@ public class TestRegionRebalancing {
|
||||||
Thread.sleep(200);
|
Thread.sleep(200);
|
||||||
} catch (InterruptedException e) {}
|
} catch (InterruptedException e) {}
|
||||||
}
|
}
|
||||||
RegionStates regionStates = UTIL.getHBaseCluster().getMaster().getAssignmentManager().getRegionStates();
|
UTIL.waitUntilNoRegionsInTransition();
|
||||||
while (!regionStates.getRegionsInTransition().isEmpty()) {
|
|
||||||
Threads.sleep(100);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -250,20 +250,14 @@ public class TestHCM {
|
||||||
|
|
||||||
Table t = TEST_UTIL.createTable(tn, cf);
|
Table t = TEST_UTIL.createTable(tn, cf);
|
||||||
TEST_UTIL.waitTableAvailable(tn);
|
TEST_UTIL.waitTableAvailable(tn);
|
||||||
|
TEST_UTIL.waitUntilNoRegionsInTransition();
|
||||||
|
|
||||||
while(TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager().
|
|
||||||
getRegionStates().isRegionsInTransition()){
|
|
||||||
Thread.sleep(1);
|
|
||||||
}
|
|
||||||
final ConnectionImplementation hci = (ConnectionImplementation)TEST_UTIL.getConnection();
|
final ConnectionImplementation hci = (ConnectionImplementation)TEST_UTIL.getConnection();
|
||||||
try (RegionLocator l = TEST_UTIL.getConnection().getRegionLocator(tn)) {
|
try (RegionLocator l = TEST_UTIL.getConnection().getRegionLocator(tn)) {
|
||||||
while (l.getRegionLocation(rk).getPort() != sn.getPort()) {
|
while (l.getRegionLocation(rk).getPort() != sn.getPort()) {
|
||||||
TEST_UTIL.getHBaseAdmin().move(l.getRegionLocation(rk).getRegionInfo().
|
TEST_UTIL.getHBaseAdmin().move(l.getRegionLocation(rk).getRegionInfo().
|
||||||
getEncodedNameAsBytes(), Bytes.toBytes(sn.toString()));
|
getEncodedNameAsBytes(), Bytes.toBytes(sn.toString()));
|
||||||
while (TEST_UTIL.getHBaseCluster().getMaster().getAssignmentManager().
|
TEST_UTIL.waitUntilNoRegionsInTransition();
|
||||||
getRegionStates().isRegionsInTransition()) {
|
|
||||||
Thread.sleep(1);
|
|
||||||
}
|
|
||||||
hci.clearRegionCache(tn);
|
hci.clearRegionCache(tn);
|
||||||
}
|
}
|
||||||
Assert.assertNotNull(hci.clusterStatusListener);
|
Assert.assertNotNull(hci.clusterStatusListener);
|
||||||
|
@ -741,9 +735,7 @@ public class TestHCM {
|
||||||
HMaster master = TEST_UTIL.getMiniHBaseCluster().getMaster();
|
HMaster master = TEST_UTIL.getMiniHBaseCluster().getMaster();
|
||||||
|
|
||||||
// We can wait for all regions to be online, that makes log reading easier when debugging
|
// We can wait for all regions to be online, that makes log reading easier when debugging
|
||||||
while (master.getAssignmentManager().getRegionStates().isRegionsInTransition()) {
|
TEST_UTIL.waitUntilNoRegionsInTransition();
|
||||||
Thread.sleep(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Now moving the region to the second server
|
// Now moving the region to the second server
|
||||||
HRegionLocation toMove = conn.getCachedLocation(TABLE_NAME, ROW).getRegionLocation();
|
HRegionLocation toMove = conn.getCachedLocation(TABLE_NAME, ROW).getRegionLocation();
|
||||||
|
@ -1034,9 +1026,7 @@ public class TestHCM {
|
||||||
HMaster master = TEST_UTIL.getMiniHBaseCluster().getMaster();
|
HMaster master = TEST_UTIL.getMiniHBaseCluster().getMaster();
|
||||||
|
|
||||||
// We can wait for all regions to be online, that makes log reading easier when debugging
|
// We can wait for all regions to be online, that makes log reading easier when debugging
|
||||||
while (master.getAssignmentManager().getRegionStates().isRegionsInTransition()) {
|
TEST_UTIL.waitUntilNoRegionsInTransition();
|
||||||
Thread.sleep(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
Put put = new Put(ROW_X);
|
Put put = new Put(ROW_X);
|
||||||
put.addColumn(FAM_NAM, ROW_X, ROW_X);
|
put.addColumn(FAM_NAM, ROW_X, ROW_X);
|
||||||
|
|
|
@ -51,11 +51,9 @@ import org.apache.hadoop.hbase.client.ConnectionFactory;
|
||||||
import org.apache.hadoop.hbase.client.MasterSwitchType;
|
import org.apache.hadoop.hbase.client.MasterSwitchType;
|
||||||
import org.apache.hadoop.hbase.client.RegionLocator;
|
import org.apache.hadoop.hbase.client.RegionLocator;
|
||||||
import org.apache.hadoop.hbase.client.Table;
|
import org.apache.hadoop.hbase.client.Table;
|
||||||
import org.apache.hadoop.hbase.master.AssignmentManager;
|
|
||||||
import org.apache.hadoop.hbase.master.HMaster;
|
import org.apache.hadoop.hbase.master.HMaster;
|
||||||
import org.apache.hadoop.hbase.master.MasterCoprocessorHost;
|
import org.apache.hadoop.hbase.master.MasterCoprocessorHost;
|
||||||
import org.apache.hadoop.hbase.master.RegionPlan;
|
import org.apache.hadoop.hbase.master.RegionPlan;
|
||||||
import org.apache.hadoop.hbase.master.RegionState;
|
|
||||||
import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv;
|
import org.apache.hadoop.hbase.master.procedure.MasterProcedureEnv;
|
||||||
import org.apache.hadoop.hbase.procedure2.ProcedureExecutor;
|
import org.apache.hadoop.hbase.procedure2.ProcedureExecutor;
|
||||||
import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
|
import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
|
||||||
|
@ -1915,17 +1913,13 @@ public class TestMasterObserver {
|
||||||
master.balanceSwitch(false);
|
master.balanceSwitch(false);
|
||||||
|
|
||||||
// wait for assignments to finish, if any
|
// wait for assignments to finish, if any
|
||||||
AssignmentManager mgr = master.getAssignmentManager();
|
UTIL.waitUntilNoRegionsInTransition();
|
||||||
Set<RegionState> transRegions = mgr.getRegionStates().getRegionsInTransition();
|
|
||||||
for (RegionState state : transRegions) {
|
|
||||||
mgr.getRegionStates().waitOnRegionToClearRegionsInTransition(state.getRegion());
|
|
||||||
}
|
|
||||||
|
|
||||||
// move half the open regions from RS 0 to RS 1
|
// move half the open regions from RS 0 to RS 1
|
||||||
HRegionServer rs = cluster.getRegionServer(0);
|
HRegionServer rs = cluster.getRegionServer(0);
|
||||||
byte[] destRS = Bytes.toBytes(cluster.getRegionServer(1).getServerName().toString());
|
byte[] destRS = Bytes.toBytes(cluster.getRegionServer(1).getServerName().toString());
|
||||||
//Make sure no regions are in transition now
|
//Make sure no regions are in transition now
|
||||||
waitForRITtoBeZero(master);
|
UTIL.waitUntilNoRegionsInTransition();
|
||||||
List<HRegionInfo> openRegions = ProtobufUtil.getOnlineRegions(rs.getRSRpcServices());
|
List<HRegionInfo> openRegions = ProtobufUtil.getOnlineRegions(rs.getRSRpcServices());
|
||||||
int moveCnt = openRegions.size()/2;
|
int moveCnt = openRegions.size()/2;
|
||||||
for (int i=0; i<moveCnt; i++) {
|
for (int i=0; i<moveCnt; i++) {
|
||||||
|
@ -1936,7 +1930,7 @@ public class TestMasterObserver {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Make sure no regions are in transition now
|
//Make sure no regions are in transition now
|
||||||
waitForRITtoBeZero(master);
|
UTIL.waitUntilNoRegionsInTransition();
|
||||||
// now trigger a balance
|
// now trigger a balance
|
||||||
master.balanceSwitch(true);
|
master.balanceSwitch(true);
|
||||||
boolean balanceRun = master.balance();
|
boolean balanceRun = master.balance();
|
||||||
|
@ -1949,15 +1943,6 @@ public class TestMasterObserver {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void waitForRITtoBeZero(HMaster master) throws Exception {
|
|
||||||
// wait for assignments to finish
|
|
||||||
AssignmentManager mgr = master.getAssignmentManager();
|
|
||||||
Set<RegionState> transRegions = mgr.getRegionStates().getRegionsInTransition();
|
|
||||||
for (RegionState state : transRegions) {
|
|
||||||
mgr.getRegionStates().waitOnRegionToClearRegionsInTransition(state.getRegion());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test (timeout=180000)
|
@Test (timeout=180000)
|
||||||
public void testTableDescriptorsEnumeration() throws Exception {
|
public void testTableDescriptorsEnumeration() throws Exception {
|
||||||
MiniHBaseCluster cluster = UTIL.getHBaseCluster();
|
MiniHBaseCluster cluster = UTIL.getHBaseCluster();
|
||||||
|
|
|
@ -515,11 +515,8 @@ public class TestHFileOutputFormat2 {
|
||||||
if (shouldChangeRegions) {
|
if (shouldChangeRegions) {
|
||||||
LOG.info("Changing regions in table");
|
LOG.info("Changing regions in table");
|
||||||
admin.disableTable(table.getName());
|
admin.disableTable(table.getName());
|
||||||
while(util.getMiniHBaseCluster().getMaster().getAssignmentManager().
|
util.waitUntilNoRegionsInTransition();
|
||||||
getRegionStates().isRegionsInTransition()) {
|
|
||||||
Threads.sleep(200);
|
|
||||||
LOG.info("Waiting on table to finish disabling");
|
|
||||||
}
|
|
||||||
util.deleteTable(table.getName());
|
util.deleteTable(table.getName());
|
||||||
byte[][] newSplitKeys = generateRandomSplitKeys(14);
|
byte[][] newSplitKeys = generateRandomSplitKeys(14);
|
||||||
table = util.createTable(TABLE_NAME, FAMILIES, newSplitKeys);
|
table = util.createTable(TABLE_NAME, FAMILIES, newSplitKeys);
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class TestTableDeleteFamilyHandler {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start up a mini cluster and put a small table of empty regions into it.
|
* Start up a mini cluster and put a small table of empty regions into it.
|
||||||
*
|
*
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
@BeforeClass
|
@BeforeClass
|
||||||
|
@ -80,15 +80,8 @@ public class TestTableDeleteFamilyHandler {
|
||||||
// Create a table of three families. This will assign a region.
|
// Create a table of three families. This will assign a region.
|
||||||
TEST_UTIL.createTable(TABLENAME, FAMILIES);
|
TEST_UTIL.createTable(TABLENAME, FAMILIES);
|
||||||
Table t = TEST_UTIL.getConnection().getTable(TABLENAME);
|
Table t = TEST_UTIL.getConnection().getTable(TABLENAME);
|
||||||
while(TEST_UTIL.getMiniHBaseCluster().getMaster().getAssignmentManager()
|
TEST_UTIL.waitUntilNoRegionsInTransition();
|
||||||
.getRegionStates().getRegionsInTransition().size() > 0) {
|
|
||||||
Thread.sleep(100);
|
|
||||||
}
|
|
||||||
// Create multiple regions in all the three column families
|
|
||||||
while(TEST_UTIL.getMiniHBaseCluster().getMaster().getAssignmentManager()
|
|
||||||
.getRegionStates().getRegionsInTransition().size() > 0) {
|
|
||||||
Thread.sleep(100);
|
|
||||||
}
|
|
||||||
// Load the table with data for all families
|
// Load the table with data for all families
|
||||||
TEST_UTIL.loadTable(t, FAMILIES);
|
TEST_UTIL.loadTable(t, FAMILIES);
|
||||||
|
|
||||||
|
|
|
@ -149,29 +149,12 @@ public class TestSplitTransactionOnCluster {
|
||||||
this.admin.close();
|
this.admin.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private HRegionInfo getAndCheckSingleTableRegion(final List<HRegion> regions) {
|
private HRegionInfo getAndCheckSingleTableRegion(final List<HRegion> regions)
|
||||||
|
throws IOException, InterruptedException {
|
||||||
assertEquals(1, regions.size());
|
assertEquals(1, regions.size());
|
||||||
HRegionInfo hri = regions.get(0).getRegionInfo();
|
HRegionInfo hri = regions.get(0).getRegionInfo();
|
||||||
return waitOnRIT(hri);
|
TESTING_UTIL.getMiniHBaseCluster().getMaster().getAssignmentManager()
|
||||||
}
|
.waitOnRegionToClearRegionsInTransition(hri, 600000);
|
||||||
|
|
||||||
/**
|
|
||||||
* Often region has not yet fully opened. If we try to use it -- do a move for instance -- it
|
|
||||||
* will fail silently if the region is not yet opened.
|
|
||||||
* @param hri Region to check if in Regions In Transition... wait until out of transition before
|
|
||||||
* returning
|
|
||||||
* @return Passed in <code>hri</code>
|
|
||||||
*/
|
|
||||||
private HRegionInfo waitOnRIT(final HRegionInfo hri) {
|
|
||||||
// Close worked but we are going to open the region elsewhere. Before going on, make sure
|
|
||||||
// this completes.
|
|
||||||
while (TESTING_UTIL.getHBaseCluster().getMaster().getAssignmentManager().
|
|
||||||
getRegionStates().isRegionInTransition(hri)) {
|
|
||||||
LOG.info("Waiting on region in transition: " +
|
|
||||||
TESTING_UTIL.getHBaseCluster().getMaster().getAssignmentManager().getRegionStates().
|
|
||||||
getRegionTransitionState(hri));
|
|
||||||
Threads.sleep(10);
|
|
||||||
}
|
|
||||||
return hri;
|
return hri;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,13 +193,7 @@ public class TestSplitTransactionOnCluster {
|
||||||
observer.latch.await();
|
observer.latch.await();
|
||||||
|
|
||||||
LOG.info("Waiting for region to come out of RIT");
|
LOG.info("Waiting for region to come out of RIT");
|
||||||
TESTING_UTIL.waitFor(60000, 1000, new Waiter.Predicate<Exception>() {
|
cluster.getMaster().getAssignmentManager().waitOnRegionToClearRegionsInTransition(hri, 60000);
|
||||||
@Override
|
|
||||||
public boolean evaluate() throws Exception {
|
|
||||||
RegionStates regionStates = cluster.getMaster().getAssignmentManager().getRegionStates();
|
|
||||||
return !regionStates.isRegionInTransition(hri.getEncodedName());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} finally {
|
} finally {
|
||||||
admin.setBalancerRunning(true, false);
|
admin.setBalancerRunning(true, false);
|
||||||
cluster.getMaster().setCatalogJanitorEnabled(true);
|
cluster.getMaster().setCatalogJanitorEnabled(true);
|
||||||
|
|
|
@ -1683,8 +1683,7 @@ public class TestHBaseFsckOneRS extends BaseTestHBaseFsck {
|
||||||
st.prepare();
|
st.prepare();
|
||||||
st.stepsBeforePONR(regionServer, regionServer, false);
|
st.stepsBeforePONR(regionServer, regionServer, false);
|
||||||
AssignmentManager am = cluster.getMaster().getAssignmentManager();
|
AssignmentManager am = cluster.getMaster().getAssignmentManager();
|
||||||
Set<RegionState> regionsInTransition = am.getRegionStates().getRegionsInTransition();
|
for (RegionState state : am.getRegionStates().getRegionsInTransition()) {
|
||||||
for (RegionState state : regionsInTransition) {
|
|
||||||
am.regionOffline(state.getRegion());
|
am.regionOffline(state.getRegion());
|
||||||
}
|
}
|
||||||
Map<HRegionInfo, ServerName> regionsMap = new HashMap<HRegionInfo, ServerName>();
|
Map<HRegionInfo, ServerName> regionsMap = new HashMap<HRegionInfo, ServerName>();
|
||||||
|
|
|
@ -75,15 +75,6 @@ public class TestOfflineMetaRebuildHole extends OfflineMetaRebuildTestCore {
|
||||||
|
|
||||||
LOG.info("Waiting for no more RIT");
|
LOG.info("Waiting for no more RIT");
|
||||||
TEST_UTIL.waitUntilNoRegionsInTransition(60000);
|
TEST_UTIL.waitUntilNoRegionsInTransition(60000);
|
||||||
LOG.info("No more RIT in ZK, now doing final test verification");
|
|
||||||
int tries = 60;
|
|
||||||
while(TEST_UTIL.getHBaseCluster()
|
|
||||||
.getMaster().getAssignmentManager().getRegionStates().getRegionsInTransition().size() > 0 &&
|
|
||||||
tries-- > 0) {
|
|
||||||
LOG.info("Waiting for RIT: "+TEST_UTIL.getHBaseCluster()
|
|
||||||
.getMaster().getAssignmentManager().getRegionStates().getRegionsInTransition());
|
|
||||||
Thread.sleep(1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Meta still messed up.
|
// Meta still messed up.
|
||||||
assertEquals(1, scanMeta());
|
assertEquals(1, scanMeta());
|
||||||
|
|
|
@ -84,14 +84,6 @@ public class TestOfflineMetaRebuildOverlap extends OfflineMetaRebuildTestCore {
|
||||||
LOG.info("Waiting for no more RIT");
|
LOG.info("Waiting for no more RIT");
|
||||||
TEST_UTIL.waitUntilNoRegionsInTransition(60000);
|
TEST_UTIL.waitUntilNoRegionsInTransition(60000);
|
||||||
LOG.info("No more RIT in ZK, now doing final test verification");
|
LOG.info("No more RIT in ZK, now doing final test verification");
|
||||||
int tries = 60;
|
|
||||||
while(TEST_UTIL.getHBaseCluster()
|
|
||||||
.getMaster().getAssignmentManager().getRegionStates().getRegionsInTransition().size() > 0 &&
|
|
||||||
tries-- > 0) {
|
|
||||||
LOG.info("Waiting for RIT: "+TEST_UTIL.getHBaseCluster()
|
|
||||||
.getMaster().getAssignmentManager().getRegionStates().getRegionsInTransition());
|
|
||||||
Thread.sleep(1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Meta still messed up.
|
// Meta still messed up.
|
||||||
assertEquals(1, scanMeta());
|
assertEquals(1, scanMeta());
|
||||||
|
|
Loading…
Reference in New Issue