org.apache.hadoop.hbase.io.hfile
Class HFileReaderV3
java.lang.Object
org.apache.hadoop.hbase.io.hfile.AbstractHFileReader
org.apache.hadoop.hbase.io.hfile.HFileReaderV2
org.apache.hadoop.hbase.io.hfile.HFileReaderV3
- All Implemented Interfaces:
- Closeable, org.apache.hadoop.conf.Configurable, HFile.CachingBlockReader, HFile.Reader
@InterfaceAudience.Private
public class HFileReaderV3
- extends HFileReaderV2
HFile
reader for version 3.
Fields inherited from class org.apache.hadoop.hbase.io.hfile.AbstractHFileReader |
avgKeyLen, avgValueLen, cacheConf, comparator, compressAlgo, conf, dataBlockEncoder, dataBlockIndexReader, fileInfo, fileSize, hfs, istream, istreamNoFsChecksum, lastKey, metaBlockIndexReader, name, path, trailer |
Methods inherited from class org.apache.hadoop.hbase.io.hfile.HFileReaderV2 |
close, close, getDeleteBloomFilterMetadata, getFileContext, getGeneralBloomFilterMetadata, getLastKey, getMetaBlock, hasMVCCInfo, isFileInfoLoaded, midkey, readBlock, shouldIncludeMemstoreTS |
Methods inherited from class org.apache.hadoop.hbase.io.hfile.AbstractHFileReader |
getComparator, getCompressionAlgorithm, getConf, getDataBlockEncoding, getDataBlockIndexReader, getEntries, getFirstKey, getFirstRowKey, getLastRowKey, getName, getPath, getScanner, getTrailer, indexSize, length, loadFileInfo, setConf, toString, toStringFirstKey, toStringLastKey |
MAX_MINOR_VERSION
public static final int MAX_MINOR_VERSION
- See Also:
- Constant Field Values
HFileReaderV3
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
- Opens a HFile. You must load the index before you can use it by calling
AbstractHFileReader.loadFileInfo()
.
- Parameters:
path
- Path to HFile.trailer
- File trailer.fsdis
- input stream.size
- Length of the stream.cacheConf
- Cache configuration.hfs
- The file system.conf
- Configuration
- Throws:
IOException
createHFileContext
protected HFileContext createHFileContext(FSDataInputStreamWrapper fsdis,
long fileSize,
HFileSystem hfs,
org.apache.hadoop.fs.Path path,
FixedFileTrailer trailer)
throws IOException
- Overrides:
createHFileContext
in class HFileReaderV2
- Throws:
IOException
getScanner
public HFileScanner getScanner(boolean cacheBlocks,
boolean pread,
boolean isCompaction)
- Create a Scanner on this file. No seeks or reads are done on creation. Call
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.
- Specified by:
getScanner
in interface HFile.Reader
- Overrides:
getScanner
in class HFileReaderV2
- Parameters:
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?
- Returns:
- Scanner on this file.
getMajorVersion
public int getMajorVersion()
- Overrides:
getMajorVersion
in class HFileReaderV2
Copyright © 2007–2015 The Apache Software Foundation. All rights reserved.