|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.io.FSDataInputStreamWrapper
public class FSDataInputStreamWrapper
Wrapper for input stream(s) that takes care of the interaction of FS and HBase checksums, as well as closing streams. Initialization is not thread-safe, but normal operation is; see method comments.
Constructor Summary | |
---|---|
FSDataInputStreamWrapper(org.apache.hadoop.fs.FileSystem fs,
FileLink link)
|
|
FSDataInputStreamWrapper(org.apache.hadoop.fs.FileSystem fs,
FileLink link,
boolean dropBehind)
|
|
FSDataInputStreamWrapper(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path)
|
|
FSDataInputStreamWrapper(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path path,
boolean dropBehind)
|
|
FSDataInputStreamWrapper(org.apache.hadoop.fs.FSDataInputStream fsdis)
For use in tests. |
|
FSDataInputStreamWrapper(org.apache.hadoop.fs.FSDataInputStream fsdis,
org.apache.hadoop.fs.FSDataInputStream noChecksum)
For use in tests. |
Method Summary | |
---|---|
void |
checksumOk()
Report that checksum was ok, so we may ponder going back to HBase checksum. |
void |
close()
Close stream(s) if necessary. |
org.apache.hadoop.fs.FSDataInputStream |
fallbackToFsChecksum(int offCount)
Read from non-checksum stream failed, fall back to FS checksum. |
HFileSystem |
getHfs()
|
org.apache.hadoop.fs.FSDataInputStream |
getStream(boolean useHBaseChecksum)
Get the stream to use. |
void |
prepareForBlockReader(boolean forceNoHBaseChecksum)
Prepares the streams for block reader. |
boolean |
shouldUseHBaseChecksum()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FSDataInputStreamWrapper(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path) throws IOException
IOException
public FSDataInputStreamWrapper(org.apache.hadoop.fs.FileSystem fs, org.apache.hadoop.fs.Path path, boolean dropBehind) throws IOException
IOException
public FSDataInputStreamWrapper(org.apache.hadoop.fs.FileSystem fs, FileLink link) throws IOException
IOException
public FSDataInputStreamWrapper(org.apache.hadoop.fs.FileSystem fs, FileLink link, boolean dropBehind) throws IOException
IOException
public FSDataInputStreamWrapper(org.apache.hadoop.fs.FSDataInputStream fsdis)
public FSDataInputStreamWrapper(org.apache.hadoop.fs.FSDataInputStream fsdis, org.apache.hadoop.fs.FSDataInputStream noChecksum)
Method Detail |
---|
public void prepareForBlockReader(boolean forceNoHBaseChecksum) throws IOException
forceNoHBaseChecksum
- Force not using HBase checksum.
IOException
public boolean shouldUseHBaseChecksum()
public org.apache.hadoop.fs.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 org.apache.hadoop.fs.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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |