Package org.apache.hadoop.hbase.io.hfile
Class TestCacheOnWrite
java.lang.Object
org.apache.hadoop.hbase.io.hfile.TestCacheOnWrite
Tests
HFile
cache-on-write functionality for the following block types: data blocks,
non-root index blocks, and Bloom filter blocks.-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate org.apache.hadoop.hbase.io.hfile.BlockCache
private static final int
private static final Set<org.apache.hadoop.hbase.io.hfile.BlockType>
private static final org.apache.hadoop.hbase.regionserver.BloomType
private static final long
private static final long
private final boolean
private org.apache.hadoop.hbase.io.hfile.CacheConfig
private static final int
static final HBaseClassTestRule
private final org.apache.hadoop.hbase.io.compress.Compression.Algorithm
private org.apache.hadoop.conf.Configuration
private final TestCacheOnWrite.CacheOnWriteType
private static final int
private static final Set<org.apache.hadoop.hbase.io.hfile.BlockType>
private org.apache.hadoop.fs.FileSystem
private static final int
private static final Set<org.apache.hadoop.hbase.io.hfile.BlockType>
private static final org.slf4j.Logger
private static final int
private static final int
The number of valid key types possible in a store fileprivate Random
private org.apache.hadoop.fs.Path
private static final HBaseTestingUtil
private String
-
Constructor Summary
ConstructorDescriptionTestCacheOnWrite
(TestCacheOnWrite.CacheOnWriteType cowType, org.apache.hadoop.hbase.io.compress.Compression.Algorithm compress, boolean cacheCompressedData, org.apache.hadoop.hbase.io.hfile.BlockCache blockCache) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
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>
static Collection<Object[]>
private void
readStoreFile
(boolean useTags) void
setUp()
void
tearDown()
void
private void
testCachingDataBlocksDuringCompactionInternals
(boolean useTags, boolean cacheBlocksOnCompaction, long cacheBlocksOnCompactionThreshold) void
void
private void
testStoreFileCacheOnWriteInternals
(boolean useTags) private void
writeStoreFile
(boolean useTags)
-
Field Details
-
CLASS_RULE
-
LOG
-
TEST_UTIL
-
conf
-
cacheConf
-
fs
-
rand
-
storeFilePath
-
blockCache
-
testDescription
-
cowType
-
compress
-
cacheCompressedData
-
DATA_BLOCK_SIZE
- See Also:
-
NUM_KV
- See Also:
-
INDEX_BLOCK_SIZE
- See Also:
-
BLOOM_BLOCK_SIZE
- See Also:
-
BLOOM_TYPE
-
CKBYTES
- See Also:
-
INDEX_BLOCK_TYPES
-
BLOOM_BLOCK_TYPES
-
DATA_BLOCK_TYPES
-
CACHE_COMPACTION_LOW_THRESHOLD
- See Also:
-
CACHE_COMPACTION_HIGH_THRESHOLD
- See Also:
-
NUM_VALID_KEY_TYPES
The number of valid key types possible in a store file
-
-
Constructor Details
-
TestCacheOnWrite
public TestCacheOnWrite(TestCacheOnWrite.CacheOnWriteType cowType, org.apache.hadoop.hbase.io.compress.Compression.Algorithm compress, boolean cacheCompressedData, org.apache.hadoop.hbase.io.hfile.BlockCache blockCache)
-
-
Method Details
-
getBlockCaches
private static List<org.apache.hadoop.hbase.io.hfile.BlockCache> getBlockCaches() throws IOException- Throws:
IOException
-
getParameters
- Throws:
IOException
-
clearBlockCache
private void clearBlockCache(org.apache.hadoop.hbase.io.hfile.BlockCache blockCache) throws InterruptedException - Throws:
InterruptedException
-
setUp
- Throws:
IOException
-
tearDown
- Throws:
IOException
InterruptedException
-
afterClass
- Throws:
IOException
-
testStoreFileCacheOnWriteInternals
- Throws:
IOException
-
readStoreFile
- Throws:
IOException
-
generateKeyType
-
writeStoreFile
- Throws:
IOException
-
testCachingDataBlocksDuringCompactionInternals
private void testCachingDataBlocksDuringCompactionInternals(boolean useTags, boolean cacheBlocksOnCompaction, long cacheBlocksOnCompactionThreshold) throws IOException, InterruptedException - Throws:
IOException
InterruptedException
-
testStoreFileCacheOnWrite
- Throws:
IOException
-
testCachingDataBlocksDuringCompaction
- Throws:
IOException
InterruptedException
-
testCachingDataBlocksThresholdDuringCompaction
public void testCachingDataBlocksThresholdDuringCompaction() throws IOException, InterruptedException- Throws:
IOException
InterruptedException
-