Package org.apache.hadoop.hbase.io.hfile
Class NoOpIndexBlockEncoder
java.lang.Object
org.apache.hadoop.hbase.io.hfile.NoOpIndexBlockEncoder
- All Implemented Interfaces:
HFileIndexBlockEncoder
Does not perform any kind of encoding/decoding.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.hadoop.hbase.io.hfile.HFileIndexBlockEncoder
HFileIndexBlockEncoder.EncodedSeeker
-
Field Summary
Fields inherited from interface org.apache.hadoop.hbase.io.hfile.HFileIndexBlockEncoder
INDEX_BLOCK_ENCODING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
encode
(BlockIndexChunk blockIndexChunk, boolean rootIndexBlock, DataOutput out) Returns the index block encodingvoid
saveMetadata
(HFile.Writer writer) Save metadata in HFile which will be written to disktoString()
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.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
NoOpIndexBlockEncoder
private NoOpIndexBlockEncoder()Cannot be instantiated. UseINSTANCE
instead.
-
-
Method Details
-
saveMetadata
Description copied from interface:HFileIndexBlockEncoder
Save metadata in HFile which will be written to disk- Specified by:
saveMetadata
in interfaceHFileIndexBlockEncoder
- Parameters:
writer
- writer for a given HFile
-
encode
public void encode(BlockIndexChunk blockIndexChunk, boolean rootIndexBlock, DataOutput out) throws IOException - Specified by:
encode
in interfaceHFileIndexBlockEncoder
- Throws:
IOException
-
writeNonRoot
Writes the block index chunk in the non-root index block format. This format contains the number of entries, an index of integer offsets for quick binary search on variable-length records, and tuples of block offset, on-disk block size, and the first key for each entry.- Throws:
IOException
-
writeRoot
Writes this chunk into the given output stream in the root block index format. This format is similar to theHFile
version 1 block index format, except that we store on-disk size of the block instead of its uncompressed size.- Parameters:
out
- the data output stream to write the block index to. Typically a stream writing into anHFile
block.- Throws:
IOException
-
getIndexBlockEncoding
Description copied from interface:HFileIndexBlockEncoder
Returns the index block encoding- Specified by:
getIndexBlockEncoding
in interfaceHFileIndexBlockEncoder
-
createSeeker
- Specified by:
createSeeker
in interfaceHFileIndexBlockEncoder
-
toString
-