Class TestWALMonotonicallyIncreasingSeqId
java.lang.Object
org.apache.hadoop.hbase.regionserver.TestWALMonotonicallyIncreasingSeqId
Test for HBASE-17471.
MVCCPreAssign is added by HBASE-16698, but pre-assign mvcc is only used in put/delete path. Other write paths like increment/append still assign mvcc in ringbuffer's consumer thread. If put and increment are used parallel. Then seqid in WAL may not increase monotonically Disorder in wals will lead to data loss.
This case use two thread to put and increment at the same time in a single region. Then check the seqid in WAL. If seqid is wal is not monotonically increasing, this case will fail
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassclass -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate org.apache.hadoop.fs.FileSystem(package private) CountDownLatchprivate final org.slf4j.Loggerorg.junit.rules.TestNameprivate org.apache.hadoop.hbase.regionserver.HRegionprivate static final HBaseTestingUtilityprivate static org.apache.hadoop.fs.Pathprivate org.apache.hadoop.conf.Configurationprivate org.apache.hadoop.hbase.wal.WALFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.hadoop.hbase.wal.WALStreamReadercreateReader(org.apache.hadoop.fs.Path logPath, org.apache.hadoop.fs.Path oldWalsDir) data()private org.apache.hadoop.hbase.client.TableDescriptorgetTableDesc(org.apache.hadoop.hbase.TableName tableName, byte[]... families) private org.apache.hadoop.hbase.regionserver.HRegioninitHRegion(org.apache.hadoop.hbase.client.TableDescriptor htd, byte[] startKey, byte[] stopKey, int replicaId) voidsetUp()voidtearDown()static voidvoid
-
Field Details
-
CLASS_RULE
-
LOG
-
TEST_UTIL
-
testDir
-
wals
-
fileSystem
-
walConf
-
region
-
walProvider
-
name
-
latch
-
-
Constructor Details
-
TestWALMonotonicallyIncreasingSeqId
public TestWALMonotonicallyIncreasingSeqId()
-
-
Method Details
-
data
-
getTableDesc
private org.apache.hadoop.hbase.client.TableDescriptor getTableDesc(org.apache.hadoop.hbase.TableName tableName, byte[]... families) -
initHRegion
private org.apache.hadoop.hbase.regionserver.HRegion initHRegion(org.apache.hadoop.hbase.client.TableDescriptor htd, byte[] startKey, byte[] stopKey, int replicaId) throws IOException - Throws:
IOException
-
setUp
- Throws:
IOException
-
tearDown
- Throws:
IOException
-
tearDownAfterClass
- Throws:
IOException
-
createReader
private org.apache.hadoop.hbase.wal.WALStreamReader createReader(org.apache.hadoop.fs.Path logPath, org.apache.hadoop.fs.Path oldWalsDir) throws IOException - Throws:
IOException
-
testWALMonotonicallyIncreasingSeqId
- Throws:
Exception
-