Class TestBlocksRead
java.lang.Object
org.apache.hadoop.hbase.regionserver.TestBlocksRead
-
Field Summary
Modifier and TypeFieldDescription(package private) static final org.apache.hadoop.hbase.regionserver.BloomType[]
static final HBaseClassTestRule
private org.apache.hadoop.conf.Configuration
private final String
private static final org.slf4j.Logger
(package private) org.apache.hadoop.hbase.regionserver.HRegion
private static HBaseTestingUtility
org.junit.rules.TestName
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
deleteFamily
(String family, String row, long version) private static byte[]
private static long
getBlkAccessCount
(byte[] cf) private org.apache.hadoop.hbase.Cell[]
private org.apache.hadoop.hbase.Cell[]
getData
(String family, String row, String column, int expBlocksRowCol, int expBlocksRow, int expBlocksNone) private org.apache.hadoop.hbase.Cell[]
private org.apache.hadoop.hbase.Cell[]
getData
(String family, String row, List<String> columns, int expBlocksRowCol, int expBlocksRow, int expBlocksNone) private org.apache.hadoop.hbase.regionserver.HRegion
initHRegion
(byte[] tableName, String callingMethod, org.apache.hadoop.conf.Configuration conf, String family) Callers must afterward callHBaseTestingUtility.closeRegionAndWAL(HRegion)
private org.apache.hadoop.hbase.regionserver.HRegion
initHRegion
(byte[] tableName, String callingMethod, org.apache.hadoop.conf.Configuration conf, String family, org.apache.hadoop.hbase.io.hfile.BlockCache blockCache) Callers must afterward callHBaseTestingUtility.closeRegionAndWAL(HRegion)
private void
private void
static void
setUp()
static void
tearDown()
void
Test # of blocks read for some simple seek cases.void
Test # of blocks read to ensure disabling cache-fill on Scan works.void
Test # of blocks read (targeted at some of the cases Lazy Seek optimizes).void
private static void
verifyData
(org.apache.hadoop.hbase.Cell kv, String expectedRow, String expectedCol, long expectedVersion)
-
Field Details
-
CLASS_RULE
-
LOG
-
testName
-
BLOOM_TYPE
-
region
org.apache.hadoop.hbase.regionserver.HRegion region -
TEST_UTIL
-
DIR
-
conf
-
-
Constructor Details
-
TestBlocksRead
public TestBlocksRead()
-
-
Method Details
-
setUp
- Throws:
Exception
-
tearDown
- Throws:
Exception
-
initHRegion
private org.apache.hadoop.hbase.regionserver.HRegion initHRegion(byte[] tableName, String callingMethod, org.apache.hadoop.conf.Configuration conf, String family) throws IOException Callers must afterward callHBaseTestingUtility.closeRegionAndWAL(HRegion)
- Returns:
- created and initialized region.
- Throws:
IOException
-
initHRegion
private org.apache.hadoop.hbase.regionserver.HRegion initHRegion(byte[] tableName, String callingMethod, org.apache.hadoop.conf.Configuration conf, String family, org.apache.hadoop.hbase.io.hfile.BlockCache blockCache) throws IOException Callers must afterward callHBaseTestingUtility.closeRegionAndWAL(HRegion)
- Throws:
IOException
-
putData
- Throws:
IOException
-
genValue
-
putData
private void putData(byte[] cf, String row, String col, long versionStart, long versionEnd) throws IOException - Throws:
IOException
-
getData
private org.apache.hadoop.hbase.Cell[] getData(String family, String row, List<String> columns, int expBlocks) throws IOException - Throws:
IOException
-
getData
private org.apache.hadoop.hbase.Cell[] getData(String family, String row, List<String> columns, int expBlocksRowCol, int expBlocksRow, int expBlocksNone) throws IOException - Throws:
IOException
-
getData
private org.apache.hadoop.hbase.Cell[] getData(String family, String row, String column, int expBlocks) throws IOException - Throws:
IOException
-
getData
private org.apache.hadoop.hbase.Cell[] getData(String family, String row, String column, int expBlocksRowCol, int expBlocksRow, int expBlocksNone) throws IOException - Throws:
IOException
-
deleteFamily
- Throws:
IOException
-
verifyData
private static void verifyData(org.apache.hadoop.hbase.Cell kv, String expectedRow, String expectedCol, long expectedVersion) -
getBlkAccessCount
-
testBlocksRead
Test # of blocks read for some simple seek cases.- Throws:
Exception
-
testLazySeekBlocksRead
Test # of blocks read (targeted at some of the cases Lazy Seek optimizes).- Throws:
Exception
-
testBlocksStoredWhenCachingDisabled
Test # of blocks read to ensure disabling cache-fill on Scan works.- Throws:
Exception
-
testLazySeekBlocksReadWithDelete
- Throws:
Exception
-