org.apache.hadoop.hbase.io.hfile
Class HFileBlock.FSReaderV2
java.lang.Object
org.apache.hadoop.hbase.io.hfile.HFileBlock.AbstractFSReader
org.apache.hadoop.hbase.io.hfile.HFileBlock.FSReaderV2
- All Implemented Interfaces:
- HFileBlock.FSReader
- Enclosing class:
- HFileBlock
public static class HFileBlock.FSReaderV2
- extends HFileBlock.AbstractFSReader
Reads version 2 blocks from the filesystem.
Method Summary |
HFileBlock |
readBlockData(long offset,
long onDiskSizeWithHeaderL,
int uncompressedSize,
boolean pread)
Reads a version 2 block. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HFileBlock.FSReaderV2
public HFileBlock.FSReaderV2(org.apache.hadoop.fs.FSDataInputStream istream,
Compression.Algorithm compressAlgo,
long fileSize)
readBlockData
public HFileBlock readBlockData(long offset,
long onDiskSizeWithHeaderL,
int uncompressedSize,
boolean pread)
throws IOException
- Reads a version 2 block. Tries to do as little memory allocation as
possible, using the provided on-disk size.
- Parameters:
offset
- the offset in the stream to read atonDiskSizeWithHeaderL
- the on-disk size of the block, including
the header, or -1 if unknownuncompressedSize
- the uncompressed size of the the block. Always
expected to be -1. This parameter is only used in version 1.pread
- whether to use a positional read
- Returns:
- the newly read block
- Throws:
IOException
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.