Package org.apache.hadoop.hdfs.web
Class WebHdfsFileSystem.WebHdfsInputStream
java.lang.Object
java.io.InputStream
org.apache.hadoop.fs.FSInputStream
org.apache.hadoop.hdfs.web.WebHdfsFileSystem.WebHdfsInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.fs.PositionedReadable,org.apache.hadoop.fs.Seekable
- Enclosing class:
- WebHdfsFileSystem
@VisibleForTesting
public class WebHdfsFileSystem.WebHdfsInputStream
extends org.apache.hadoop.fs.FSInputStream
This class is used for opening, reading, and seeking files while using the
WebHdfsFileSystem. This class will invoke the retry policy when performing
any of these actions.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected intlongprotected org.apache.hadoop.fs.PathgetPath()longgetPos()intread()intread(byte[] b, int off, int len) voidseek(long newPos) booleanseekToNewSource(long targetPos) voidsetFileLength(long len) Methods inherited from class org.apache.hadoop.fs.FSInputStream
read, readFully, readFully, toString, validatePositionedReadArgsMethods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferToMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.hadoop.fs.PositionedReadable
maxReadSizeForVectorReads, minSeekForVectorReads, readVectored, readVectored
-
Method Details
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
seek
- Specified by:
seekin interfaceorg.apache.hadoop.fs.Seekable- Specified by:
seekin classorg.apache.hadoop.fs.FSInputStream- Throws:
IOException
-
getPos
- Specified by:
getPosin interfaceorg.apache.hadoop.fs.Seekable- Specified by:
getPosin classorg.apache.hadoop.fs.FSInputStream- Throws:
IOException
-
getBufferSize
- Throws:
IOException
-
getPath
- Throws:
IOException
-
seekToNewSource
- Specified by:
seekToNewSourcein interfaceorg.apache.hadoop.fs.Seekable- Specified by:
seekToNewSourcein classorg.apache.hadoop.fs.FSInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
setFileLength
public void setFileLength(long len) -
getFileLength
public long getFileLength()
-