@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.ScannerV2AbstractHFileReader.BlockIndexNotLoadedException, AbstractHFileReader.NotSeekedException, AbstractHFileReader.Scanner| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_MINOR_VERSION |
decodeMemstoreTS, fsBlockReader, hfileContext, includesMemstoreTS, KEY_VALUE_LEN_SIZE, MINOR_VERSION_NO_CHECKSUM, MINOR_VERSION_WITH_CHECKSUM, PBUF_TRAILER_MINOR_VERSIONavgKeyLen, avgValueLen, cacheConf, comparator, compressAlgo, conf, dataBlockEncoder, dataBlockIndexReader, fileInfo, fileSize, hfs, istream, istreamNoFsChecksum, 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, getFileContext, getGeneralBloomFilterMetadata, getLastKey, getMetaBlock, hasMVCCInfo, isFileInfoLoaded, midkey, readBlock, shouldIncludeMemstoreTSgetComparator, getCompressionAlgorithm, getConf, getDataBlockEncoding, getDataBlockIndexReader, getEntries, getFirstKey, getFirstRowKey, getLastRowKey, getName, getPath, getScanner, getTrailer, indexSize, length, loadFileInfo, setConf, toString, toStringFirstKey, toStringLastKeypublic 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 - ConfigurationIOExceptionprotected HFileContext createHFileContext(FSDataInputStreamWrapper fsdis, long fileSize, HFileSystem hfs, org.apache.hadoop.fs.Path path, FixedFileTrailer trailer) throws IOException
createHFileContext in class HFileReaderV2IOExceptionpublic 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.ReadergetScanner in class HFileReaderV2cacheBlocks - 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 HFileReaderV2Copyright © 2014 The Apache Software Foundation. All rights reserved.