Class CopyKeyDataBlockEncoder
java.lang.Object
org.apache.hadoop.hbase.io.encoding.AbstractDataBlockEncoder
org.apache.hadoop.hbase.io.encoding.BufferedDataBlockEncoder
org.apache.hadoop.hbase.io.encoding.CopyKeyDataBlockEncoder
- All Implemented Interfaces:
DataBlockEncoder
Just copy data, do not do any kind of compression. Use for comparison and benchmarking.
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static class
private static class
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.io.encoding.BufferedDataBlockEncoder
BufferedDataBlockEncoder.BufferedEncodedSeeker<STATE extends BufferedDataBlockEncoder.SeekerState>, BufferedDataBlockEncoder.OffheapDecodedExtendedCell, BufferedDataBlockEncoder.OnheapDecodedCell, BufferedDataBlockEncoder.SeekerState
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.io.encoding.AbstractDataBlockEncoder
AbstractDataBlockEncoder.AbstractEncodedSeeker
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.io.encoding.DataBlockEncoder
DataBlockEncoder.EncodedSeeker
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateSeeker
(HFileBlockDecodingContext decodingCtx) Create a HFileBlock seeker which find KeyValues within a block.getFirstKeyCellInBlock
(ByteBuff block) Return first key in block as a cell.protected ByteBuffer
internalDecodeKeyValues
(DataInputStream source, int allocateHeaderLength, int skipLastBytes, HFileBlockDefaultDecodingContext decodingCtx) int
internalEncode
(ExtendedCell cell, HFileBlockDefaultEncodingContext encodingContext, DataOutputStream out) void
startBlockEncoding
(HFileBlockEncodingContext blkEncodingCtx, DataOutputStream out) Starts encoding for a block of KeyValues.toString()
Methods inherited from class org.apache.hadoop.hbase.io.encoding.BufferedDataBlockEncoder
afterDecodingKeyValue, afterEncodingKeyValue, compareCommonFamilyPrefix, compareCommonQualifierPrefix, compareCommonRowPrefix, decodeKeyValues, encode, endBlockEncoding, ensureSpace
Methods inherited from class org.apache.hadoop.hbase.io.encoding.AbstractDataBlockEncoder
createFirstKeyCell, newDataBlockDecodingContext, newDataBlockEncodingContext, postEncoding
-
Constructor Details
-
CopyKeyDataBlockEncoder
public CopyKeyDataBlockEncoder()
-
-
Method Details
-
startBlockEncoding
public void startBlockEncoding(HFileBlockEncodingContext blkEncodingCtx, DataOutputStream out) throws IOException Description copied from interface:DataBlockEncoder
Starts encoding for a block of KeyValues. CallDataBlockEncoder.endBlockEncoding(HFileBlockEncodingContext, DataOutputStream, byte[])
to finish encoding of a block.- Specified by:
startBlockEncoding
in interfaceDataBlockEncoder
- Overrides:
startBlockEncoding
in classBufferedDataBlockEncoder
- Throws:
IOException
-
internalEncode
public int internalEncode(ExtendedCell cell, HFileBlockDefaultEncodingContext encodingContext, DataOutputStream out) throws IOException - Specified by:
internalEncode
in classBufferedDataBlockEncoder
- Throws:
IOException
-
getFirstKeyCellInBlock
Description copied from interface:DataBlockEncoder
Return first key in block as a cell. Useful for indexing. Typically does not make a deep copy but returns a buffer wrapping a segment of the actual block's byte array. This is because the first key in block is usually stored unencoded.- Parameters:
block
- encoded block we want index, the position will not change- Returns:
- First key in block as a cell.
-
toString
-
createSeeker
Description copied from interface:DataBlockEncoder
Create a HFileBlock seeker which find KeyValues within a block.- Returns:
- A newly created seeker.
-
internalDecodeKeyValues
protected ByteBuffer internalDecodeKeyValues(DataInputStream source, int allocateHeaderLength, int skipLastBytes, HFileBlockDefaultDecodingContext decodingCtx) throws IOException - Specified by:
internalDecodeKeyValues
in classBufferedDataBlockEncoder
- Throws:
IOException
-