public abstract class AbstractTestLogRolling extends Object
Modifier and Type | Field and Description |
---|---|
protected org.apache.hadoop.hbase.client.Admin |
admin |
protected SingleProcessHBaseCluster |
cluster |
protected org.apache.hadoop.hdfs.MiniDFSCluster |
dfsCluster |
protected static ScheduledExecutorService |
EXECUTOR |
protected org.apache.hadoop.fs.FileSystem |
fs |
private static org.slf4j.Logger |
LOG |
org.junit.rules.TestName |
name |
private static int |
rowNum |
protected org.apache.hadoop.hbase.regionserver.HRegionServer |
server |
private static AtomicBoolean |
slowSyncHookCalled |
protected static int |
syncLatencyMillis |
protected String |
tableName |
protected static HBaseTestingUtil |
TEST_UTIL |
protected byte[] |
value |
Constructor and Description |
---|
AbstractTestLogRolling() |
Modifier and Type | Method and Description |
---|---|
protected void |
checkSlowSync(org.apache.hadoop.hbase.regionserver.wal.AbstractFSWAL<?> log,
org.apache.hadoop.hbase.client.Table table,
int slowSyncLatency,
int writeCount,
boolean slowSync) |
protected org.apache.hadoop.hbase.client.Table |
createTestTable(String tableName) |
protected void |
doPut(org.apache.hadoop.hbase.client.Table table,
int i) |
protected String |
getName() |
protected org.apache.hadoop.hbase.regionserver.wal.AbstractFSWAL<?> |
getWALAndRegisterSlowSyncHook(org.apache.hadoop.hbase.client.RegionInfo region) |
protected abstract void |
setDefaultLogWriter(org.apache.hadoop.conf.Configuration conf) |
protected abstract void |
setSlowLogWriter(org.apache.hadoop.conf.Configuration conf) |
private static void |
setSyncLatencyMillis(int latency) |
void |
setUp() |
static void |
setUpBeforeClass() |
private void |
startAndWriteData() |
void |
tearDown() |
static void |
tearDownAfterClass() |
void |
testCompactionRecordDoesntBlockRolling()
Tests that logs are deleted when some region has a compaction record in WAL and no other
records.
|
void |
testLogRolling()
Tests that logs are deleted
|
void |
testLogRollOnNothingWritten()
Tests that log rolling doesn't hang when no data is written.
|
(package private) void |
validateData(org.apache.hadoop.hbase.client.Table table,
int rownum) |
(package private) void |
writeData(org.apache.hadoop.hbase.client.Table table,
int rownum) |
private static final org.slf4j.Logger LOG
protected org.apache.hadoop.hbase.regionserver.HRegionServer server
protected byte[] value
protected org.apache.hadoop.fs.FileSystem fs
protected org.apache.hadoop.hdfs.MiniDFSCluster dfsCluster
protected org.apache.hadoop.hbase.client.Admin admin
protected SingleProcessHBaseCluster cluster
protected static final HBaseTestingUtil TEST_UTIL
public final org.junit.rules.TestName name
protected static int syncLatencyMillis
private static int rowNum
private static final AtomicBoolean slowSyncHookCalled
protected static ScheduledExecutorService EXECUTOR
public AbstractTestLogRolling()
public static void setUpBeforeClass() throws Exception
Exception
public static void tearDownAfterClass()
private void startAndWriteData() throws IOException, InterruptedException
IOException
InterruptedException
private static void setSyncLatencyMillis(int latency)
protected final org.apache.hadoop.hbase.regionserver.wal.AbstractFSWAL<?> getWALAndRegisterSlowSyncHook(org.apache.hadoop.hbase.client.RegionInfo region) throws IOException
IOException
protected final void checkSlowSync(org.apache.hadoop.hbase.regionserver.wal.AbstractFSWAL<?> log, org.apache.hadoop.hbase.client.Table table, int slowSyncLatency, int writeCount, boolean slowSync) throws Exception
Exception
protected abstract void setSlowLogWriter(org.apache.hadoop.conf.Configuration conf)
protected abstract void setDefaultLogWriter(org.apache.hadoop.conf.Configuration conf)
public void testLogRollOnNothingWritten() throws Exception
Exception
public void testLogRolling() throws Exception
Exception
void writeData(org.apache.hadoop.hbase.client.Table table, int rownum) throws IOException
IOException
void validateData(org.apache.hadoop.hbase.client.Table table, int rownum) throws IOException
IOException
public void testCompactionRecordDoesntBlockRolling() throws Exception
Exception
protected void doPut(org.apache.hadoop.hbase.client.Table table, int i) throws IOException
IOException
protected org.apache.hadoop.hbase.client.Table createTestTable(String tableName) throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.