Class TestWALRecordReader
java.lang.Object
org.apache.hadoop.hbase.mapreduce.TestWALRecordReader
JUnit tests for the WALRecordReader
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static org.apache.hadoop.conf.Configuration
private static final byte[]
private static org.apache.hadoop.fs.FileSystem
private static org.apache.hadoop.fs.Path
(package private) static final org.apache.hadoop.hbase.client.RegionInfo
private static final org.slf4j.Logger
private static org.apache.hadoop.fs.Path
protected org.apache.hadoop.hbase.regionserver.MultiVersionConcurrencyControl
private static final byte[]
protected static NavigableMap<byte[],
Integer> (package private) static final org.apache.hadoop.hbase.TableName
private static final HBaseTestingUtil
private static final byte[]
private static org.apache.hadoop.fs.FileSystem
private static org.apache.hadoop.fs.Path
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static String
getName()
private org.apache.hadoop.hbase.mapreduce.WALInputFormat.WALRecordReader<org.apache.hadoop.hbase.wal.WALKey>
private static String
private org.apache.hadoop.fs.Path
getWALArchiveDir
(org.apache.hadoop.conf.Configuration conf) protected org.apache.hadoop.hbase.wal.WALKeyImpl
getWalKeyImpl
(long time, NavigableMap<byte[], Integer> scopes) void
setUp()
static void
static void
void
Test partial reads from the WALs based on passed time range.private void
testSplit
(org.apache.hadoop.mapreduce.InputSplit split, byte[]... columns) Create a new reader from the split, and match the edits against the passed columns.private void
testSplitWithMovingWAL
(org.apache.hadoop.mapreduce.InputSplit split, byte[] col1, byte[] col2) Create a new reader from the split, match the edits against the passed columns, moving WAL to archive in between readingsvoid
Test basic functionalityvoid
Test WALRecordReader tolerance to moving WAL from active to archive directory
-
Field Details
-
CLASS_RULE
-
LOG
-
TEST_UTIL
-
conf
-
fs
-
hbaseDir
-
walFs
-
walRootDir
-
tableName
-
rowName
-
info
-
family
-
value
-
logDir
-
mvcc
-
scopes
-
-
Constructor Details
-
TestWALRecordReader
public TestWALRecordReader()
-
-
Method Details
-
getName
-
getServerName
-
setUp
- Throws:
Exception
-
setUpBeforeClass
- Throws:
Exception
-
tearDownAfterClass
- Throws:
Exception
-
testPartialRead
Test partial reads from the WALs based on passed time range.- Throws:
Exception
-
testWALRecordReader
Test basic functionality- Throws:
Exception
-
testWALRecordReaderActiveArchiveTolerance
Test WALRecordReader tolerance to moving WAL from active to archive directory- Throws:
Exception
- exception
-
getReader
private org.apache.hadoop.hbase.mapreduce.WALInputFormat.WALRecordReader<org.apache.hadoop.hbase.wal.WALKey> getReader() -
testSplit
private void testSplit(org.apache.hadoop.mapreduce.InputSplit split, byte[]... columns) throws Exception Create a new reader from the split, and match the edits against the passed columns.- Throws:
Exception
-
testSplitWithMovingWAL
private void testSplitWithMovingWAL(org.apache.hadoop.mapreduce.InputSplit split, byte[] col1, byte[] col2) throws Exception Create a new reader from the split, match the edits against the passed columns, moving WAL to archive in between readings- Throws:
Exception
-
getWALArchiveDir
private org.apache.hadoop.fs.Path getWALArchiveDir(org.apache.hadoop.conf.Configuration conf) throws IOException - Throws:
IOException
-