@NotThreadSafe public static class LocalFileDataReader.Factory extends java.lang.Object implements DataReader.Factory
LocalFileDataReaders.| Constructor and Description |
|---|
Factory(FileSystemContext context,
WorkerNetAddress address,
long blockId,
long localReaderChunkSize,
InStreamOptions options)
Creates an instance of
LocalFileDataReader.Factory. |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
DataReader |
create(long offset,
long len)
Creates an instance of
DataReader. |
public Factory(FileSystemContext context, WorkerNetAddress address, long blockId, long localReaderChunkSize, InStreamOptions options) throws java.io.IOException
LocalFileDataReader.Factory.context - the file system contextaddress - the worker addressblockId - the block IDlocalReaderChunkSize - chunk size in bytes for local readsoptions - the InStream optionsjava.io.IOExceptionpublic DataReader create(long offset, long len) throws java.io.IOException
DataReader.FactoryDataReader.create in interface DataReader.Factoryoffset - the stream offsetlen - the length of the streamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablejava.io.IOExceptionCopyright © 2022. All Rights Reserved.