Package org.apache.hadoop.hbase.io.hfile
Class TestLazyDataBlockDecompression
java.lang.Object
org.apache.hadoop.hbase.io.hfile.TestLazyDataBlockDecompression
A kind of integration test at the intersection of
HFileBlock
, CacheConfig
, and
LruBlockCache
.-
Field Summary
Modifier and TypeFieldDescriptionboolean
static final HBaseClassTestRule
private org.apache.hadoop.fs.FileSystem
private static final org.slf4j.Logger
private static final Random
private static final HBaseTestingUtility
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static void
cacheBlocks
(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.io.hfile.CacheConfig cacheConfig, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.hbase.io.hfile.HFileContext cxt) Read all blocks frompath
to populateblockCache
.data()
void
setUp()
void
tearDown()
void
private static void
writeHFile
(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.io.hfile.CacheConfig cc, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.hbase.io.hfile.HFileContext cxt, int entryCount) WriteentryCount
random keyvalues to a new HFile atpath
.
-
Field Details
-
CLASS_RULE
-
LOG
-
TEST_UTIL
-
RNG
-
fs
-
cacheOnWrite
-
-
Constructor Details
-
TestLazyDataBlockDecompression
public TestLazyDataBlockDecompression()
-
-
Method Details
-
data
-
setUp
- Throws:
IOException
-
tearDown
-
writeHFile
private static void writeHFile(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.io.hfile.CacheConfig cc, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.hbase.io.hfile.HFileContext cxt, int entryCount) throws IOException WriteentryCount
random keyvalues to a new HFile atpath
. Returns the row bytes of the KeyValues written, in the order they were written.- Throws:
IOException
-
cacheBlocks
private static void cacheBlocks(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.io.hfile.CacheConfig cacheConfig, org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, org.apache.hadoop.hbase.io.hfile.HFileContext cxt) throws IOException Read all blocks frompath
to populateblockCache
.- Throws:
IOException
-
testCompressionIncreasesEffectiveBlockCacheSize
- Throws:
Exception
-