@NotThreadSafe public final class BlockReadHandler extends Object
AbstractReadHandler
.Modifier and Type | Class and Description |
---|---|
class |
BlockReadHandler.BlockDataReader
The data reader to read from a local block worker.
|
Modifier and Type | Field and Description |
---|---|
protected Executor |
mSerializingExecutor
A serializing executor for sending responses.
|
protected AuthenticatedUserInfo |
mUserInfo |
Constructor and Description |
---|
BlockReadHandler(ExecutorService executorService,
BlockWorker blockWorker,
io.grpc.stub.StreamObserver<ReadResponse> responseObserver,
AuthenticatedUserInfo userInfo,
boolean domainSocketEnabled)
Creates an instance of
AbstractReadHandler . |
Modifier and Type | Method and Description |
---|---|
protected alluxio.worker.grpc.AbstractReadHandler.DataReader |
createDataReader(BlockReadRequestContext context,
io.grpc.stub.StreamObserver<ReadResponse> response)
Creates a read reader.
|
protected BlockReadRequestContext |
createRequestContext(ReadRequest request) |
void |
onCompleted() |
void |
onError(Throwable cause) |
void |
onNext(ReadRequest request) |
void |
onReady() |
boolean |
tooManyPendingChunks() |
protected Executor mSerializingExecutor
protected AuthenticatedUserInfo mUserInfo
public BlockReadHandler(ExecutorService executorService, BlockWorker blockWorker, io.grpc.stub.StreamObserver<ReadResponse> responseObserver, AuthenticatedUserInfo userInfo, boolean domainSocketEnabled)
AbstractReadHandler
.executorService
- the executor service to run DataReader
sblockWorker
- the block workerresponseObserver
- the response observer of the gRPC streamuserInfo
- the authenticated user infodomainSocketEnabled
- whether reading block over domain socketprotected BlockReadRequestContext createRequestContext(ReadRequest request)
request
- the block read requestprotected alluxio.worker.grpc.AbstractReadHandler.DataReader createDataReader(BlockReadRequestContext context, io.grpc.stub.StreamObserver<ReadResponse> response)
context
- read request contextresponse
- channelpublic void onNext(ReadRequest request)
onNext
in interface io.grpc.stub.StreamObserver<ReadRequest>
public boolean tooManyPendingChunks()
public void onError(Throwable cause)
onError
in interface io.grpc.stub.StreamObserver<ReadRequest>
public void onCompleted()
onCompleted
in interface io.grpc.stub.StreamObserver<ReadRequest>
public void onReady()
Copyright © 2023. All Rights Reserved.