public class DefaultBlockWorkerClient extends Object implements BlockWorkerClient
BlockWorkerClient.BlockWorkerClient.Factory| Constructor and Description |
|---|
DefaultBlockWorkerClient(Subject subject,
alluxio.grpc.GrpcServerAddress address,
alluxio.conf.AlluxioConfiguration alluxioConf,
io.netty.channel.EventLoopGroup workerGroup)
Creates a client instance for communicating with block worker.
|
| Modifier and Type | Method and Description |
|---|---|
void |
asyncCache(alluxio.grpc.AsyncCacheRequest request)
Caches a block asynchronously.
|
void |
close() |
io.grpc.stub.StreamObserver<alluxio.grpc.CreateLocalBlockRequest> |
createLocalBlock(io.grpc.stub.StreamObserver<alluxio.grpc.CreateLocalBlockResponse> responseObserver)
Creates a local block on the worker.
|
boolean |
isHealthy() |
boolean |
isShutdown() |
alluxio.grpc.MoveBlockResponse |
moveBlock(alluxio.grpc.MoveBlockRequest request)
Move a block from worker.
|
io.grpc.stub.StreamObserver<alluxio.grpc.OpenLocalBlockRequest> |
openLocalBlock(io.grpc.stub.StreamObserver<alluxio.grpc.OpenLocalBlockResponse> responseObserver)
Opens a local block.
|
io.grpc.stub.StreamObserver<alluxio.grpc.ReadRequest> |
readBlock(io.grpc.stub.StreamObserver<alluxio.grpc.ReadResponse> responseObserver)
Reads a block from the worker.
|
alluxio.grpc.RemoveBlockResponse |
removeBlock(alluxio.grpc.RemoveBlockRequest request)
Removes a block from worker.
|
io.grpc.stub.StreamObserver<alluxio.grpc.WriteRequest> |
writeBlock(io.grpc.stub.StreamObserver<alluxio.grpc.WriteResponse> responseObserver)
Writes a block to the worker asynchronously.
|
public DefaultBlockWorkerClient(Subject subject, alluxio.grpc.GrpcServerAddress address, alluxio.conf.AlluxioConfiguration alluxioConf, io.netty.channel.EventLoopGroup workerGroup) throws IOException
subject - the user subject, can be null if the user is not availableaddress - the address of the workeralluxioConf - Alluxio configurationworkerGroup - The netty EventLoopGroup the channels are will utilizeIOExceptionpublic boolean isShutdown()
isShutdown in interface BlockWorkerClientpublic boolean isHealthy()
isHealthy in interface BlockWorkerClientpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic io.grpc.stub.StreamObserver<alluxio.grpc.WriteRequest> writeBlock(io.grpc.stub.StreamObserver<alluxio.grpc.WriteResponse> responseObserver)
BlockWorkerClientwriteBlock in interface BlockWorkerClientresponseObserver - the stream observer for the server responsepublic io.grpc.stub.StreamObserver<alluxio.grpc.ReadRequest> readBlock(io.grpc.stub.StreamObserver<alluxio.grpc.ReadResponse> responseObserver)
BlockWorkerClientreadBlock in interface BlockWorkerClientresponseObserver - the stream observer for the server responsepublic io.grpc.stub.StreamObserver<alluxio.grpc.CreateLocalBlockRequest> createLocalBlock(io.grpc.stub.StreamObserver<alluxio.grpc.CreateLocalBlockResponse> responseObserver)
BlockWorkerClientcreateLocalBlock in interface BlockWorkerClientresponseObserver - the stream observer for the server responsepublic io.grpc.stub.StreamObserver<alluxio.grpc.OpenLocalBlockRequest> openLocalBlock(io.grpc.stub.StreamObserver<alluxio.grpc.OpenLocalBlockResponse> responseObserver)
BlockWorkerClientopenLocalBlock in interface BlockWorkerClientresponseObserver - the stream observer for the server responsepublic alluxio.grpc.RemoveBlockResponse removeBlock(alluxio.grpc.RemoveBlockRequest request)
BlockWorkerClientremoveBlock in interface BlockWorkerClientrequest - the remove block requestpublic alluxio.grpc.MoveBlockResponse moveBlock(alluxio.grpc.MoveBlockRequest request)
BlockWorkerClientmoveBlock in interface BlockWorkerClientrequest - the remove block requestpublic void asyncCache(alluxio.grpc.AsyncCacheRequest request)
BlockWorkerClientasyncCache in interface BlockWorkerClientrequest - the async cache requestCopyright © 2024. All Rights Reserved.