public class FSDataInputStreamWrapper extends Object
Constructor and Description |
---|
FSDataInputStreamWrapper(FileSystem fs,
FileLink link) |
FSDataInputStreamWrapper(FileSystem fs,
Path path) |
FSDataInputStreamWrapper(FSDataInputStream fsdis)
For use in tests.
|
FSDataInputStreamWrapper(FSDataInputStream fsdis,
FSDataInputStream noChecksum)
For use in tests.
|
Modifier and Type | Method and Description |
---|---|
void |
checksumOk()
Report that checksum was ok, so we may ponder going back to HBase checksum.
|
void |
close()
Close stream(s) if necessary.
|
FSDataInputStream |
fallbackToFsChecksum(int offCount)
Read from non-checksum stream failed, fall back to FS checksum.
|
HFileSystem |
getHfs() |
FSDataInputStream |
getStream(boolean useHBaseChecksum)
Get the stream to use.
|
void |
prepareForBlockReader(boolean forceNoHBaseChecksum)
Prepares the streams for block reader.
|
boolean |
shouldUseHBaseChecksum() |
public FSDataInputStreamWrapper(FileSystem fs, Path path) throws IOException
IOException
public FSDataInputStreamWrapper(FileSystem fs, FileLink link) throws IOException
IOException
public FSDataInputStreamWrapper(FSDataInputStream fsdis)
public FSDataInputStreamWrapper(FSDataInputStream fsdis, FSDataInputStream noChecksum)
public void prepareForBlockReader(boolean forceNoHBaseChecksum) throws IOException
forceNoHBaseChecksum
- Force not using HBase checksum.IOException
public boolean shouldUseHBaseChecksum()
public FSDataInputStream getStream(boolean useHBaseChecksum)
useHBaseChecksum
- must be the value that shouldUseHBaseChecksum has returned
at some point in the past, otherwise the result is undefined.public FSDataInputStream fallbackToFsChecksum(int offCount) throws IOException
offCount
- For how many checksumOk calls to turn off the HBase checksum.IOException
public void checksumOk()
public void close() throws IOException
IOException
public HFileSystem getHfs()