public abstract class AbstractTestDLS extends Object
Modifier and Type | Field and Description |
---|---|
private MiniHBaseCluster |
cluster |
private static byte[] |
COLUMN_FAMILY |
private org.apache.hadoop.conf.Configuration |
conf |
private static org.slf4j.Logger |
LOG |
private org.apache.hadoop.hbase.master.HMaster |
master |
org.junit.rules.TestName |
name |
private static int |
NUM_MASTERS |
private static int |
NUM_RS |
private org.apache.hadoop.hbase.TableName |
tableName |
private static HBaseTestingUtility |
TEST_UTIL |
org.junit.rules.TestName |
testName |
Constructor and Description |
---|
AbstractTestDLS() |
Modifier and Type | Method and Description |
---|---|
private void |
abortMaster(MiniHBaseCluster cluster) |
void |
after() |
void |
before() |
private void |
blockUntilNoRIT(org.apache.hadoop.hbase.zookeeper.ZKWatcher zkw,
org.apache.hadoop.hbase.master.HMaster master) |
private int |
countWAL(org.apache.hadoop.fs.Path log,
org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.conf.Configuration conf) |
private org.apache.hadoop.hbase.regionserver.HRegionServer |
findRSToKill(boolean hasMetaRegion)
Find a RS that has regions of a table.
|
protected abstract String |
getWalProvider() |
private org.apache.hadoop.hbase.client.Table |
installTable(org.apache.hadoop.hbase.zookeeper.ZKWatcher zkw,
int nrs) |
private org.apache.hadoop.hbase.client.Table |
installTable(org.apache.hadoop.hbase.zookeeper.ZKWatcher zkw,
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 |
testDelayedDeleteOnFailure() |
void |
testMasterStartsUpWithLogSplittingWork() |
void |
testRecoveredEdits() |
void |
testThreeRSAbort() |
void |
testWorkerAbort()
The original intention of this test was to force an abort of a region server and to make sure
that the failure path in the region servers is properly evaluated.
|
private void |
waitForCounter(LongAdder ctr,
long oldval,
long newval,
long timems) |
private static final org.slf4j.Logger LOG
private static final HBaseTestingUtility TEST_UTIL
private static final int NUM_MASTERS
private static final int NUM_RS
private static byte[] COLUMN_FAMILY
public org.junit.rules.TestName testName
private org.apache.hadoop.hbase.TableName tableName
private MiniHBaseCluster cluster
private org.apache.hadoop.hbase.master.HMaster master
private org.apache.hadoop.conf.Configuration conf
public org.junit.rules.TestName name
public AbstractTestDLS()
protected abstract String getWalProvider()
private void startCluster(int numRS) throws Exception
Exception
public void testRecoveredEdits() throws Exception
Exception
public void testMasterStartsUpWithLogSplittingWork() throws Exception
Exception
public void testWorkerAbort() throws Exception
Exception
public void testThreeRSAbort() throws Exception
Exception
public void testDelayedDeleteOnFailure() throws Exception
Exception
private org.apache.hadoop.hbase.client.Table installTable(org.apache.hadoop.hbase.zookeeper.ZKWatcher zkw, int nrs) throws Exception
Exception
private org.apache.hadoop.hbase.client.Table installTable(org.apache.hadoop.hbase.zookeeper.ZKWatcher zkw, int nrs, int existingRegions) throws Exception
Exception
void populateDataInTable(int nrows) throws Exception
Exception
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
IOException
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
IOException
private int countWAL(org.apache.hadoop.fs.Path log, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
private void blockUntilNoRIT(org.apache.hadoop.hbase.zookeeper.ZKWatcher zkw, org.apache.hadoop.hbase.master.HMaster master) throws Exception
Exception
private void putData(org.apache.hadoop.hbase.regionserver.Region region, byte[] startRow, int numRows, byte[] qf, byte[]... families) throws IOException
IOException
private void waitForCounter(LongAdder ctr, long oldval, long newval, long timems) throws InterruptedException
InterruptedException
private void abortMaster(MiniHBaseCluster cluster) throws InterruptedException
InterruptedException
private org.apache.hadoop.hbase.regionserver.HRegionServer findRSToKill(boolean hasMetaRegion) throws Exception
hasMetaRegion
- when true, the returned RS has hbase:meta region as wellException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.