static interface HFileBlock.FSReader
Modifier and Type | Method and Description |
---|---|
HFileBlock.BlockIterator |
blockRange(long startOffset,
long endOffset)
Creates a block iterator over the given portion of the
HFile . |
void |
closeStreams()
Closes the backing streams
|
HFileBlockDecodingContext |
getBlockDecodingContext()
Get a decoder for
BlockType.ENCODED_DATA blocks from this file. |
HFileBlockDecodingContext |
getDefaultBlockDecodingContext()
Get the default decoder for blocks from this file.
|
HFileBlock |
readBlockData(long offset,
long onDiskSize,
boolean pread,
boolean updateMetrics)
Reads the block at the given offset in the file with the given on-disk
size and uncompressed size.
|
void |
setDataBlockEncoder(HFileDataBlockEncoder encoder) |
void |
setIncludesMemStoreTS(boolean includesMemstoreTS) |
void |
unbufferStream()
To close the stream's socket.
|
HFileBlock readBlockData(long offset, long onDiskSize, boolean pread, boolean updateMetrics) throws IOException
offset
- onDiskSize
- the on-disk size of the entire block, including all
applicable headers, or -1 if unknownIOException
HFileBlock.BlockIterator blockRange(long startOffset, long endOffset)
HFile
.
The iterator returns blocks starting with offset such that offset <=
startOffset < endOffset. Returned blocks are always unpacked.
Used when no hfile index available; e.g. reading in the hfile index
blocks themselves on file open.startOffset
- the offset of the block to start iteration withendOffset
- the offset to end iteration at (exclusive)void closeStreams() throws IOException
IOException
HFileBlockDecodingContext getBlockDecodingContext()
BlockType.ENCODED_DATA
blocks from this file.HFileBlockDecodingContext getDefaultBlockDecodingContext()
void setIncludesMemStoreTS(boolean includesMemstoreTS)
void setDataBlockEncoder(HFileDataBlockEncoder encoder)
void unbufferStream()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.