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
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static final byte[]private org.apache.hadoop.conf.Configurationprivate Stringorg.junit.rules.TestNameprotected org.apache.hadoop.hbase.TableNameprivate static final HBaseTestingUtil -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringgetName()protected abstract BooleangetSyncFlag(T wal) protected final TgetWAL(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path root, String logDir, org.apache.hadoop.conf.Configuration conf) protected abstract TgetWAL0(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path root, String logDir, org.apache.hadoop.conf.Configuration conf) protected abstract BooleangetWriterSyncFlag(T wal) static org.apache.hadoop.hbase.regionserver.HRegioninitHRegion(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 voidresetSyncFlag(T wal) voidsetUp()voidtearDown()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 final 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
-
getWAL0
protected abstract T getWAL0(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
-