@InterfaceAudience.Private public class NoOpDataBlockEncoder extends Object implements HFileDataBlockEncoder
Modifier and Type | Class and Description |
---|---|
private static class |
NoOpDataBlockEncoder.NoneEncodingState |
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 |
---|---|
void |
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()
Returns the data block encoding
|
DataBlockEncoding |
getEffectiveEncodingInCache(boolean isCompaction) |
HFileBlockDecodingContext |
newDataBlockDecodingContext(org.apache.hadoop.conf.Configuration conf,
HFileContext meta)
create a encoder specific decoding context for reading.
|
HFileBlockEncodingContext |
newDataBlockEncodingContext(org.apache.hadoop.conf.Configuration conf,
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 blkEncodingCtx,
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 void 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()
HFileDataBlockEncoder
getDataBlockEncoding
in interface HFileDataBlockEncoder
public DataBlockEncoding getEffectiveEncodingInCache(boolean isCompaction)
getEffectiveEncodingInCache
in interface HFileDataBlockEncoder
public HFileBlockEncodingContext newDataBlockEncodingContext(org.apache.hadoop.conf.Configuration conf, byte[] dummyHeader, HFileContext meta)
HFileDataBlockEncoder
newDataBlockEncodingContext
in interface HFileDataBlockEncoder
conf
- store configurationdummyHeader
- header bytesmeta
- HFile meta dataHFileBlockEncodingContext
objectpublic HFileBlockDecodingContext newDataBlockDecodingContext(org.apache.hadoop.conf.Configuration conf, HFileContext meta)
HFileDataBlockEncoder
newDataBlockDecodingContext
in interface HFileDataBlockEncoder
conf
- store configurationmeta
- - HFile meta dataHFileBlockDecodingContext
objectpublic void startBlockEncoding(HFileBlockEncodingContext blkEncodingCtx, DataOutputStream out) throws IOException
HFileDataBlockEncoder
HFileDataBlockEncoder.endBlockEncoding(HFileBlockEncodingContext, DataOutputStream, byte[], BlockType)
to
finish encoding of a block. nnnstartBlockEncoding
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–2020 The Apache Software Foundation. All rights reserved.