Class TestRegionMergeTransactionOnCluster
java.lang.Object
org.apache.hadoop.hbase.regionserver.TestRegionMergeTransactionOnCluster
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static org.apache.hadoop.hbase.client.Adminstatic final HBaseClassTestRuleprivate static final byte[]private static final intprivate static final org.slf4j.Loggerprivate static org.apache.hadoop.hbase.master.HMasterorg.junit.rules.TestNameprivate static final intprivate static final byte[]private static byte[]private static byte[][]private static final int(package private) static final HBaseTestingUtilprivate static int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic voidprivate org.apache.hadoop.hbase.client.TablecreateTableAndLoadData(org.apache.hadoop.hbase.master.HMaster master, org.apache.hadoop.hbase.TableName tablename) private org.apache.hadoop.hbase.client.TablecreateTableAndLoadData(org.apache.hadoop.hbase.master.HMaster master, org.apache.hadoop.hbase.TableName tablename, int numRegions, int replication) private voidloadData(org.apache.hadoop.hbase.client.Table table) private static byte[][]makeN(byte[] base, int n) private org.apache.hadoop.hbase.util.PairOfSameType<org.apache.hadoop.hbase.client.RegionInfo>mergeRegionsAndVerifyRegionNum(org.apache.hadoop.hbase.master.HMaster master, org.apache.hadoop.hbase.TableName tablename, int regionAnum, int regionBnum, int expectedRegionNum) private org.apache.hadoop.hbase.util.PairOfSameType<org.apache.hadoop.hbase.client.RegionInfo>requestMergeRegion(org.apache.hadoop.hbase.master.HMaster master, org.apache.hadoop.hbase.TableName tablename, int regionAnum, int regionBnum) voidvoidThis test tests 1, merging region not online; 2, merging same two regions; 3, merging unknown regions.voidNot really restarting the master.voidvoidprivate voidverifyRowCount(org.apache.hadoop.hbase.client.Table table, int expectedRegionNum) private voidwaitAndVerifyRegionNum(org.apache.hadoop.hbase.master.HMaster master, org.apache.hadoop.hbase.TableName tablename, int expectedRegionNum)
-
Field Details
-
CLASS_RULE
-
LOG
-
name
-
NB_SERVERS
- See Also:
-
FAMILYNAME
-
QUALIFIER
-
ROW
-
INITIAL_REGION_NUM
- See Also:
-
ROWSIZE
- See Also:
-
ROWS
-
waitTime
-
TEST_UTIL
-
MASTER
-
ADMIN
-
-
Constructor Details
-
TestRegionMergeTransactionOnCluster
public TestRegionMergeTransactionOnCluster()
-
-
Method Details
-
beforeAllTests
- Throws:
Exception
-
afterAllTests
- Throws:
Exception
-
testWholesomeMerge
- Throws:
Exception
-
testMergeAndRestartingMaster
Not really restarting the master. Simulate it by clear of new region state since it is not persisted, will be lost after master restarts.- Throws:
Exception
-
testCleanMergeReference
- Throws:
Exception
-
testMerge
This test tests 1, merging region not online; 2, merging same two regions; 3, merging unknown regions. They are in one test case so that we don't have to create many tables, and these tests are simple.- Throws:
Exception
-
testMergeWithReplicas
- Throws:
Exception
-
mergeRegionsAndVerifyRegionNum
private org.apache.hadoop.hbase.util.PairOfSameType<org.apache.hadoop.hbase.client.RegionInfo> mergeRegionsAndVerifyRegionNum(org.apache.hadoop.hbase.master.HMaster master, org.apache.hadoop.hbase.TableName tablename, int regionAnum, int regionBnum, int expectedRegionNum) throws Exception - Throws:
Exception
-
requestMergeRegion
private org.apache.hadoop.hbase.util.PairOfSameType<org.apache.hadoop.hbase.client.RegionInfo> requestMergeRegion(org.apache.hadoop.hbase.master.HMaster master, org.apache.hadoop.hbase.TableName tablename, int regionAnum, int regionBnum) throws Exception - Throws:
Exception
-
waitAndVerifyRegionNum
private void waitAndVerifyRegionNum(org.apache.hadoop.hbase.master.HMaster master, org.apache.hadoop.hbase.TableName tablename, int expectedRegionNum) throws Exception - Throws:
Exception
-
createTableAndLoadData
private org.apache.hadoop.hbase.client.Table createTableAndLoadData(org.apache.hadoop.hbase.master.HMaster master, org.apache.hadoop.hbase.TableName tablename) throws Exception - Throws:
Exception
-
createTableAndLoadData
private org.apache.hadoop.hbase.client.Table createTableAndLoadData(org.apache.hadoop.hbase.master.HMaster master, org.apache.hadoop.hbase.TableName tablename, int numRegions, int replication) throws Exception - Throws:
Exception
-
makeN
-
loadData
- Throws:
IOException
-
verifyRowCount
private void verifyRowCount(org.apache.hadoop.hbase.client.Table table, int expectedRegionNum) throws IOException - Throws:
IOException
-