Class TestWALRecordReader
java.lang.Object
org.apache.hadoop.hbase.mapreduce.TestWALRecordReader
JUnit tests for the WALRecordReader
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate static org.apache.hadoop.conf.Configurationprivate static final byte[]private static org.apache.hadoop.fs.FileSystemprivate static org.apache.hadoop.fs.Path(package private) static final org.apache.hadoop.hbase.client.RegionInfoprivate static final org.slf4j.Loggerprivate static org.apache.hadoop.fs.Pathprotected org.apache.hadoop.hbase.regionserver.MultiVersionConcurrencyControlprivate static final byte[]protected static NavigableMap<byte[],Integer> (package private) static final org.apache.hadoop.hbase.TableNameprivate static final HBaseTestingUtilityprivate static final byte[]private static org.apache.hadoop.fs.FileSystemprivate static org.apache.hadoop.fs.Path -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static StringgetName()private org.apache.hadoop.hbase.mapreduce.WALInputFormat.WALRecordReader<org.apache.hadoop.hbase.wal.WALKey>private static Stringprivate org.apache.hadoop.fs.PathgetWALArchiveDir(org.apache.hadoop.conf.Configuration conf) protected org.apache.hadoop.hbase.wal.WALKeyImplgetWalKeyImpl(long time, NavigableMap<byte[], Integer> scopes) voidsetUp()static voidstatic voidvoidTest partial reads from the WALs based on passed time range.private voidtestSplit(org.apache.hadoop.mapreduce.InputSplit split, byte[]... columns) Create a new reader from the split, and match the edits against the passed columns.private voidtestSplitWithMovingWAL(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 readingsvoidTest basic functionality
-
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
-
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
-