@InterfaceAudience.Private public class HFileReaderV3 extends HFileReaderV2
HFile
reader for version 3.Modifier and Type | Class and Description |
---|---|
protected static class |
HFileReaderV3.EncodedScannerV3
ScannerV3 that operates on encoded data blocks.
|
protected static class |
HFileReaderV3.ScannerV3
Implementation of
HFileScanner interface. |
HFileReaderV2.AbstractScannerV2, HFileReaderV2.EncodedScannerV2, HFileReaderV2.ScannerV2
AbstractHFileReader.BlockIndexNotLoadedException, AbstractHFileReader.NotSeekedException, AbstractHFileReader.Scanner
Modifier and Type | Field and Description |
---|---|
static int |
MAX_MINOR_VERSION |
decodeMemstoreTS, KEY_VALUE_LEN_SIZE, MINOR_VERSION_NO_CHECKSUM, MINOR_VERSION_WITH_CHECKSUM, PBUF_TRAILER_MINOR_VERSION
avgKeyLen, avgValueLen, cacheConf, comparator, compressAlgo, conf, dataBlockEncoder, dataBlockIndexReader, fileInfo, fileSize, hfs, lastKey, metaBlockIndexReader, name, path, trailer
Constructor and Description |
---|
HFileReaderV3(org.apache.hadoop.fs.Path path,
FixedFileTrailer trailer,
FSDataInputStreamWrapper fsdis,
long size,
CacheConfig cacheConf,
HFileSystem hfs,
org.apache.hadoop.conf.Configuration conf)
Opens a HFile.
|
Modifier and Type | Method and Description |
---|---|
protected HFileContext |
createHFileContext(FSDataInputStreamWrapper fsdis,
long fileSize,
HFileSystem hfs,
org.apache.hadoop.fs.Path path,
FixedFileTrailer trailer) |
int |
getMajorVersion() |
HFileScanner |
getScanner(boolean cacheBlocks,
boolean pread,
boolean isCompaction)
Create a Scanner on this file.
|
close, close, getDeleteBloomFilterMetadata, getEffectiveEncodingInCache, getFileContext, getGeneralBloomFilterMetadata, getLastKey, getMetaBlock, hasMVCCInfo, isFileInfoLoaded, midkey, readBlock, shouldIncludeMemstoreTS, unbufferStream
getComparator, getCompressionAlgorithm, getConf, getDataBlockEncoding, getDataBlockIndexReader, getEntries, getFirstKey, getFirstRowKey, getLastRowKey, getName, getPath, getScanner, getTrailer, indexSize, isPrimaryReplicaReader, length, loadFileInfo, setConf, setPrimaryReplicaReader, toString, toStringFirstKey, toStringLastKey
public static final int MAX_MINOR_VERSION
public HFileReaderV3(org.apache.hadoop.fs.Path path, FixedFileTrailer trailer, FSDataInputStreamWrapper fsdis, long size, CacheConfig cacheConf, HFileSystem hfs, org.apache.hadoop.conf.Configuration conf) throws IOException
AbstractHFileReader.loadFileInfo()
.path
- Path to HFile.trailer
- File trailer.fsdis
- input stream.size
- Length of the stream.cacheConf
- Cache configuration.hfs
- The file system.conf
- ConfigurationIOException
protected HFileContext createHFileContext(FSDataInputStreamWrapper fsdis, long fileSize, HFileSystem hfs, org.apache.hadoop.fs.Path path, FixedFileTrailer trailer) throws IOException
createHFileContext
in class HFileReaderV2
IOException
public HFileScanner getScanner(boolean cacheBlocks, boolean pread, boolean isCompaction)
HFileScanner.seekTo(byte[])
to position an start the read. There is
nothing to clean up in a Scanner. Letting go of your references to the
scanner is sufficient.getScanner
in interface HFile.Reader
getScanner
in class HFileReaderV2
cacheBlocks
- True if we should cache blocks read in by this scanner.pread
- Use positional read rather than seek+read if true (pread is better
for random reads, seek+read is better scanning).isCompaction
- is scanner being used for a compaction?public int getMajorVersion()
getMajorVersion
in class HFileReaderV2
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.