Class TestReversibleScanners
java.lang.Object
org.apache.hadoop.hbase.regionserver.TestReversibleScanners
Test cases against ReversibleKeyValueScanner
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static byte[]
private static final org.slf4j.Logger
private static int
org.junit.rules.TestName
private static byte[]
private static byte[][]
private static final int
private static byte[]
private static byte[][]
private static final int
(package private) HBaseTestingUtil
private static long
private static byte[]
private static byte[][]
private static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.hadoop.hbase.KeyValue
getNextReadableKeyValueWithBackwardScan
(int startRowNum, int startQualNum, int readPoint) getNextReadableNumWithBackwardScan
(int startRowNum, int startQualNum, int readPoint) private org.apache.hadoop.hbase.regionserver.ReversedKeyValueHeap
getReversibleKeyValueHeap
(org.apache.hadoop.hbase.regionserver.MemStore memstore, org.apache.hadoop.hbase.regionserver.HStoreFile sf1, org.apache.hadoop.hbase.regionserver.HStoreFile sf2, byte[] startRow, int readPoint) private org.apache.hadoop.hbase.regionserver.StoreScanner
getReversibleStoreScanner
(org.apache.hadoop.hbase.regionserver.MemStore memstore, org.apache.hadoop.hbase.regionserver.HStoreFile sf1, org.apache.hadoop.hbase.regionserver.HStoreFile sf2, org.apache.hadoop.hbase.client.Scan scan, org.apache.hadoop.hbase.regionserver.ScanInfo scanInfo, int readPoint) private List<org.apache.hadoop.hbase.regionserver.KeyValueScanner>
getScanners
(org.apache.hadoop.hbase.regionserver.MemStore memstore, org.apache.hadoop.hbase.regionserver.HStoreFile sf1, org.apache.hadoop.hbase.regionserver.HStoreFile sf2, byte[] startRow, boolean doSeek, int readPoint) private void
internalTestSeekAndNextForReversibleKeyValueHeap
(org.apache.hadoop.hbase.regionserver.ReversedKeyValueHeap kvHeap, int startRowNum) private static void
loadDataToRegion
(org.apache.hadoop.hbase.regionserver.HRegion region, byte[] additionalFamily) private static org.apache.hadoop.hbase.KeyValue
makeKV
(int rowNum, int cqNum) private static org.apache.hadoop.hbase.KeyValue
makeKV
(int rowNum, int cqNum, byte[] familyName) private static long
makeMVCC
(int rowNum, int cqNum) private static byte[][]
makeN
(byte[] base, int n) private void
seekTestOfReversibleKeyValueScanner
(org.apache.hadoop.hbase.regionserver.KeyValueScanner scanner) private void
seekTestOfReversibleKeyValueScannerWithMVCC
(List<? extends org.apache.hadoop.hbase.regionserver.KeyValueScanner> scanners, int readPoint) static void
setUp()
void
void
void
void
void
private void
verifyCountAndOrder
(org.apache.hadoop.hbase.regionserver.InternalScanner scanner, int expectedKVCount, int expectedRowCount, boolean forward) private static void
writeMemstore
(org.apache.hadoop.hbase.regionserver.MemStore memstore) private static void
writeMemstoreAndStoreFiles
(org.apache.hadoop.hbase.regionserver.MemStore memstore, org.apache.hadoop.hbase.regionserver.StoreFileWriter[] writers) private static void
writeStoreFile
(org.apache.hadoop.hbase.regionserver.StoreFileWriter writer)
-
Field Details
-
CLASS_RULE
-
LOG
-
TEST_UTIL
-
FAMILYNAME
-
TS
-
MAXMVCC
-
ROW
-
ROWSIZE
- See Also:
-
ROWS
-
QUAL
-
QUALSIZE
- See Also:
-
QUALS
-
VALUE
-
VALUESIZE
- See Also:
-
VALUES
-
name
-
-
Constructor Details
-
TestReversibleScanners
public TestReversibleScanners()
-
-
Method Details
-
setUp
-
testReversibleStoreFileScanner
- Throws:
IOException
-
testReversibleMemstoreScanner
- Throws:
IOException
-
testReversibleKeyValueHeap
- Throws:
IOException
-
testReversibleStoreScanner
- Throws:
IOException
-
testReversibleRegionScanner
- Throws:
IOException
-
getReversibleStoreScanner
private org.apache.hadoop.hbase.regionserver.StoreScanner getReversibleStoreScanner(org.apache.hadoop.hbase.regionserver.MemStore memstore, org.apache.hadoop.hbase.regionserver.HStoreFile sf1, org.apache.hadoop.hbase.regionserver.HStoreFile sf2, org.apache.hadoop.hbase.client.Scan scan, org.apache.hadoop.hbase.regionserver.ScanInfo scanInfo, int readPoint) throws IOException - Throws:
IOException
-
verifyCountAndOrder
private void verifyCountAndOrder(org.apache.hadoop.hbase.regionserver.InternalScanner scanner, int expectedKVCount, int expectedRowCount, boolean forward) throws IOException - Throws:
IOException
-
internalTestSeekAndNextForReversibleKeyValueHeap
private void internalTestSeekAndNextForReversibleKeyValueHeap(org.apache.hadoop.hbase.regionserver.ReversedKeyValueHeap kvHeap, int startRowNum) throws IOException - Throws:
IOException
-
getReversibleKeyValueHeap
private org.apache.hadoop.hbase.regionserver.ReversedKeyValueHeap getReversibleKeyValueHeap(org.apache.hadoop.hbase.regionserver.MemStore memstore, org.apache.hadoop.hbase.regionserver.HStoreFile sf1, org.apache.hadoop.hbase.regionserver.HStoreFile sf2, byte[] startRow, int readPoint) throws IOException - Throws:
IOException
-
getScanners
private List<org.apache.hadoop.hbase.regionserver.KeyValueScanner> getScanners(org.apache.hadoop.hbase.regionserver.MemStore memstore, org.apache.hadoop.hbase.regionserver.HStoreFile sf1, org.apache.hadoop.hbase.regionserver.HStoreFile sf2, byte[] startRow, boolean doSeek, int readPoint) throws IOException - Throws:
IOException
-
seekTestOfReversibleKeyValueScanner
private void seekTestOfReversibleKeyValueScanner(org.apache.hadoop.hbase.regionserver.KeyValueScanner scanner) throws IOException - Throws:
IOException
-
seekTestOfReversibleKeyValueScannerWithMVCC
private void seekTestOfReversibleKeyValueScannerWithMVCC(List<? extends org.apache.hadoop.hbase.regionserver.KeyValueScanner> scanners, int readPoint) throws IOException - Throws:
IOException
-
getNextReadableKeyValueWithBackwardScan
private org.apache.hadoop.hbase.KeyValue getNextReadableKeyValueWithBackwardScan(int startRowNum, int startQualNum, int readPoint) -
getNextReadableNumWithBackwardScan
private org.apache.hadoop.hbase.util.Pair<Integer,Integer> getNextReadableNumWithBackwardScan(int startRowNum, int startQualNum, int readPoint) -
loadDataToRegion
private static void loadDataToRegion(org.apache.hadoop.hbase.regionserver.HRegion region, byte[] additionalFamily) throws IOException - Throws:
IOException
-
writeMemstoreAndStoreFiles
private static void writeMemstoreAndStoreFiles(org.apache.hadoop.hbase.regionserver.MemStore memstore, org.apache.hadoop.hbase.regionserver.StoreFileWriter[] writers) throws IOException - Throws:
IOException
-
writeStoreFile
private static void writeStoreFile(org.apache.hadoop.hbase.regionserver.StoreFileWriter writer) throws IOException - Throws:
IOException
-
writeMemstore
private static void writeMemstore(org.apache.hadoop.hbase.regionserver.MemStore memstore) throws IOException - Throws:
IOException
-
makeKV
-
makeKV
-
makeMVCC
-
makeN
-