Class AbstractTestLogRolling
java.lang.Object
org.apache.hadoop.hbase.regionserver.wal.AbstractTestLogRolling
- Direct Known Subclasses:
TestAsyncLogRolling
,TestLogRolling
Test log deletion as logs are rolled.
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.apache.hadoop.hbase.client.Admin
protected MiniHBaseCluster
protected org.apache.hadoop.hdfs.MiniDFSCluster
protected static ScheduledExecutorService
protected org.apache.hadoop.fs.FileSystem
private static final org.slf4j.Logger
final org.junit.rules.TestName
private static int
protected org.apache.hadoop.hbase.regionserver.HRegionServer
private static final AtomicBoolean
protected static int
protected String
protected static final HBaseTestingUtility
protected byte[]
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final 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 final 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
private void
void
tearDown()
static void
void
Tests that logs are deleted when some region has a compaction record in WAL and no other records.void
Tests that logs are deletedvoid
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)
-
Field Details
-
LOG
-
server
-
tableName
-
value
-
fs
-
dfsCluster
-
admin
-
cluster
-
TEST_UTIL
-
name
-
syncLatencyMillis
-
rowNum
-
slowSyncHookCalled
-
EXECUTOR
-
-
Constructor Details
-
AbstractTestLogRolling
public AbstractTestLogRolling()
-
-
Method Details
-
setUpBeforeClass
- Throws:
Exception
-
setUp
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
tearDownAfterClass
-
startAndWriteData
- Throws:
IOException
InterruptedException
-
setSyncLatencyMillis
-
getWALAndRegisterSlowSyncHook
protected final org.apache.hadoop.hbase.regionserver.wal.AbstractFSWAL<?> getWALAndRegisterSlowSyncHook(org.apache.hadoop.hbase.client.RegionInfo region) throws IOException - Throws:
IOException
-
checkSlowSync
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 - Throws:
Exception
-
setSlowLogWriter
-
setDefaultLogWriter
-
testLogRollOnNothingWritten
Tests that log rolling doesn't hang when no data is written.- Throws:
Exception
-
testLogRolling
Tests that logs are deleted- Throws:
Exception
-
getName
-
writeData
- Throws:
IOException
-
validateData
- Throws:
IOException
-
testCompactionRecordDoesntBlockRolling
Tests that logs are deleted when some region has a compaction record in WAL and no other records. See HBASE-8597.- Throws:
Exception
-
doPut
- Throws:
IOException
-
createTestTable
- Throws:
IOException
-