@InterfaceAudience.Private public class HFileIndexBlockEncoderImpl extends Object implements HFileIndexBlockEncoder
HFileIndexBlockEncoder.EncodedSeeker
Modifier and Type | Field and Description |
---|---|
private IndexBlockEncoding |
indexBlockEncoding |
INDEX_BLOCK_ENCODING
Constructor and Description |
---|
HFileIndexBlockEncoderImpl(IndexBlockEncoding encoding)
Do index block encoding with specified options.
|
Modifier and Type | Method and Description |
---|---|
static HFileIndexBlockEncoder |
createFromFileInfo(HFileInfo fileInfo) |
HFileIndexBlockEncoder.EncodedSeeker |
createSeeker() |
void |
encode(BlockIndexChunk blockIndexChunk,
boolean rootIndexBlock,
DataOutput out) |
IndexBlockEncoding |
getIndexBlockEncoding()
Returns the index block encoding
|
void |
saveMetadata(HFile.Writer writer)
Save metadata in HFile which will be written to disk
|
String |
toString() |
private final IndexBlockEncoding indexBlockEncoding
public HFileIndexBlockEncoderImpl(IndexBlockEncoding encoding)
encoding
- What kind of data block encoding will be used.public static HFileIndexBlockEncoder createFromFileInfo(HFileInfo fileInfo) throws IOException
IOException
public void saveMetadata(HFile.Writer writer) throws IOException
HFileIndexBlockEncoder
saveMetadata
in interface HFileIndexBlockEncoder
writer
- writer for a given HFileIOException
- on disk problemspublic IndexBlockEncoding getIndexBlockEncoding()
HFileIndexBlockEncoder
getIndexBlockEncoding
in interface HFileIndexBlockEncoder
public void encode(BlockIndexChunk blockIndexChunk, boolean rootIndexBlock, DataOutput out) throws IOException
encode
in interface HFileIndexBlockEncoder
IOException
public HFileIndexBlockEncoder.EncodedSeeker createSeeker()
createSeeker
in interface HFileIndexBlockEncoder
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.