public class AbfsInputStream
extends org.apache.hadoop.fs.FSInputStream
| Constructor and Description |
|---|
AbfsInputStream(AbfsClient client,
org.apache.hadoop.fs.FileSystem.Statistics statistics,
String path,
long contentLength,
int bufferSize,
int readAheadQueueDepth,
boolean tolerateOobAppends,
String eTag) |
| Modifier and Type | Method and Description |
|---|---|
int |
available()
Return the size of the remaining available bytes
if the size is less than or equal to
Integer.MAX_VALUE,
otherwise, return Integer.MAX_VALUE. |
void |
close() |
String |
getPath() |
long |
getPos()
Return the current offset from the start of the file
|
long |
length()
Returns the length of the file that this stream refers to.
|
void |
mark(int readlimit)
Not supported by this stream.
|
boolean |
markSupported()
gets whether mark and reset are supported by
ADLFileInputStream. |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
void |
reset()
Not supported by this stream.
|
void |
seek(long n)
Seek to given position in stream.
|
boolean |
seekToNewSource(long l)
Seeks a different copy of the data.
|
long |
skip(long n) |
read, readFully, readFully, validatePositionedReadArgsreadpublic AbfsInputStream(AbfsClient client, org.apache.hadoop.fs.FileSystem.Statistics statistics, String path, long contentLength, int bufferSize, int readAheadQueueDepth, boolean tolerateOobAppends, String eTag)
public String getPath()
public int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic void seek(long n)
throws IOException
seek in interface org.apache.hadoop.fs.Seekableseek in class org.apache.hadoop.fs.FSInputStreamn - position to seek toIOException - if there is an errorEOFException - if attempting to seek past end of filepublic long skip(long n)
throws IOException
skip in class InputStreamIOExceptionpublic int available()
throws IOException
Integer.MAX_VALUE,
otherwise, return Integer.MAX_VALUE.
This is to match the behavior of DFSInputStream.available(),
which some clients may rely on (HBase write-ahead log reading in
particular).available in class InputStreamIOExceptionpublic long length()
throws IOException
IOException - if the stream is closedpublic long getPos()
throws IOException
getPos in interface org.apache.hadoop.fs.SeekablegetPos in class org.apache.hadoop.fs.FSInputStreamIOException - throws IOException if there is an errorpublic boolean seekToNewSource(long l)
throws IOException
seekToNewSource in interface org.apache.hadoop.fs.SeekableseekToNewSource in class org.apache.hadoop.fs.FSInputStreamIOException - throws IOException if there is an errorpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionpublic void mark(int readlimit)
UnsupportedOperationExceptionmark in class InputStreamreadlimit - ignoredpublic void reset()
throws IOException
UnsupportedOperationExceptionreset in class InputStreamIOExceptionpublic boolean markSupported()
ADLFileInputStream. Always returns false.markSupported in class InputStreamfalseCopyright © 2008–2020 Apache Software Foundation. All rights reserved.