Package org.apache.hadoop.hbase.io.hfile
Class TestHFileWriterV3WithDataEncoders
java.lang.Object
org.apache.hadoop.hbase.io.hfile.TestHFileWriterV3WithDataEncoders
Testing writing a version 3
HFile for all encoded blocks-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final HBaseClassTestRuleprivate org.apache.hadoop.conf.Configurationprivate org.apache.hadoop.hbase.io.encoding.DataBlockEncodingprivate org.apache.hadoop.fs.FileSystemprivate static final org.slf4j.Loggerprivate static final Randomprivate static final HBaseTestingUtilprivate boolean -
Constructor Summary
ConstructorsConstructorDescriptionTestHFileWriterV3WithDataEncoders(boolean useTags, org.apache.hadoop.hbase.io.encoding.DataBlockEncoding dataBlockEncoding) -
Method Summary
Modifier and TypeMethodDescriptionstatic Collection<Object[]>private longscanBlocks(int entryCount, org.apache.hadoop.hbase.io.hfile.HFileContext context, List<org.apache.hadoop.hbase.KeyValue> keyValues, org.apache.hadoop.fs.FSDataInputStream fsdis, org.apache.hadoop.hbase.io.hfile.FixedFileTrailer trailer, org.apache.hadoop.hbase.io.hfile.HFileContext meta, org.apache.hadoop.hbase.io.hfile.HFileBlock.FSReader blockReader, int entriesRead, int blocksRead, org.apache.hadoop.hbase.io.encoding.DataBlockEncoder encoder) voidsetUp()voidprivate voidtestHFileFormatV3Internals(boolean useTags) voidprivate voidtestMidKeyInHFileInternals(boolean useTags) private voidwriteDataAndReadFromHFile(org.apache.hadoop.fs.Path hfilePath, org.apache.hadoop.hbase.io.compress.Compression.Algorithm compressAlgo, int entryCount, boolean findMidKey, boolean useTags) private voidwriteKeyValues(int entryCount, boolean useTags, org.apache.hadoop.hbase.io.hfile.HFile.Writer writer, Random rand, List<org.apache.hadoop.hbase.KeyValue> keyValues)
-
Field Details
-
CLASS_RULE
-
LOG
-
TEST_UTIL
-
RNG
-
conf
-
fs
-
useTags
-
dataBlockEncoding
-
-
Constructor Details
-
TestHFileWriterV3WithDataEncoders
public TestHFileWriterV3WithDataEncoders(boolean useTags, org.apache.hadoop.hbase.io.encoding.DataBlockEncoding dataBlockEncoding)
-
-
Method Details
-
parameters
-
setUp
- Throws:
IOException
-
testHFileFormatV3
- Throws:
IOException
-
testHFileFormatV3Internals
- Throws:
IOException
-
testMidKeyInHFile
- Throws:
IOException
-
testMidKeyInHFileInternals
- Throws:
IOException
-
writeDataAndReadFromHFile
private void writeDataAndReadFromHFile(org.apache.hadoop.fs.Path hfilePath, org.apache.hadoop.hbase.io.compress.Compression.Algorithm compressAlgo, int entryCount, boolean findMidKey, boolean useTags) throws IOException - Throws:
IOException
-
scanBlocks
private long scanBlocks(int entryCount, org.apache.hadoop.hbase.io.hfile.HFileContext context, List<org.apache.hadoop.hbase.KeyValue> keyValues, org.apache.hadoop.fs.FSDataInputStream fsdis, org.apache.hadoop.hbase.io.hfile.FixedFileTrailer trailer, org.apache.hadoop.hbase.io.hfile.HFileContext meta, org.apache.hadoop.hbase.io.hfile.HFileBlock.FSReader blockReader, int entriesRead, int blocksRead, org.apache.hadoop.hbase.io.encoding.DataBlockEncoder encoder) throws IOException - Throws:
IOException
-
writeKeyValues
private void writeKeyValues(int entryCount, boolean useTags, org.apache.hadoop.hbase.io.hfile.HFile.Writer writer, Random rand, List<org.apache.hadoop.hbase.KeyValue> keyValues) throws IOException - Throws:
IOException
-