public class TestCacheOnWrite extends Object
HFile cache-on-write functionality for the following block
types: data blocks, non-root index blocks, and Bloom filter blocks.| Modifier and Type | Class and Description |
|---|---|
private static class |
TestCacheOnWrite.CacheOnWriteType |
| Modifier and Type | Field and Description |
|---|---|
private org.apache.hadoop.hbase.io.hfile.BlockCache |
blockCache |
private static int |
BLOOM_BLOCK_SIZE |
private static org.apache.hadoop.hbase.regionserver.BloomType |
BLOOM_TYPE |
private boolean |
cacheCompressedData |
private org.apache.hadoop.hbase.io.hfile.CacheConfig |
cacheConf |
private static int |
CKBYTES |
static HBaseClassTestRule |
CLASS_RULE |
private org.apache.hadoop.hbase.io.compress.Compression.Algorithm |
compress |
private org.apache.hadoop.conf.Configuration |
conf |
private TestCacheOnWrite.CacheOnWriteType |
cowType |
private static int |
DATA_BLOCK_SIZE |
private org.apache.hadoop.fs.FileSystem |
fs |
private static int |
INDEX_BLOCK_SIZE |
private static org.slf4j.Logger |
LOG |
private static int |
NUM_KV |
private static int |
NUM_VALID_KEY_TYPES
The number of valid key types possible in a store file
|
private Random |
rand |
private org.apache.hadoop.fs.Path |
storeFilePath |
private static HBaseTestingUtility |
TEST_UTIL |
private String |
testDescription |
| Constructor and Description |
|---|
TestCacheOnWrite(TestCacheOnWrite.CacheOnWriteType cowType,
org.apache.hadoop.hbase.io.compress.Compression.Algorithm compress,
boolean cacheCompressedData,
org.apache.hadoop.hbase.io.hfile.BlockCache blockCache) |
| Modifier and Type | Method and Description |
|---|---|
static void |
afterClass() |
private void |
clearBlockCache(org.apache.hadoop.hbase.io.hfile.BlockCache blockCache) |
static org.apache.hadoop.hbase.KeyValue.Type |
generateKeyType(Random rand) |
private static List<org.apache.hadoop.hbase.io.hfile.BlockCache> |
getBlockCaches() |
static Collection<Object[]> |
getParameters() |
private void |
readStoreFile(boolean useTags) |
void |
setUp() |
void |
tearDown() |
void |
testNotCachingDataBlocksDuringCompaction() |
private void |
testNotCachingDataBlocksDuringCompactionInternals(boolean useTags) |
void |
testStoreFileCacheOnWrite() |
private void |
testStoreFileCacheOnWriteInternals(boolean useTags) |
private void |
writeStoreFile(boolean useTags) |
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static final HBaseTestingUtility TEST_UTIL
private org.apache.hadoop.conf.Configuration conf
private org.apache.hadoop.hbase.io.hfile.CacheConfig cacheConf
private org.apache.hadoop.fs.FileSystem fs
private org.apache.hadoop.fs.Path storeFilePath
private org.apache.hadoop.hbase.io.hfile.BlockCache blockCache
private String testDescription
private final TestCacheOnWrite.CacheOnWriteType cowType
private final org.apache.hadoop.hbase.io.compress.Compression.Algorithm compress
private final boolean cacheCompressedData
private static final int DATA_BLOCK_SIZE
private static final int NUM_KV
private static final int INDEX_BLOCK_SIZE
private static final int BLOOM_BLOCK_SIZE
private static final org.apache.hadoop.hbase.regionserver.BloomType BLOOM_TYPE
private static final int CKBYTES
private static final int NUM_VALID_KEY_TYPES
public TestCacheOnWrite(TestCacheOnWrite.CacheOnWriteType cowType, org.apache.hadoop.hbase.io.compress.Compression.Algorithm compress, boolean cacheCompressedData, org.apache.hadoop.hbase.io.hfile.BlockCache blockCache)
private static List<org.apache.hadoop.hbase.io.hfile.BlockCache> getBlockCaches() throws IOException
IOExceptionpublic static Collection<Object[]> getParameters() throws IOException
IOExceptionprivate void clearBlockCache(org.apache.hadoop.hbase.io.hfile.BlockCache blockCache) throws InterruptedException
InterruptedExceptionpublic void setUp() throws IOException
IOExceptionpublic void tearDown() throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic static void afterClass() throws IOException
IOExceptionprivate void testStoreFileCacheOnWriteInternals(boolean useTags) throws IOException
IOExceptionprivate void readStoreFile(boolean useTags) throws IOException
IOExceptionpublic static org.apache.hadoop.hbase.KeyValue.Type generateKeyType(Random rand)
private void writeStoreFile(boolean useTags) throws IOException
IOExceptionprivate void testNotCachingDataBlocksDuringCompactionInternals(boolean useTags) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void testStoreFileCacheOnWrite() throws IOException
IOExceptionpublic void testNotCachingDataBlocksDuringCompaction() throws IOException, InterruptedException
IOExceptionInterruptedExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.