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
FieldsModifier and TypeFieldDescriptionbooleanstatic final HBaseClassTestRuleprivate org.apache.hadoop.fs.FileSystemprivate static final org.slf4j.Loggerprivate static final Randomprivate static final HBaseTestingUtility -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidcacheBlocks(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 frompathto populateblockCache.data()voidsetUp()voidtearDown()voidprivate static voidwriteHFile(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) WriteentryCountrandom 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 WriteentryCountrandom 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 frompathto populateblockCache.- Throws:
IOException
-
testCompressionIncreasesEffectiveBlockCacheSize
- Throws:
Exception
-