public class BmcReadAheadFSInputStream extends BmcFSInputStream
FSInputStream implementation that reads ahead to cache chunks of
data. Like in-memory, but memory usage is limited making it suitable for all
files.| Modifier and Type | Class and Description |
|---|---|
static class |
BmcReadAheadFSInputStream.ParquetFooterInfo
Parquet caching.
|
closed, currentPosition, objectStorage, readMaxRetries, requestBuilder, retryMetricsCollector, retryPolicy, sourceInputStream, statistics, status| Constructor and Description |
|---|
BmcReadAheadFSInputStream(com.oracle.bmc.objectstorage.ObjectStorage objectStorage,
FileStatus status,
Supplier<com.oracle.bmc.objectstorage.requests.GetObjectRequest.Builder> requestBuilder,
int readMaxRetries,
FileSystem.Statistics statistics,
int ociReadAheadBlockSize,
com.google.common.cache.Cache<String,BmcReadAheadFSInputStream.ParquetFooterInfo> parquetCache,
RetryMetricsCollector retryMetricsCollector,
boolean firstReadOptimizationForTTFBEnabled,
boolean parquetCacheEnabled) |
BmcReadAheadFSInputStream(com.oracle.bmc.objectstorage.ObjectStorage objectStorage,
FileStatus status,
Supplier<com.oracle.bmc.objectstorage.requests.GetObjectRequest.Builder> requestBuilder,
int readMaxRetries,
FileSystem.Statistics statistics,
int ociReadAheadBlockSize,
String parquetCacheString,
RetryMetricsCollector retryMetricsCollector,
boolean firstReadOptimizationForTTFBEnabled,
boolean parquetCacheEnabled) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected long |
doSeek(long pos)
Perform the requested seek operation.
|
int |
read() |
int |
read(byte[] buffer,
int offset,
int length) |
int |
read(long position,
byte[] buffer,
int offset,
int length) |
void |
readFully(long position,
byte[] buffer) |
void |
readFully(long position,
byte[] buffer,
int offset,
int length) |
boolean |
seekToNewSource(long targetPos)
There are no new sources, this method always returns false.
|
String |
toString() |
available, checkNotClosed, getPos, getSourceInputStream, getStatistics, readAllBytes, readAllBytes, retryPolicy, seek, setSourceInputStream, validateState, wrapvalidatePositionedReadArgsmark, markSupported, read, reset, skipclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitmaxReadSizeForVectorReads, minSeekForVectorReads, readVectoredpublic BmcReadAheadFSInputStream(com.oracle.bmc.objectstorage.ObjectStorage objectStorage,
FileStatus status,
Supplier<com.oracle.bmc.objectstorage.requests.GetObjectRequest.Builder> requestBuilder,
int readMaxRetries,
FileSystem.Statistics statistics,
int ociReadAheadBlockSize,
com.google.common.cache.Cache<String,BmcReadAheadFSInputStream.ParquetFooterInfo> parquetCache,
RetryMetricsCollector retryMetricsCollector,
boolean firstReadOptimizationForTTFBEnabled,
boolean parquetCacheEnabled)
public BmcReadAheadFSInputStream(com.oracle.bmc.objectstorage.ObjectStorage objectStorage,
FileStatus status,
Supplier<com.oracle.bmc.objectstorage.requests.GetObjectRequest.Builder> requestBuilder,
int readMaxRetries,
FileSystem.Statistics statistics,
int ociReadAheadBlockSize,
String parquetCacheString,
RetryMetricsCollector retryMetricsCollector,
boolean firstReadOptimizationForTTFBEnabled,
boolean parquetCacheEnabled)
public int read()
throws IOException
read in class BmcFSInputStreamIOExceptionpublic int read(long position,
byte[] buffer,
int offset,
int length)
throws IOException
read in interface PositionedReadableread in class FSInputStreamIOExceptionpublic int read(byte[] buffer,
int offset,
int length)
throws IOException
read in class BmcFSInputStreamIOExceptionpublic void readFully(long position,
byte[] buffer)
throws IOException
readFully in interface PositionedReadablereadFully in class FSInputStreamIOExceptionpublic void readFully(long position,
byte[] buffer,
int offset,
int length)
throws IOException
readFully in interface PositionedReadablereadFully in class FSInputStreamIOExceptionprotected long doSeek(long pos)
throws IOException
BmcFSInputStreamBmcFSInputStream.setSourceInputStream(InputStream) before returning. The input stream that was
originally created (and wrapped by BmcFSInputStream.wrap(InputStream) can be obtained from
BmcFSInputStream.getSourceInputStream().doSeek in class BmcFSInputStreampos - The position to seek to.IOException - if the operation could not be completedpublic boolean seekToNewSource(long targetPos)
BmcFSInputStream
seekToNewSource in interface SeekableseekToNewSource in class BmcFSInputStreampublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class BmcFSInputStreamIOExceptionpublic String toString()
toString in class FSInputStreamCopyright © 2016–2025. All rights reserved.