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 Set<org.apache.hadoop.hbase.io.hfile.BlockType> |
BLOOM_BLOCK_TYPES |
private static org.apache.hadoop.hbase.regionserver.BloomType |
BLOOM_TYPE |
private static long |
CACHE_COMPACTION_HIGH_THRESHOLD |
private static long |
CACHE_COMPACTION_LOW_THRESHOLD |
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 static Set<org.apache.hadoop.hbase.io.hfile.BlockType> |
DATA_BLOCK_TYPES |
private org.apache.hadoop.fs.FileSystem |
fs |
private static int |
INDEX_BLOCK_SIZE |
private static Set<org.apache.hadoop.hbase.io.hfile.BlockType> |
INDEX_BLOCK_TYPES |
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 |
testCachingDataBlocksDuringCompaction() |
private void |
testCachingDataBlocksDuringCompactionInternals(boolean useTags,
boolean cacheBlocksOnCompaction,
long cacheBlocksOnCompactionThreshold) |
void |
testCachingDataBlocksThresholdDuringCompaction() |
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 Set<org.apache.hadoop.hbase.io.hfile.BlockType> INDEX_BLOCK_TYPES
private static final Set<org.apache.hadoop.hbase.io.hfile.BlockType> BLOOM_BLOCK_TYPES
private static final Set<org.apache.hadoop.hbase.io.hfile.BlockType> DATA_BLOCK_TYPES
private static final long CACHE_COMPACTION_LOW_THRESHOLD
private static final long CACHE_COMPACTION_HIGH_THRESHOLD
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
IOException
public static Collection<Object[]> getParameters() throws IOException
IOException
private void clearBlockCache(org.apache.hadoop.hbase.io.hfile.BlockCache blockCache) throws InterruptedException
InterruptedException
public void setUp() throws IOException
IOException
public void tearDown() throws IOException, InterruptedException
IOException
InterruptedException
public static void afterClass() throws IOException
IOException
private void testStoreFileCacheOnWriteInternals(boolean useTags) throws IOException
IOException
private void readStoreFile(boolean useTags) throws IOException
IOException
public static org.apache.hadoop.hbase.KeyValue.Type generateKeyType(Random rand)
private void writeStoreFile(boolean useTags) throws IOException
IOException
private void testCachingDataBlocksDuringCompactionInternals(boolean useTags, boolean cacheBlocksOnCompaction, long cacheBlocksOnCompactionThreshold) throws IOException, InterruptedException
IOException
InterruptedException
public void testStoreFileCacheOnWrite() throws IOException
IOException
public void testCachingDataBlocksDuringCompaction() throws IOException, InterruptedException
IOException
InterruptedException
public void testCachingDataBlocksThresholdDuringCompaction() throws IOException, InterruptedException
IOException
InterruptedException
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.