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
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static final longorg.junit.rules.TestNameprivate static final intprivate static final HBaseTestingUtilprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidensureTableNotColocatedWithSystemTable(org.apache.hadoop.hbase.TableName userTable, org.apache.hadoop.hbase.TableName systemTable) private intgetServerNumForTableWithOnlyOneRegion(org.apache.hadoop.hbase.TableName tableName) private voidprepareDataBeforeRecreate(HBaseTestingUtil testUtil, org.apache.hadoop.hbase.TableName tableName) private voidrestartHBaseCluster(boolean cleanUpWALs, boolean cleanUpZnodes) voidsetup()voidtearDown()voidvoidvoidvoidprivate voidvalidateDataAfterRecreate(HBaseTestingUtil testUtil, org.apache.hadoop.hbase.TableName tableName) private voidvalidateRecreateClusterWithUserDisabled(boolean cleanupWALs, boolean cleanUpZNodes) private voidvalidateRecreateClusterWithUserTableEnabled(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
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
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(HBaseTestingUtil 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:
IOExceptionInterruptedException
-
getServerNumForTableWithOnlyOneRegion
private int getServerNumForTableWithOnlyOneRegion(org.apache.hadoop.hbase.TableName tableName) throws IOException - Throws:
IOException
-
validateDataAfterRecreate
private void validateDataAfterRecreate(HBaseTestingUtil testUtil, org.apache.hadoop.hbase.TableName tableName) throws Exception - Throws:
Exception
-