public class FSDataInputStreamWrapper extends Object
Constructor and Description |
---|
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.
|
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.
|
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() |
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(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)
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()
public void unbuffer()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.