public class FSDataInputStreamWrapper
extends java.lang.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() |
void |
unbuffer()
This will free sockets and file descriptors held by the stream only when the stream implements
org.apache.hadoop.fs.CanUnbuffer.
|
public FSDataInputStreamWrapper(FileSystem fs,
Path path)
throws java.io.IOException
java.io.IOExceptionpublic FSDataInputStreamWrapper(FileSystem fs,
FileLink link)
throws java.io.IOException
java.io.IOExceptionpublic FSDataInputStreamWrapper(FSDataInputStream fsdis)
public FSDataInputStreamWrapper(FSDataInputStream fsdis,
FSDataInputStream noChecksum)
public void prepareForBlockReader(boolean forceNoHBaseChecksum)
throws java.io.IOException
forceNoHBaseChecksum - Force not using HBase checksum.java.io.IOExceptionpublic 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 java.io.IOException
offCount - For how many checksumOk calls to turn off the HBase checksum.java.io.IOExceptionpublic void checksumOk()
public void close()
throws java.io.IOException
java.io.IOExceptionpublic HFileSystem getHfs()
public void unbuffer()