Package com.mapr.fs
Class MapRFsInStream
java.lang.Object
java.io.InputStream
org.apache.hadoop.fs.FSInputStream
com.mapr.fs.MapRFsInStream
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.fs.ByteBufferReadable,org.apache.hadoop.fs.CanSetDropBehind,org.apache.hadoop.fs.CanSetReadahead,org.apache.hadoop.fs.PositionedReadable,org.apache.hadoop.fs.Seekable
public class MapRFsInStream
extends org.apache.hadoop.fs.FSInputStream
implements org.apache.hadoop.fs.ByteBufferReadable, org.apache.hadoop.fs.CanSetReadahead, org.apache.hadoop.fs.CanSetDropBehind
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMapRFsInStream(long clntPtr, long filePtr, String filename, org.apache.hadoop.fs.FileSystem.Statistics stats, com.mapr.fs.jni.InodeAttributes attr, com.mapr.fs.jni.MapRUserInfo userInfo) MapRFsInStream(long clntPtr, long filePtr, String filename, org.apache.hadoop.fs.FileSystem.Statistics stats, com.mapr.fs.jni.MapRUserInfo userInfo) -
Method Summary
Modifier and TypeMethodDescriptionvoidadviseFile(org.apache.hadoop.fs.FSDataInputStream.FadviseType type, long offset, long count) intvoidclose()intgetCacheSize(com.mapr.fs.jni.InodeAttributes iattr) longlong[]longlonggetPos()voidopenAndRead(org.apache.hadoop.fs.PathId pfid, String file, int length) intread()intread(byte[] buffer, int bufOffset, int length) intread(long startPos, byte[] buffer, int bufOffset, int length) intread(ByteBuffer buf) voidreadFully(long pos, byte[] buffer) voidreadFully(long pos, byte[] buffer, int bufOffset, int length) voidseek(long pos) booleanseekToNewSource(long pos) voidsetDropBehind(Boolean dropBehind) voidsetReadahead(Long readAhead) Methods inherited from class org.apache.hadoop.fs.FSInputStream
toString, validatePositionedReadArgsMethods inherited from class java.io.InputStream
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
-
Field Details
-
LOG
public static final org.apache.commons.logging.Log LOG
-
-
Constructor Details
-
MapRFsInStream
protected MapRFsInStream(long clntPtr, long filePtr, String filename, org.apache.hadoop.fs.FileSystem.Statistics stats, com.mapr.fs.jni.InodeAttributes attr, com.mapr.fs.jni.MapRUserInfo userInfo) throws IOException - Throws:
IOException
-
MapRFsInStream
public MapRFsInStream(long clntPtr, long filePtr, String filename, org.apache.hadoop.fs.FileSystem.Statistics stats, com.mapr.fs.jni.MapRUserInfo userInfo) throws IOException - Throws:
IOException
-
-
Method Details
-
getFidStr
-
getFidServers
public long[] getFidServers() -
getChunkSize
public long getChunkSize() -
openAndRead
public void openAndRead(org.apache.hadoop.fs.PathId pfid, String file, int length) throws IOException - Throws:
IOException
-
getCacheSize
public int getCacheSize(com.mapr.fs.jni.InodeAttributes iattr) -
getPos
public long getPos()- Specified by:
getPosin interfaceorg.apache.hadoop.fs.Seekable- Specified by:
getPosin classorg.apache.hadoop.fs.FSInputStream
-
getFileLength
public long getFileLength() -
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
seekToNewSource
public boolean seekToNewSource(long pos) - Specified by:
seekToNewSourcein interfaceorg.apache.hadoop.fs.Seekable- Specified by:
seekToNewSourcein classorg.apache.hadoop.fs.FSInputStream
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Specified by:
readin interfaceorg.apache.hadoop.fs.ByteBufferReadable- Throws:
IOException
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
seek
- Specified by:
seekin interfaceorg.apache.hadoop.fs.Seekable- Specified by:
seekin classorg.apache.hadoop.fs.FSInputStream- Throws:
IOException
-
read
- Specified by:
readin interfaceorg.apache.hadoop.fs.PositionedReadable- Overrides:
readin classorg.apache.hadoop.fs.FSInputStream- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceorg.apache.hadoop.fs.PositionedReadable- Overrides:
readFullyin classorg.apache.hadoop.fs.FSInputStream- Throws:
IOException
-
readFully
- Specified by:
readFullyin interfaceorg.apache.hadoop.fs.PositionedReadable- Overrides:
readFullyin classorg.apache.hadoop.fs.FSInputStream- Throws:
IOException
-
adviseFile
public void adviseFile(org.apache.hadoop.fs.FSDataInputStream.FadviseType type, long offset, long count) throws IOException - Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
setReadahead
- Specified by:
setReadaheadin interfaceorg.apache.hadoop.fs.CanSetReadahead
-
setDropBehind
- Specified by:
setDropBehindin interfaceorg.apache.hadoop.fs.CanSetDropBehind
-