public class TestScanner extends Object
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private byte[] |
col1 |
private static byte[][] |
COLS |
private static byte[][] |
EXPLICIT_COLS |
private static byte[] |
FIRST_ROW |
private byte[] |
firstRowBytes |
private static org.slf4j.Logger |
LOG |
org.junit.rules.TestName |
name |
private org.apache.hadoop.hbase.regionserver.HRegion |
region |
static org.apache.hadoop.hbase.HRegionInfo |
REGION_INFO
HRegionInfo for root region
|
private static byte[] |
ROW_KEY |
private byte[] |
secondRowBytes |
private static long |
START_CODE |
private static HBaseTestingUtility |
TEST_UTIL |
(package private) static org.apache.hadoop.hbase.HTableDescriptor |
TESTTABLEDESC |
private byte[] |
thirdRowBytes |
Constructor and Description |
---|
TestScanner() |
Modifier and Type | Method and Description |
---|---|
private int |
count(org.apache.hadoop.hbase.client.Table countTable,
int flushIndex,
boolean concurrent) |
private org.apache.hadoop.hbase.Cell |
getColumn(List<org.apache.hadoop.hbase.Cell> kvs,
byte[] family,
byte[] qualifier) |
private void |
getRegionInfo(org.apache.hadoop.hbase.client.Table table)
Use get to retrieve the HRegionInfo and validate it
|
private boolean |
hasColumn(List<org.apache.hadoop.hbase.Cell> kvs,
byte[] family,
byte[] qualifier) |
(package private) void |
rowInclusiveStopFilter(org.apache.hadoop.hbase.client.Scan scan,
byte[] stopRow) |
(package private) void |
rowPrefixFilter(org.apache.hadoop.hbase.client.Scan scan) |
private void |
scan(boolean validateStartcode,
String serverName)
Use a scanner to get the region info and then validate the results
|
void |
testFilters() |
void |
testRaceBetweenClientAndTimeout()
Test that closing a scanner while a client is using it doesn't throw
NPEs but instead a UnknownScannerException.
|
void |
testScanAndConcurrentMajorCompact()
Make sure scanner returns correct result when we run a major compaction
with deletes.
|
void |
testScanAndRealConcurrentFlush()
Tests to do a concurrent flush (using a 2nd thread) while scanning.
|
void |
testScanAndSyncFlush()
Tests to do a sync flush during the middle of a scan.
|
void |
testScanner()
The test!
|
void |
testStopRow()
Test basic stop row filter works.
|
private void |
validateRegionInfo(byte[] regionBytes)
Compare the HRegionInfo we read from HBase to what we stored
|
public static final HBaseClassTestRule CLASS_RULE
public org.junit.rules.TestName name
private static final org.slf4j.Logger LOG
private static final HBaseTestingUtility TEST_UTIL
private static final byte[] FIRST_ROW
private static final byte[][] COLS
private static final byte[][] EXPLICIT_COLS
static final org.apache.hadoop.hbase.HTableDescriptor TESTTABLEDESC
public static final org.apache.hadoop.hbase.HRegionInfo REGION_INFO
private static final byte[] ROW_KEY
private static final long START_CODE
private org.apache.hadoop.hbase.regionserver.HRegion region
private byte[] firstRowBytes
private byte[] secondRowBytes
private byte[] thirdRowBytes
private final byte[] col1
public TestScanner()
public void testStopRow() throws Exception
Exception
void rowPrefixFilter(org.apache.hadoop.hbase.client.Scan scan) throws IOException
IOException
void rowInclusiveStopFilter(org.apache.hadoop.hbase.client.Scan scan, byte[] stopRow) throws IOException
IOException
public void testFilters() throws IOException
IOException
public void testRaceBetweenClientAndTimeout() throws Exception
Exception
public void testScanner() throws IOException
IOException
private void validateRegionInfo(byte[] regionBytes) throws IOException
IOException
private void scan(boolean validateStartcode, String serverName) throws IOException
IOException
private boolean hasColumn(List<org.apache.hadoop.hbase.Cell> kvs, byte[] family, byte[] qualifier)
private org.apache.hadoop.hbase.Cell getColumn(List<org.apache.hadoop.hbase.Cell> kvs, byte[] family, byte[] qualifier)
private void getRegionInfo(org.apache.hadoop.hbase.client.Table table) throws IOException
IOException
public void testScanAndSyncFlush() throws Exception
Exception
public void testScanAndRealConcurrentFlush() throws Exception
Exception
public void testScanAndConcurrentMajorCompact() throws Exception
Exception
private int count(org.apache.hadoop.hbase.client.Table countTable, int flushIndex, boolean concurrent) throws IOException
IOException
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.