public class TestSplitTransactionOnCluster extends Object
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
TestSplitTransactionOnCluster.CustomSplitPolicy |
static class |
TestSplitTransactionOnCluster.FailingSplitMasterObserver |
static class |
TestSplitTransactionOnCluster.MyMaster |
(package private) static class |
TestSplitTransactionOnCluster.MyMasterRpcServices |
| Modifier and Type | Field and Description |
|---|---|
private org.apache.hadoop.hbase.client.Admin |
admin |
static HBaseClassTestRule |
CLASS_RULE |
private MiniHBaseCluster |
cluster |
private static org.slf4j.Logger |
LOG |
org.junit.rules.TestName |
name |
private static int |
NB_SERVERS |
(package private) static HBaseTestingUtility |
TESTING_UTIL |
| Constructor and Description |
|---|
TestSplitTransactionOnCluster() |
| Modifier and Type | Method and Description |
|---|---|
private org.apache.hadoop.hbase.master.HMaster |
abortAndWaitForMaster() |
static void |
after() |
private void |
awaitDaughters(org.apache.hadoop.hbase.TableName tableName,
int numDaughters) |
private List<org.apache.hadoop.hbase.regionserver.HRegion> |
awaitTableRegions(org.apache.hadoop.hbase.TableName tableName) |
static void |
before() |
private List<org.apache.hadoop.hbase.regionserver.HRegion> |
checkAndGetDaughters(org.apache.hadoop.hbase.TableName tableName) |
private org.apache.hadoop.hbase.client.Table |
createTableAndWait(org.apache.hadoop.hbase.TableName tableName,
byte[] cf) |
private int |
ensureTableRegionNotOnSameServerAsMeta(org.apache.hadoop.hbase.client.Admin admin,
org.apache.hadoop.hbase.client.RegionInfo hri)
Ensure single table region is not on same server as the single hbase:meta table
region.
|
private org.apache.hadoop.hbase.regionserver.HRegion |
findSplittableRegion(List<org.apache.hadoop.hbase.regionserver.HRegion> regions) |
private org.apache.hadoop.hbase.client.RegionInfo |
getAndCheckSingleTableRegion(List<org.apache.hadoop.hbase.regionserver.HRegion> regions) |
private org.apache.hadoop.hbase.regionserver.HRegionServer |
getOtherRegionServer(MiniHBaseCluster cluster,
org.apache.hadoop.hbase.regionserver.HRegionServer notThisOne)
Find regionserver other than the one passed.
|
private void |
insertData(org.apache.hadoop.hbase.TableName tableName,
org.apache.hadoop.hbase.client.Admin admin,
org.apache.hadoop.hbase.client.Table t) |
private void |
printOutRegions(org.apache.hadoop.hbase.regionserver.HRegionServer hrs,
String prefix) |
private void |
requestSplitRegion(org.apache.hadoop.hbase.regionserver.HRegionServer rsServer,
org.apache.hadoop.hbase.regionserver.Region region,
byte[] midKey) |
void |
setup() |
void |
tearDown() |
void |
testMasterRestartAtRegionSplitPendingCatalogJanitor()
Verifies HBASE-5806.
|
void |
testRITStateForRollback() |
void |
testShutdownFixupWhenDaughterHasSplit()
Test that if daughter split on us, we won't do the shutdown handler fixup just because we can't
find the immediate daughter of an offlined parent.
|
void |
testSplitFailedCompactionAndSplit() |
void |
testSplitRegionWithNoStoreFiles()
If a table has regions that have no store files in a region, they should split successfully
into two regions with no store files.
|
void |
testSplitRollbackOnRegionClosing() |
void |
testSplitShouldNotThrowNPEEvenARegionHasEmptySplitFiles() |
void |
testSplitWithRegionReplicas() |
void |
testStoreFileReferenceCreationWhenSplitPolicySaysToSkipRangeCheck() |
private void |
waitUntilRegionServerDead() |
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private org.apache.hadoop.hbase.client.Admin admin
private MiniHBaseCluster cluster
private static final int NB_SERVERS
static final HBaseTestingUtility TESTING_UTIL
public org.junit.rules.TestName name
public TestSplitTransactionOnCluster()
public void setup() throws IOException
IOExceptionprivate org.apache.hadoop.hbase.client.RegionInfo getAndCheckSingleTableRegion(List<org.apache.hadoop.hbase.regionserver.HRegion> regions) throws IOException, InterruptedException
IOExceptionInterruptedExceptionprivate void requestSplitRegion(org.apache.hadoop.hbase.regionserver.HRegionServer rsServer, org.apache.hadoop.hbase.regionserver.Region region, byte[] midKey) throws IOException
IOExceptionpublic void testRITStateForRollback() throws Exception
Exceptionpublic void testSplitFailedCompactionAndSplit() throws Exception
Exceptionpublic void testSplitRollbackOnRegionClosing() throws Exception
Exceptionpublic void testShutdownFixupWhenDaughterHasSplit() throws Exception
Exceptionpublic void testSplitShouldNotThrowNPEEvenARegionHasEmptySplitFiles() throws Exception
Exceptionpublic void testMasterRestartAtRegionSplitPendingCatalogJanitor() throws IOException, InterruptedException, org.apache.zookeeper.KeeperException.NodeExistsException, org.apache.zookeeper.KeeperException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceException, ExecutionException, TimeoutException
IOExceptionInterruptedExceptionorg.apache.zookeeper.KeeperException.NodeExistsExceptionorg.apache.zookeeper.KeeperExceptionorg.apache.hbase.thirdparty.com.google.protobuf.ServiceExceptionExecutionExceptionTimeoutExceptionpublic void testSplitWithRegionReplicas() throws Exception
Exceptionprivate void insertData(org.apache.hadoop.hbase.TableName tableName, org.apache.hadoop.hbase.client.Admin admin, org.apache.hadoop.hbase.client.Table t) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void testSplitRegionWithNoStoreFiles() throws Exception
Exceptionpublic void testStoreFileReferenceCreationWhenSplitPolicySaysToSkipRangeCheck() throws Exception
Exceptionprivate org.apache.hadoop.hbase.regionserver.HRegion findSplittableRegion(List<org.apache.hadoop.hbase.regionserver.HRegion> regions) throws InterruptedException
InterruptedExceptionprivate List<org.apache.hadoop.hbase.regionserver.HRegion> checkAndGetDaughters(org.apache.hadoop.hbase.TableName tableName) throws InterruptedException
InterruptedExceptionprivate org.apache.hadoop.hbase.master.HMaster abortAndWaitForMaster() throws IOException, InterruptedException
IOExceptionInterruptedExceptionprivate int ensureTableRegionNotOnSameServerAsMeta(org.apache.hadoop.hbase.client.Admin admin, org.apache.hadoop.hbase.client.RegionInfo hri) throws IOException, org.apache.hadoop.hbase.MasterNotRunningException, org.apache.hadoop.hbase.ZooKeeperConnectionException, InterruptedException
admin - hri - org.apache.hadoop.hbase.UnknownRegionExceptionorg.apache.hadoop.hbase.MasterNotRunningExceptionorg.apache.hadoop.hbase.ZooKeeperConnectionExceptionInterruptedExceptionIOExceptionprivate org.apache.hadoop.hbase.regionserver.HRegionServer getOtherRegionServer(MiniHBaseCluster cluster, org.apache.hadoop.hbase.regionserver.HRegionServer notThisOne)
cluster - notThisOne - notThisOne or null if none
foundprivate void printOutRegions(org.apache.hadoop.hbase.regionserver.HRegionServer hrs, String prefix) throws IOException
IOExceptionprivate void waitUntilRegionServerDead() throws InterruptedException, IOException
InterruptedExceptionIOExceptionprivate void awaitDaughters(org.apache.hadoop.hbase.TableName tableName, int numDaughters) throws InterruptedException
InterruptedExceptionprivate List<org.apache.hadoop.hbase.regionserver.HRegion> awaitTableRegions(org.apache.hadoop.hbase.TableName tableName) throws InterruptedException
InterruptedExceptionprivate org.apache.hadoop.hbase.client.Table createTableAndWait(org.apache.hadoop.hbase.TableName tableName, byte[] cf) throws IOException, InterruptedException
IOExceptionInterruptedExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.