Package org.apache.hadoop.hbase.io.hfile
Interface HFile.Reader
- All Superinterfaces:
AutoCloseable,Closeable,HFile.CachingBlockReader
- All Known Implementing Classes:
HFilePreadReader,HFileReaderImpl,HFileStreamReader
- Enclosing class:
- HFile
An interface used by clients to open and iterate an
HFile.-
Method Summary
Modifier and TypeMethodDescriptionvoidclose(boolean evictOnClose) Close method with optional evictOnCloseRetrieves delete family Bloom filter metadata as appropriate for eachHFileversion.getEffectiveEncodingInCache(boolean isCompaction) longReturn the file context of the HFile this reader belongs toOptional<byte[]>Retrieves general Bloom filter metadata as appropriate for eachHFileversion.Optional<byte[]>getMetaBlock(String metaBlockName, boolean cacheBlock) getName()Returns this reader's "name".org.apache.hadoop.fs.PathgetPath()getScanner(org.apache.hadoop.conf.Configuration conf, boolean cacheBlocks, boolean pread) getScanner(org.apache.hadoop.conf.Configuration conf, boolean cacheBlocks, boolean pread, boolean isCompaction) booleanlongbooleanlonglength()midKey()booleanbooleanvoidsetDataBlockEncoder(HFileDataBlockEncoder dataBlockEncoder) voidvoidvoidTo close the stream's socket.Methods inherited from interface org.apache.hadoop.hbase.io.hfile.HFile.CachingBlockReader
readBlock, readBlock
-
Method Details
-
getName
Returns this reader's "name". Usually the last component of the path. Needs to be constant as the file is being moved to support caching on write. -
getComparator
-
getScanner
HFileScanner getScanner(org.apache.hadoop.conf.Configuration conf, boolean cacheBlocks, boolean pread, boolean isCompaction) -
getMetaBlock
- Throws:
IOException
-
getLastKey
-
midKey
- Throws:
IOException
-
length
long length() -
getEntries
long getEntries() -
getFirstKey
-
indexSize
long indexSize() -
getFirstRowKey
Optional<byte[]> getFirstRowKey() -
getLastRowKey
Optional<byte[]> getLastRowKey() -
getTrailer
-
setDataBlockIndexReader
-
getDataBlockIndexReader
-
setMetaBlockIndexReader
-
getMetaBlockIndexReader
-
getScanner
HFileScanner getScanner(org.apache.hadoop.conf.Configuration conf, boolean cacheBlocks, boolean pread) -
getGeneralBloomFilterMetadata
Retrieves general Bloom filter metadata as appropriate for eachHFileversion. Knows nothing about how that metadata is structured.- Throws:
IOException
-
getDeleteBloomFilterMetadata
Retrieves delete family Bloom filter metadata as appropriate for eachHFileversion. Knows nothing about how that metadata is structured.- Throws:
IOException
-
getPath
org.apache.hadoop.fs.Path getPath() -
close
Close method with optional evictOnClose- Throws:
IOException
-
getDataBlockEncoding
-
hasMVCCInfo
boolean hasMVCCInfo() -
getFileContext
Return the file context of the HFile this reader belongs to -
isPrimaryReplicaReader
boolean isPrimaryReplicaReader() -
getEffectiveEncodingInCache
-
getUncachedBlockReader
-
prefetchComplete
boolean prefetchComplete() -
prefetchStarted
boolean prefetchStarted() -
unbufferStream
void unbufferStream()To close the stream's socket. Note: This can be concurrently called from multiple threads and implementation should take care of thread safety. -
getContext
-
getHFileInfo
-
setDataBlockEncoder
-