Package org.apache.hadoop.hbase.master
Class TestRecreateCluster
java.lang.Object
org.apache.hadoop.hbase.master.TestRecreateCluster
Test reuse storefiles within data directory when cluster failover with a set of new region
servers with different hostnames with or without WALs and Zookeeper ZNodes, the master and
cluster should fail respectively if there is any situation considered as not supported.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static final long
org.junit.rules.TestName
private static final int
private static final HBaseTestingUtility
private static final long
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
ensureTableNotColocatedWithSystemTable
(org.apache.hadoop.hbase.TableName userTable, org.apache.hadoop.hbase.TableName systemTable) private int
getServerNumForTableWithOnlyOneRegion
(org.apache.hadoop.hbase.TableName tableName) private void
prepareDataBeforeRecreate
(HBaseTestingUtility testUtil, org.apache.hadoop.hbase.TableName tableName) private void
restartHBaseCluster
(boolean cleanUpWALs, boolean cleanUpZnodes) void
setup()
void
void
void
void
private void
validateDataAfterRecreate
(HBaseTestingUtility testUtil, org.apache.hadoop.hbase.TableName tableName) private void
validateRecreateClusterWithUserDisabled
(boolean cleanupWALs, boolean cleanUpZNodes) private void
validateRecreateClusterWithUserTableEnabled
(boolean cleanupWALs, boolean cleanUpZNodes)
-
Field Details
-
CLASS_RULE
-
name
-
TEST_UTIL
-
NUM_RS
- See Also:
-
TIMEOUT_MS
-
MASTER_INIT_TIMEOUT_MS
-
-
Constructor Details
-
TestRecreateCluster
public TestRecreateCluster()
-
-
Method Details
-
setup
-
testRecreateCluster_UserTableDisabled_ReuseWALsAndZNodes
- Throws:
Exception
-
testRecreateCluster_UserTableEnabled_ReuseWALsAndZNodes
- Throws:
Exception
-
testRecreateCluster_UserTableEnabled_CleanupZNodes
- Throws:
Exception
-
testRecreateCluster_UserTableEnabled_CleanupWALAndZNodes
- Throws:
Exception
-
validateRecreateClusterWithUserDisabled
private void validateRecreateClusterWithUserDisabled(boolean cleanupWALs, boolean cleanUpZNodes) throws Exception - Throws:
Exception
-
validateRecreateClusterWithUserTableEnabled
private void validateRecreateClusterWithUserTableEnabled(boolean cleanupWALs, boolean cleanUpZNodes) throws Exception - Throws:
Exception
-
restartHBaseCluster
- Throws:
Exception
-
prepareDataBeforeRecreate
private void prepareDataBeforeRecreate(HBaseTestingUtility testUtil, org.apache.hadoop.hbase.TableName tableName) throws Exception - Throws:
Exception
-
ensureTableNotColocatedWithSystemTable
private void ensureTableNotColocatedWithSystemTable(org.apache.hadoop.hbase.TableName userTable, org.apache.hadoop.hbase.TableName systemTable) throws IOException, InterruptedException - Throws:
IOException
InterruptedException
-
getServerNumForTableWithOnlyOneRegion
private int getServerNumForTableWithOnlyOneRegion(org.apache.hadoop.hbase.TableName tableName) throws IOException - Throws:
IOException
-
validateDataAfterRecreate
private void validateDataAfterRecreate(HBaseTestingUtility testUtil, org.apache.hadoop.hbase.TableName tableName) throws Exception - Throws:
Exception
-