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() |
private void |
split(org.apache.hadoop.hbase.client.RegionInfo hri,
org.apache.hadoop.hbase.regionserver.HRegionServer server,
int regionCount) |
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
IOException
private org.apache.hadoop.hbase.client.RegionInfo getAndCheckSingleTableRegion(List<org.apache.hadoop.hbase.regionserver.HRegion> regions) throws IOException, InterruptedException
IOException
InterruptedException
private void requestSplitRegion(org.apache.hadoop.hbase.regionserver.HRegionServer rsServer, org.apache.hadoop.hbase.regionserver.Region region, byte[] midKey) throws IOException
IOException
public void testRITStateForRollback() throws Exception
Exception
public void testSplitFailedCompactionAndSplit() throws Exception
Exception
public void testSplitRollbackOnRegionClosing() throws IOException, InterruptedException
IOException
InterruptedException
public void testShutdownFixupWhenDaughterHasSplit() throws IOException, InterruptedException
IOException
InterruptedException
public void testSplitShouldNotThrowNPEEvenARegionHasEmptySplitFiles() throws Exception
Exception
public void testMasterRestartAtRegionSplitPendingCatalogJanitor() throws IOException, InterruptedException, org.apache.zookeeper.KeeperException.NodeExistsException, org.apache.zookeeper.KeeperException, org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
IOException
InterruptedException
org.apache.zookeeper.KeeperException.NodeExistsException
org.apache.zookeeper.KeeperException
org.apache.hbase.thirdparty.com.google.protobuf.ServiceException
public void testSplitWithRegionReplicas() throws Exception
Exception
private 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
IOException
InterruptedException
public void testSplitRegionWithNoStoreFiles() throws Exception
Exception
public void testStoreFileReferenceCreationWhenSplitPolicySaysToSkipRangeCheck() throws Exception
Exception
private org.apache.hadoop.hbase.regionserver.HRegion findSplittableRegion(List<org.apache.hadoop.hbase.regionserver.HRegion> regions) throws InterruptedException
InterruptedException
private List<org.apache.hadoop.hbase.regionserver.HRegion> checkAndGetDaughters(org.apache.hadoop.hbase.TableName tableName) throws InterruptedException
InterruptedException
private org.apache.hadoop.hbase.master.HMaster abortAndWaitForMaster() throws IOException, InterruptedException
IOException
InterruptedException
private void split(org.apache.hadoop.hbase.client.RegionInfo hri, org.apache.hadoop.hbase.regionserver.HRegionServer server, int regionCount) throws IOException, InterruptedException
IOException
InterruptedException
private 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.UnknownRegionException
org.apache.hadoop.hbase.MasterNotRunningException
org.apache.hadoop.hbase.ZooKeeperConnectionException
InterruptedException
IOException
private 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
IOException
private void waitUntilRegionServerDead() throws InterruptedException, IOException
InterruptedException
IOException
private void awaitDaughters(org.apache.hadoop.hbase.TableName tableName, int numDaughters) throws InterruptedException
InterruptedException
private List<org.apache.hadoop.hbase.regionserver.HRegion> awaitTableRegions(org.apache.hadoop.hbase.TableName tableName) throws InterruptedException
InterruptedException
private org.apache.hadoop.hbase.client.Table createTableAndWait(org.apache.hadoop.hbase.TableName tableName, byte[] cf) throws IOException, InterruptedException
IOException
InterruptedException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.