Class AbstractTestProtobufLog<W extends Closeable>
java.lang.Object
org.apache.hadoop.hbase.regionserver.wal.AbstractTestProtobufLog<W>
- Direct Known Subclasses:
- TestAsyncProtobufLog,- TestProtobufLog
WAL tests that can be reused across providers.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionfinal org.junit.rules.TestNameprotected org.apache.hadoop.fs.Pathprotected org.apache.hadoop.fs.FileSystemprotected static final HBaseTestingUtilityprotected org.apache.hadoop.hbase.wal.WALFactory
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract voidprotected abstract WcreateWriter(org.apache.hadoop.fs.Path path) private voiddoRead(boolean withTrailer) Appends entries in the WAL and reads it.voidsetUp()static voidprotected abstract voidvoidtearDown()static voidvoidReads the WAL with and without WALTrailer.
- 
Field Details- 
TEST_UTIL
- 
fs
- 
dir
- 
wals
- 
currentTest
 
- 
- 
Constructor Details- 
AbstractTestProtobufLogpublic AbstractTestProtobufLog()
 
- 
- 
Method Details- 
setUp- Throws:
- Exception
 
- 
tearDown- Throws:
- Exception
 
- 
setUpBeforeClass- Throws:
- Exception
 
- 
tearDownAfterClass- Throws:
- Exception
 
- 
testWALTrailerReads the WAL with and without WALTrailer.- Throws:
- IOException
 
- 
doReadAppends entries in the WAL and reads it.- Parameters:
- withTrailer- If 'withTrailer' is true, it calls a close on the WALwriter before reading so that a trailer is appended to the WAL. Otherwise, it starts reading after the sync call. This means that reader is not aware of the trailer. In this scenario, if the reader tries to read the trailer in its next() call, it returns false from ProtoBufLogReader.
- Throws:
- IOException
 
- 
createWriter- Throws:
- IOException
 
- 
appendprotected abstract void append(W writer, org.apache.hadoop.hbase.wal.WAL.Entry entry) throws IOException - Throws:
- IOException
 
- 
sync- Throws:
- IOException
 
 
-