Package org.apache.hadoop.hbase.master
Class AbstractTestDLS
java.lang.Object
org.apache.hadoop.hbase.master.AbstractTestDLS
- Direct Known Subclasses:
TestDLSAsyncFSWAL
,TestDLSFSHLog
Base class for testing distributed log splitting.
-
Field Summary
Modifier and TypeFieldDescriptionprivate SingleProcessHBaseCluster
private static byte[]
private org.apache.hadoop.conf.Configuration
private static final org.slf4j.Logger
private org.apache.hadoop.hbase.master.HMaster
org.junit.rules.TestName
private static final int
private static final int
private org.apache.hadoop.hbase.TableName
private static final HBaseTestingUtil
org.junit.rules.TestName
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
abortMaster
(SingleProcessHBaseCluster cluster) void
after()
void
before()
private void
private org.apache.hadoop.hbase.regionserver.HRegionServer
findRSToKill
(boolean hasMetaRegion) Find a RS that has regions of a table.protected abstract String
private org.apache.hadoop.hbase.client.Table
installTable
(int nrs) private org.apache.hadoop.hbase.client.Table
installTable
(int nrs, int existingRegions) void
makeWAL
(org.apache.hadoop.hbase.regionserver.HRegionServer hrs, List<org.apache.hadoop.hbase.client.RegionInfo> regions, int num_edits, int edit_size) void
makeWAL
(org.apache.hadoop.hbase.regionserver.HRegionServer hrs, List<org.apache.hadoop.hbase.client.RegionInfo> regions, int numEdits, int editSize, boolean cleanShutdown) (package private) void
populateDataInTable
(int nrows) private void
putData
(org.apache.hadoop.hbase.regionserver.Region region, byte[] startRow, int numRows, byte[] qf, byte[]... families) static void
setup()
private void
startCluster
(int numRS) static void
tearDown()
void
void
void
private void
waitForCounter
(LongAdder ctr, long oldval, long newval, long timems)
-
Field Details
-
LOG
-
TEST_UTIL
-
NUM_MASTERS
- See Also:
-
NUM_RS
- See Also:
-
COLUMN_FAMILY
-
testName
-
tableName
-
cluster
-
master
-
conf
-
name
-
-
Constructor Details
-
AbstractTestDLS
public AbstractTestDLS()
-
-
Method Details
-
setup
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
getWalProvider
-
startCluster
- Throws:
Exception
-
before
- Throws:
Exception
-
after
- Throws:
Exception
-
testMasterStartsUpWithLogSplittingWork
- Throws:
Exception
-
testThreeRSAbort
- Throws:
Exception
-
testDelayedDeleteOnFailure
- Throws:
Exception
-
installTable
- Throws:
Exception
-
installTable
private org.apache.hadoop.hbase.client.Table installTable(int nrs, int existingRegions) throws Exception - Throws:
Exception
-
populateDataInTable
- Throws:
Exception
-
makeWAL
public void makeWAL(org.apache.hadoop.hbase.regionserver.HRegionServer hrs, List<org.apache.hadoop.hbase.client.RegionInfo> regions, int num_edits, int edit_size) throws IOException - Throws:
IOException
-
makeWAL
public void makeWAL(org.apache.hadoop.hbase.regionserver.HRegionServer hrs, List<org.apache.hadoop.hbase.client.RegionInfo> regions, int numEdits, int editSize, boolean cleanShutdown) throws IOException - Throws:
IOException
-
blockUntilNoRIT
- Throws:
Exception
-
putData
private void putData(org.apache.hadoop.hbase.regionserver.Region region, byte[] startRow, int numRows, byte[] qf, byte[]... families) throws IOException - Throws:
IOException
-
waitForCounter
private void waitForCounter(LongAdder ctr, long oldval, long newval, long timems) throws InterruptedException - Throws:
InterruptedException
-
abortMaster
- Throws:
InterruptedException
-
findRSToKill
private org.apache.hadoop.hbase.regionserver.HRegionServer findRSToKill(boolean hasMetaRegion) throws Exception Find a RS that has regions of a table.- Parameters:
hasMetaRegion
- when true, the returned RS has hbase:meta region as well- Throws:
Exception
-