HBASE-15277 TestRegionMergeTransactionOnCluster.testWholesomeMerge fails with no connection to master; ADDING DEBUGGING
This commit is contained in:
parent
00248656ee
commit
28cd48b673
|
@ -131,7 +131,7 @@ public class TableStateManager {
|
||||||
TableState.State tableState = getTableState(tableName);
|
TableState.State tableState = getTableState(tableName);
|
||||||
return TableState.isInStates(tableState, states);
|
return TableState.isInStates(tableState, states);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOG.error("Unable to get table " + tableName + " state, probably table not exists");
|
LOG.error("Unable to get table " + tableName + " state", e);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,6 +78,7 @@ import org.junit.BeforeClass;
|
||||||
import org.junit.Rule;
|
import org.junit.Rule;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.experimental.categories.Category;
|
import org.junit.experimental.categories.Category;
|
||||||
|
import org.junit.rules.TestName;
|
||||||
import org.junit.rules.TestRule;
|
import org.junit.rules.TestRule;
|
||||||
|
|
||||||
import com.google.common.base.Joiner;
|
import com.google.common.base.Joiner;
|
||||||
|
@ -94,6 +95,7 @@ import com.google.protobuf.ServiceException;
|
||||||
public class TestRegionMergeTransactionOnCluster {
|
public class TestRegionMergeTransactionOnCluster {
|
||||||
private static final Log LOG = LogFactory
|
private static final Log LOG = LogFactory
|
||||||
.getLog(TestRegionMergeTransactionOnCluster.class);
|
.getLog(TestRegionMergeTransactionOnCluster.class);
|
||||||
|
@Rule public TestName name = new TestName();
|
||||||
@Rule public final TestRule timeout = CategoryBasedTimeout.builder().withTimeout(this.getClass()).
|
@Rule public final TestRule timeout = CategoryBasedTimeout.builder().withTimeout(this.getClass()).
|
||||||
withLookingForStuckThread(true).build();
|
withLookingForStuckThread(true).build();
|
||||||
private static final int NB_SERVERS = 3;
|
private static final int NB_SERVERS = 3;
|
||||||
|
@ -182,7 +184,6 @@ public class TestRegionMergeTransactionOnCluster {
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testMergeAndRestartingMaster() throws Exception {
|
public void testMergeAndRestartingMaster() throws Exception {
|
||||||
LOG.info("Starting testMergeAndRestartingMaster");
|
|
||||||
final TableName tableName = TableName.valueOf("testMergeAndRestartingMaster");
|
final TableName tableName = TableName.valueOf("testMergeAndRestartingMaster");
|
||||||
|
|
||||||
// Create table and load data.
|
// Create table and load data.
|
||||||
|
@ -458,11 +459,15 @@ public class TestRegionMergeTransactionOnCluster {
|
||||||
}
|
}
|
||||||
|
|
||||||
Table table = TEST_UTIL.createTable(tablename, FAMILYNAME, splitRows);
|
Table table = TEST_UTIL.createTable(tablename, FAMILYNAME, splitRows);
|
||||||
|
LOG.info("Created " + table.getName());
|
||||||
if (replication > 1) {
|
if (replication > 1) {
|
||||||
HBaseTestingUtility.setReplicas(ADMIN, tablename, replication);
|
HBaseTestingUtility.setReplicas(ADMIN, tablename, replication);
|
||||||
|
LOG.info("Set replication of " + replication + " on " + table.getName());
|
||||||
}
|
}
|
||||||
loadData(table);
|
loadData(table);
|
||||||
|
LOG.info("Loaded " + table.getName());
|
||||||
verifyRowCount(table, ROWSIZE);
|
verifyRowCount(table, ROWSIZE);
|
||||||
|
LOG.info("Verified " + table.getName());
|
||||||
|
|
||||||
// sleep here is an ugly hack to allow region transitions to finish
|
// sleep here is an ugly hack to allow region transitions to finish
|
||||||
long timeout = System.currentTimeMillis() + waitTime;
|
long timeout = System.currentTimeMillis() + waitTime;
|
||||||
|
@ -474,7 +479,7 @@ public class TestRegionMergeTransactionOnCluster {
|
||||||
break;
|
break;
|
||||||
Thread.sleep(250);
|
Thread.sleep(250);
|
||||||
}
|
}
|
||||||
|
LOG.info("Getting regions of " + table.getName());
|
||||||
tableRegions = MetaTableAccessor.getTableRegionsAndLocations(
|
tableRegions = MetaTableAccessor.getTableRegionsAndLocations(
|
||||||
TEST_UTIL.getConnection(), tablename);
|
TEST_UTIL.getConnection(), tablename);
|
||||||
LOG.info("Regions after load: " + Joiner.on(',').join(tableRegions));
|
LOG.info("Regions after load: " + Joiner.on(',').join(tableRegions));
|
||||||
|
|
Loading…
Reference in New Issue