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 ClassesNested classes/interfaces inherited from interface org.apache.hadoop.hbase.io.hfile.HFileIndexBlockEncoder
HFileIndexBlockEncoder.EncodedSeeker -
Field Summary
FieldsFields inherited from interface org.apache.hadoop.hbase.io.hfile.HFileIndexBlockEncoder
INDEX_BLOCK_ENCODING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidencode(BlockIndexChunk blockIndexChunk, boolean rootIndexBlock, DataOutput out) Returns the index block encodingvoidsaveMetadata(HFile.Writer writer) Save metadata in HFile which will be written to disktoString()private voidwriteNonRoot(BlockIndexChunk blockIndexChunk, DataOutput out) Writes the block index chunk in the non-root index block format.private voidwriteRoot(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. UseINSTANCEinstead.
-
-
Method Details
-
saveMetadata
Description copied from interface:HFileIndexBlockEncoderSave metadata in HFile which will be written to disk- Specified by:
saveMetadatain interfaceHFileIndexBlockEncoder- Parameters:
writer- writer for a given HFile
-
encode
public void encode(BlockIndexChunk blockIndexChunk, boolean rootIndexBlock, DataOutput out) throws IOException - Specified by:
encodein 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 theHFileversion 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 anHFileblock.- Throws:
IOException
-
getIndexBlockEncoding
Description copied from interface:HFileIndexBlockEncoderReturns the index block encoding- Specified by:
getIndexBlockEncodingin interfaceHFileIndexBlockEncoder
-
createSeeker
- Specified by:
createSeekerin interfaceHFileIndexBlockEncoder
-
toString
-