public static class GrpcDataReader.Factory extends Object implements DataReader.Factory
GrpcDataReader
s.Constructor and Description |
---|
Factory(FileSystemContext context,
WorkerNetAddress address,
ReadRequest.Builder readRequestBuilder)
Creates an instance of
GrpcDataReader.Factory for block reads. |
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, ReadRequest.Builder readRequestBuilder)
GrpcDataReader.Factory
for block reads.context
- the file system contextaddress
- the worker addressreadRequestBuilder
- the builder of read requestpublic DataReader create(long offset, long len) throws IOException
DataReader.Factory
DataReader
.create
in interface DataReader.Factory
offset
- the stream offsetlen
- the length of the streamIOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2023. All Rights Reserved.