public class NoOpDataBlockEncoder extends Object implements HFileDataBlockEncoder
Modifier and Type | Field and Description |
---|---|
static NoOpDataBlockEncoder |
INSTANCE |
DATA_BLOCK_ENCODING
Modifier and Type | Method and Description |
---|---|
Pair<ByteBuffer,BlockType> |
beforeWriteToDisk(ByteBuffer in,
boolean includesMemstoreTS,
byte[] dummyHeader)
Should be called before an encoded or unencoded data block is written to
disk.
|
HFileBlock |
diskToCacheFormat(HFileBlock block,
boolean isCompaction)
Converts a block from the on-disk format to the in-cache format.
|
DataBlockEncoding |
getEffectiveEncodingInCache(boolean isCompaction) |
DataBlockEncoding |
getEncodingInCache() |
DataBlockEncoding |
getEncodingOnDisk() |
void |
saveMetadata(HFile.Writer writer)
Save metadata in HFile which will be written to disk
|
String |
toString() |
boolean |
useEncodedScanner(boolean isCompaction)
Decides whether we should use a scanner over encoded blocks.
|
public static final NoOpDataBlockEncoder INSTANCE
public HFileBlock diskToCacheFormat(HFileBlock block, boolean isCompaction)
HFileDataBlockEncoder
diskToCacheFormat
in interface HFileDataBlockEncoder
block
- a block in an on-disk format (read from HFile or freshly
generated).public Pair<ByteBuffer,BlockType> beforeWriteToDisk(ByteBuffer in, boolean includesMemstoreTS, byte[] dummyHeader)
HFileDataBlockEncoder
beforeWriteToDisk
in interface HFileDataBlockEncoder
in
- KeyValues next to each otherdummyHeader
- A dummy header to be written as a placeholderpublic boolean useEncodedScanner(boolean isCompaction)
HFileDataBlockEncoder
useEncodedScanner
in interface HFileDataBlockEncoder
isCompaction
- whether we are in a compaction.public void saveMetadata(HFile.Writer writer)
HFileDataBlockEncoder
saveMetadata
in interface HFileDataBlockEncoder
writer
- writer for a given HFilepublic DataBlockEncoding getEncodingOnDisk()
getEncodingOnDisk
in interface HFileDataBlockEncoder
public DataBlockEncoding getEncodingInCache()
getEncodingInCache
in interface HFileDataBlockEncoder
public DataBlockEncoding getEffectiveEncodingInCache(boolean isCompaction)
getEffectiveEncodingInCache
in interface HFileDataBlockEncoder
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.