@InterfaceAudience.Private public class NoOpIndexBlockEncoder extends Object implements HFileIndexBlockEncoder
Modifier and Type | Class and Description |
---|---|
protected static class |
NoOpIndexBlockEncoder.NoOpEncodedSeeker |
HFileIndexBlockEncoder.EncodedSeeker
Modifier and Type | Field and Description |
---|---|
static NoOpIndexBlockEncoder |
INSTANCE |
INDEX_BLOCK_ENCODING
Modifier | Constructor and Description |
---|---|
private |
NoOpIndexBlockEncoder()
Cannot be instantiated.
|
Modifier and Type | Method and Description |
---|---|
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 void |
writeNonRoot(BlockIndexChunk blockIndexChunk,
DataOutput out)
Writes the block index chunk in the non-root index block format.
|
private void |
writeRoot(BlockIndexChunk blockIndexChunk,
DataOutput out)
Writes this chunk into the given output stream in the root block index format.
|
public static final NoOpIndexBlockEncoder INSTANCE
private NoOpIndexBlockEncoder()
INSTANCE
instead.public void saveMetadata(HFile.Writer writer)
HFileIndexBlockEncoder
saveMetadata
in interface HFileIndexBlockEncoder
writer
- writer for a given HFilepublic void encode(BlockIndexChunk blockIndexChunk, boolean rootIndexBlock, DataOutput out) throws IOException
encode
in interface HFileIndexBlockEncoder
IOException
private void writeNonRoot(BlockIndexChunk blockIndexChunk, DataOutput out) throws IOException
IOException
private void writeRoot(BlockIndexChunk blockIndexChunk, DataOutput out) throws IOException
HFile
version 1 block index format, except that we store on-disk size of
the block instead of its uncompressed size.out
- the data output stream to write the block index to. Typically a stream writing into
an HFile
block.IOException
public IndexBlockEncoding getIndexBlockEncoding()
HFileIndexBlockEncoder
getIndexBlockEncoding
in interface HFileIndexBlockEncoder
public HFileIndexBlockEncoder.EncodedSeeker createSeeker()
createSeeker
in interface HFileIndexBlockEncoder
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.