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
FieldsModifier and TypeFieldDescriptionprotected org.apache.hadoop.hbase.client.Adminprotected MiniHBaseClusterprotected org.apache.hadoop.hdfs.MiniDFSClusterprotected static ScheduledExecutorServiceprotected org.apache.hadoop.fs.FileSystemprivate static final org.slf4j.Loggerfinal org.junit.rules.TestNameprivate static intprotected org.apache.hadoop.hbase.regionserver.HRegionServerprivate static final AtomicBooleanprotected static intprotected Stringprotected static final HBaseTestingUtilityprotected byte[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final voidcheckSlowSync(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.TablecreateTestTable(String tableName) protected voiddoPut(org.apache.hadoop.hbase.client.Table table, int i) protected StringgetName()protected final org.apache.hadoop.hbase.regionserver.wal.AbstractFSWAL<?>getWALAndRegisterSlowSyncHook(org.apache.hadoop.hbase.client.RegionInfo region) protected abstract voidsetDefaultLogWriter(org.apache.hadoop.conf.Configuration conf) protected abstract voidsetSlowLogWriter(org.apache.hadoop.conf.Configuration conf) private static voidsetSyncLatencyMillis(int latency) voidsetUp()static voidprivate voidvoidtearDown()static voidvoidTests that logs are deleted when some region has a compaction record in WAL and no other records.voidTests that logs are deletedvoidTests that log rolling doesn't hang when no data is written.(package private) voidvalidateData(org.apache.hadoop.hbase.client.Table table, int rownum) (package private) voidwriteData(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:
IOExceptionInterruptedException
-
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
-