Package org.apache.spark.storage
Class BufferReleasingInputStream
Object
java.io.InputStream
org.apache.spark.storage.BufferReleasingInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
Helper class that ensures a ManagedBuffer is released upon InputStream.close() and
also detects stream corruption if streamCompressedOrEncrypted is true
-
Constructor Summary
ConstructorDescriptionBufferReleasingInputStream
(InputStream delegate, org.apache.spark.storage.ShuffleBlockFetcherIterator iterator, BlockId blockId, int mapIndex, BlockManagerId address, boolean detectCorruption, boolean isNetworkReqDone, scala.Option<CheckedInputStream> checkedInOpt) -
Method Summary
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, skipNBytes, transferTo
-
Constructor Details
-
BufferReleasingInputStream
public BufferReleasingInputStream(InputStream delegate, org.apache.spark.storage.ShuffleBlockFetcherIterator iterator, BlockId blockId, int mapIndex, BlockManagerId address, boolean detectCorruption, boolean isNetworkReqDone, scala.Option<CheckedInputStream> checkedInOpt)
-
-
Method Details
-
available
public int available()- Overrides:
available
in classInputStream
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
-
mark
public void mark(int readlimit) - Overrides:
mark
in classInputStream
-
markSupported
public boolean markSupported()- Overrides:
markSupported
in classInputStream
-
read
public int read()- Specified by:
read
in classInputStream
-
read
public int read(byte[] b) - Overrides:
read
in classInputStream
-
read
public int read(byte[] b, int off, int len) - Overrides:
read
in classInputStream
-
reset
public void reset()- Overrides:
reset
in classInputStream
-
skip
public long skip(long n) - Overrides:
skip
in classInputStream
-