Class WALDurabilityTestBase<T extends org.apache.hadoop.hbase.wal.WAL>
java.lang.Object
org.apache.hadoop.hbase.regionserver.wal.WALDurabilityTestBase<T>
- Direct Known Subclasses:
TestAsyncFSWALDurability
,TestFSHLogDurability
public abstract class WALDurabilityTestBase<T extends org.apache.hadoop.hbase.wal.WAL>
extends Object
Tests for WAL write durability - hflush vs hsync
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final String
private static final byte[]
private org.apache.hadoop.conf.Configuration
private String
org.junit.rules.TestName
protected org.apache.hadoop.hbase.TableName
private static final HBaseTestingUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate String
getName()
protected abstract Boolean
getSyncFlag
(T wal) protected abstract T
getWAL
(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path root, String logDir, org.apache.hadoop.conf.Configuration conf) protected abstract Boolean
getWriterSyncFlag
(T wal) static org.apache.hadoop.hbase.regionserver.HRegion
initHRegion
(org.apache.hadoop.hbase.TableName tableName, byte[] startKey, byte[] stopKey, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.wal.WAL wal) protected abstract void
resetSyncFlag
(T wal) void
setUp()
void
tearDown()
void
-
Field Details
-
COLUMN_FAMILY
- See Also:
-
COLUMN_FAMILY_BYTES
-
TEST_UTIL
-
conf
-
dir
-
name
-
tableName
-
-
Constructor Details
-
WALDurabilityTestBase
public WALDurabilityTestBase()
-
-
Method Details
-
setUp
- Throws:
IOException
-
tearDown
- Throws:
IOException
-
getWAL
protected abstract T getWAL(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path root, String logDir, org.apache.hadoop.conf.Configuration conf) throws IOException - Throws:
IOException
-
resetSyncFlag
-
getSyncFlag
-
getWriterSyncFlag
-
testWALDurability
- Throws:
IOException
-
getName
-
initHRegion
public static org.apache.hadoop.hbase.regionserver.HRegion initHRegion(org.apache.hadoop.hbase.TableName tableName, byte[] startKey, byte[] stopKey, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.wal.WAL wal) throws IOException - Returns:
- A region on which you must call
HBaseTestingUtil.closeRegionAndWAL(HRegion)
when done. - Throws:
IOException
-