public class TestDataBlockEncoders extends Object
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private static int |
ENCODED_DATA_OFFSET |
private RedundantKVGenerator |
generator |
(package private) static byte[] |
HFILEBLOCK_DUMMY_HEADER |
private boolean |
includesMemstoreTS |
private boolean |
includesTags |
private static org.slf4j.Logger |
LOG |
private static int |
NUM_RANDOM_SEEKS |
private static int |
NUMBER_OF_KV |
private Random |
randomizer |
private boolean |
useOffheapData |
Constructor and Description |
---|
TestDataBlockEncoders(boolean includesMemstoreTS,
boolean includesTag,
boolean useOffheapData) |
Modifier and Type | Method and Description |
---|---|
private void |
checkSeekingConsistency(List<org.apache.hadoop.hbase.io.encoding.DataBlockEncoder.EncodedSeeker> encodedSeekers,
boolean seekBefore,
org.apache.hadoop.hbase.Cell keyValue) |
(package private) static ByteBuffer |
encodeKeyValues(org.apache.hadoop.hbase.io.encoding.DataBlockEncoding encoding,
List<org.apache.hadoop.hbase.KeyValue> kvs,
org.apache.hadoop.hbase.io.encoding.HFileBlockEncodingContext encodingContext,
boolean useOffheapData) |
private org.apache.hadoop.hbase.io.encoding.HFileBlockEncodingContext |
getEncodingContext(org.apache.hadoop.hbase.io.compress.Compression.Algorithm algo,
org.apache.hadoop.hbase.io.encoding.DataBlockEncoding encoding) |
static Collection<Object[]> |
parameters() |
private void |
testAlgorithm(byte[] encodedData,
ByteBuffer unencodedDataBuf,
org.apache.hadoop.hbase.io.encoding.DataBlockEncoder encoder) |
void |
testEmptyKeyValues()
Test data block encoding of empty KeyValue.
|
private void |
testEncodersOnDataset(List<org.apache.hadoop.hbase.KeyValue> kvList,
boolean includesMemstoreTS,
boolean includesTags) |
void |
testExecutionOnSample()
Test whether compression -> decompression gives the consistent results on
pseudorandom sample.
|
void |
testFirstKeyInBlockOnSample()
Test whether the decompression of first key is implemented correctly.
|
void |
testNegativeTimestamps()
Test KeyValues with negative timestamp.
|
void |
testNextOnSample() |
void |
testRowIndexWithTagsButNoTagsInCell() |
void |
testSeekingOnSample()
Test seeking while file is encoded.
|
void |
testZeroByte() |
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static int NUMBER_OF_KV
private static int NUM_RANDOM_SEEKS
private static int ENCODED_DATA_OFFSET
static final byte[] HFILEBLOCK_DUMMY_HEADER
private RedundantKVGenerator generator
private Random randomizer
private final boolean includesMemstoreTS
private final boolean includesTags
private final boolean useOffheapData
public TestDataBlockEncoders(boolean includesMemstoreTS, boolean includesTag, boolean useOffheapData)
public static Collection<Object[]> parameters()
private org.apache.hadoop.hbase.io.encoding.HFileBlockEncodingContext getEncodingContext(org.apache.hadoop.hbase.io.compress.Compression.Algorithm algo, org.apache.hadoop.hbase.io.encoding.DataBlockEncoding encoding)
public void testEmptyKeyValues() throws IOException
IOException
- On test failure.public void testNegativeTimestamps() throws IOException
IOException
- On test failure.public void testExecutionOnSample() throws IOException
IOException
- On test failure.public void testSeekingOnSample() throws IOException
IOException
static ByteBuffer encodeKeyValues(org.apache.hadoop.hbase.io.encoding.DataBlockEncoding encoding, List<org.apache.hadoop.hbase.KeyValue> kvs, org.apache.hadoop.hbase.io.encoding.HFileBlockEncodingContext encodingContext, boolean useOffheapData) throws IOException
IOException
public void testNextOnSample() throws IOException
IOException
public void testFirstKeyInBlockOnSample() throws IOException
IOException
public void testRowIndexWithTagsButNoTagsInCell() throws IOException
IOException
private void checkSeekingConsistency(List<org.apache.hadoop.hbase.io.encoding.DataBlockEncoder.EncodedSeeker> encodedSeekers, boolean seekBefore, org.apache.hadoop.hbase.Cell keyValue)
private void testEncodersOnDataset(List<org.apache.hadoop.hbase.KeyValue> kvList, boolean includesMemstoreTS, boolean includesTags) throws IOException
IOException
public void testZeroByte() throws IOException
IOException
private void testAlgorithm(byte[] encodedData, ByteBuffer unencodedDataBuf, org.apache.hadoop.hbase.io.encoding.DataBlockEncoder encoder) throws IOException
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.