@InterfaceAudience.Private public class NoOpDataBlockEncoder extends Object implements HFileDataBlockEncoder
Modifier and Type | Field and Description |
---|---|
static NoOpDataBlockEncoder |
INSTANCE |
DATA_BLOCK_ENCODING
Modifier | Constructor and Description |
---|---|
private |
NoOpDataBlockEncoder()
Cannot be instantiated.
|
Modifier and Type | Method and Description |
---|---|
int |
encode(Cell cell,
HFileBlockEncodingContext encodingCtx,
DataOutputStream out)
Encodes a KeyValue.
|
void |
endBlockEncoding(HFileBlockEncodingContext encodingCtx,
DataOutputStream out,
byte[] uncompressedBytesWithHeader,
BlockType blockType)
Ends encoding for a block of KeyValues.
|
DataBlockEncoding |
getDataBlockEncoding() |
DataBlockEncoding |
getEffectiveEncodingInCache(boolean isCompaction) |
HFileBlockDecodingContext |
newDataBlockDecodingContext(HFileContext meta)
create a encoder specific decoding context for reading.
|
HFileBlockEncodingContext |
newDataBlockEncodingContext(byte[] dummyHeader,
HFileContext meta)
Create an encoder specific encoding context object for writing.
|
void |
saveMetadata(HFile.Writer writer)
Save metadata in HFile which will be written to disk
|
void |
startBlockEncoding(HFileBlockEncodingContext encodingCtx,
DataOutputStream out)
Starts encoding for a block of KeyValues.
|
String |
toString() |
boolean |
useEncodedScanner()
Decides whether we should use a scanner over encoded blocks.
|
public static final NoOpDataBlockEncoder INSTANCE
private NoOpDataBlockEncoder()
INSTANCE
instead.public int encode(Cell cell, HFileBlockEncodingContext encodingCtx, DataOutputStream out) throws IOException
HFileDataBlockEncoder
encode
in interface HFileDataBlockEncoder
IOException
public boolean useEncodedScanner()
HFileDataBlockEncoder
useEncodedScanner
in interface HFileDataBlockEncoder
public void saveMetadata(HFile.Writer writer)
HFileDataBlockEncoder
saveMetadata
in interface HFileDataBlockEncoder
writer
- writer for a given HFilepublic DataBlockEncoding getDataBlockEncoding()
getDataBlockEncoding
in interface HFileDataBlockEncoder
public DataBlockEncoding getEffectiveEncodingInCache(boolean isCompaction)
getEffectiveEncodingInCache
in interface HFileDataBlockEncoder
public HFileBlockEncodingContext newDataBlockEncodingContext(byte[] dummyHeader, HFileContext meta)
HFileDataBlockEncoder
newDataBlockEncodingContext
in interface HFileDataBlockEncoder
dummyHeader
- header bytesmeta
- HFile meta dataHFileBlockEncodingContext
objectpublic HFileBlockDecodingContext newDataBlockDecodingContext(HFileContext meta)
HFileDataBlockEncoder
newDataBlockDecodingContext
in interface HFileDataBlockEncoder
meta
- - HFile meta dataHFileBlockDecodingContext
objectpublic void startBlockEncoding(HFileBlockEncodingContext encodingCtx, DataOutputStream out) throws IOException
HFileDataBlockEncoder
HFileDataBlockEncoder.endBlockEncoding(HFileBlockEncodingContext, DataOutputStream, byte[], BlockType)
to finish encoding of a block.startBlockEncoding
in interface HFileDataBlockEncoder
IOException
public void endBlockEncoding(HFileBlockEncodingContext encodingCtx, DataOutputStream out, byte[] uncompressedBytesWithHeader, BlockType blockType) throws IOException
HFileDataBlockEncoder
endBlockEncoding
in interface HFileDataBlockEncoder
IOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.