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
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.hadoop.hbase.io.hfile.BlockCacheprivate static final intprivate static final Set<org.apache.hadoop.hbase.io.hfile.BlockType>private static final org.apache.hadoop.hbase.regionserver.BloomTypeprivate static final longprivate static final longprivate final booleanprivate org.apache.hadoop.hbase.io.hfile.CacheConfigprivate static final intstatic final HBaseClassTestRuleprivate final org.apache.hadoop.hbase.io.compress.Compression.Algorithmprivate org.apache.hadoop.conf.Configurationprivate final TestCacheOnWrite.CacheOnWriteTypeprivate static final intprivate static final Set<org.apache.hadoop.hbase.io.hfile.BlockType>private org.apache.hadoop.fs.FileSystemprivate static final intprivate static final Set<org.apache.hadoop.hbase.io.hfile.BlockType>private static final org.slf4j.Loggerprivate static final intprivate static final intThe number of valid key types possible in a store fileprivate Randomprivate org.apache.hadoop.fs.Pathprivate static final HBaseTestingUtilityprivate String -
Constructor Summary
ConstructorsConstructorDescriptionTestCacheOnWrite(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 voidprivate voidclearBlockCache(org.apache.hadoop.hbase.io.hfile.BlockCache blockCache) static org.apache.hadoop.hbase.KeyValue.TypegenerateKeyType(Random rand) private static List<org.apache.hadoop.hbase.io.hfile.BlockCache>static Collection<Object[]>private voidreadStoreFile(boolean useTags) voidsetUp()voidtearDown()voidprivate voidtestCachingDataBlocksDuringCompactionInternals(boolean useTags, boolean cacheBlocksOnCompaction, long cacheBlocksOnCompactionThreshold) voidvoidprivate voidtestStoreFileCacheOnWriteInternals(boolean useTags) private voidwriteStoreFile(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:
IOExceptionInterruptedException
-
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:
IOExceptionInterruptedException
-
testStoreFileCacheOnWrite
- Throws:
IOException
-
testCachingDataBlocksDuringCompaction
- Throws:
IOExceptionInterruptedException
-
testCachingDataBlocksThresholdDuringCompaction
public void testCachingDataBlocksThresholdDuringCompaction() throws IOException, InterruptedException- Throws:
IOExceptionInterruptedException
-