Package org.apache.hadoop.hbase.io.hfile
Class TestHFileDataBlockEncoder
java.lang.Object
org.apache.hadoop.hbase.io.hfile.TestHFileDataBlockEncoder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.apache.hadoop.hbase.io.hfile.HFileDataBlockEncoderstatic final HBaseClassTestRuleprivate final org.apache.hadoop.conf.Configurationprivate final RedundantKVGeneratorprivate boolean -
Constructor Summary
ConstructorsConstructorDescriptionTestHFileDataBlockEncoder(org.apache.hadoop.hbase.io.hfile.HFileDataBlockEncoder blockEncoder, boolean includesMemstoreTS) Create test for given data block encoding configuration. -
Method Summary
Modifier and TypeMethodDescriptionprivate org.apache.hadoop.hbase.io.hfile.HFileBlockcreateBlockOnDisk(org.apache.hadoop.conf.Configuration conf, List<org.apache.hadoop.hbase.KeyValue> kvs, org.apache.hadoop.hbase.io.hfile.HFileBlock block, boolean useTags) static Collection<Object[]>Returns All possible data block encoding configurationsprivate org.apache.hadoop.hbase.io.hfile.HFileBlockgetSampleHFileBlock(List<org.apache.hadoop.hbase.KeyValue> kvs, boolean useTag) voidTest encoding.private voidtestEncodingInternals(boolean useTag) voidTest putting and taking out blocks into cache with different encoding options.private voidtestEncodingWithCacheInternals(boolean useTag) voidTest encoding with offheap keyvalue.voidTest for HBASE-5746.private voidtestHeaderSizeInCacheWithoutChecksumInternals(boolean useTags) private voidwriteBlock(org.apache.hadoop.conf.Configuration conf, List<org.apache.hadoop.hbase.Cell> kvs, org.apache.hadoop.hbase.io.hfile.HFileContext fileContext, boolean useTags)
-
Field Details
-
CLASS_RULE
-
conf
-
generator
-
blockEncoder
-
includesMemstoreTS
-
-
Constructor Details
-
TestHFileDataBlockEncoder
public TestHFileDataBlockEncoder(org.apache.hadoop.hbase.io.hfile.HFileDataBlockEncoder blockEncoder, boolean includesMemstoreTS) Create test for given data block encoding configuration.- Parameters:
blockEncoder- What kind of encoding policy will be used.
-
-
Method Details
-
testEncodingWithCache
Test putting and taking out blocks into cache with different encoding options.- Throws:
IOException
-
testEncodingWithCacheInternals
- Throws:
IOException
-
testHeaderSizeInCacheWithoutChecksum
Test for HBASE-5746.- Throws:
Exception
-
testHeaderSizeInCacheWithoutChecksumInternals
- Throws:
IOException
-
testEncoding
Test encoding.- Throws:
IOException
-
testEncodingWithOffheapKeyValue
Test encoding with offheap keyvalue. This test just verifies if the encoders work with DBB and does not use the getXXXArray() API- Throws:
IOException
-
testEncodingInternals
- Throws:
IOException
-
getSampleHFileBlock
private org.apache.hadoop.hbase.io.hfile.HFileBlock getSampleHFileBlock(List<org.apache.hadoop.hbase.KeyValue> kvs, boolean useTag) -
createBlockOnDisk
private org.apache.hadoop.hbase.io.hfile.HFileBlock createBlockOnDisk(org.apache.hadoop.conf.Configuration conf, List<org.apache.hadoop.hbase.KeyValue> kvs, org.apache.hadoop.hbase.io.hfile.HFileBlock block, boolean useTags) throws IOException - Throws:
IOException
-
writeBlock
private void writeBlock(org.apache.hadoop.conf.Configuration conf, List<org.apache.hadoop.hbase.Cell> kvs, org.apache.hadoop.hbase.io.hfile.HFileContext fileContext, boolean useTags) throws IOException - Throws:
IOException
-
getAllConfigurations
Returns All possible data block encoding configurations
-