Package org.apache.hadoop.hbase.io.hfile
Class TestHFileDataBlockEncoder
java.lang.Object
org.apache.hadoop.hbase.io.hfile.TestHFileDataBlockEncoder
-
Field Summary
Modifier and TypeFieldDescriptionprivate org.apache.hadoop.hbase.io.hfile.HFileDataBlockEncoder
static final HBaseClassTestRule
private final org.apache.hadoop.conf.Configuration
private final RedundantKVGenerator
private boolean
-
Constructor Summary
ConstructorDescriptionTestHFileDataBlockEncoder
(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.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) static Collection<Object[]>
Returns All possible data block encoding configurationsprivate org.apache.hadoop.hbase.io.hfile.HFileBlock
getSampleHFileBlock
(List<org.apache.hadoop.hbase.KeyValue> kvs, boolean useTag) void
Test encoding.private void
testEncodingInternals
(boolean useTag) void
Test putting and taking out blocks into cache with different encoding options.private void
testEncodingWithCacheInternals
(boolean useTag) void
Test encoding with offheap keyvalue.void
Test for HBASE-5746.private void
testHeaderSizeInCacheWithoutChecksumInternals
(boolean useTags) 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)
-
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
-