public interface BlockWorkerClient extends Closeable
Modifier and Type | Interface and Description |
---|---|
static class |
BlockWorkerClient.Factory
Factory for block worker client.
|
Modifier and Type | Method and Description |
---|---|
void |
cache(CacheRequest request)
Caches a block.
|
ClearMetricsResponse |
clearMetrics(ClearMetricsRequest request)
Clear the worker metrics.
|
CompleteFilePResponse |
completeFile(CompleteFilePRequest request)
Complete a file when writing is done.
|
com.google.common.util.concurrent.ListenableFuture<CopyResponse> |
copy(CopyRequest request)
copy files from src to dst.
|
CreateDirectoryPResponse |
createDirectory(CreateDirectoryPRequest request)
Create a directory.
|
CreateFilePResponse |
createFile(CreateFilePRequest request)
Create file request from client to worker.
|
DeletePResponse |
delete(DeletePRequest request)
Delete a file from.
|
ExistsPResponse |
exists(ExistsPRequest request)
Check if a file or dir exists.
|
void |
freeWorker()
Free this worker.
|
GetStatusPResponse |
getStatus(GetStatusPRequest request)
get file status.
|
boolean |
isHealthy() |
boolean |
isShutdown() |
Iterator<ListStatusPResponse> |
listStatus(ListStatusPRequest request)
List status from Worker.
|
com.google.common.util.concurrent.ListenableFuture<LoadResponse> |
load(LoadRequest request)
load blocks into alluxio.
|
com.google.common.util.concurrent.ListenableFuture<LoadFileResponse> |
loadFile(LoadFileRequest request)
load files.
|
com.google.common.util.concurrent.ListenableFuture<MoveResponse> |
move(MoveRequest request)
move files from src to dst.
|
MoveBlockResponse |
moveBlock(MoveBlockRequest request)
Move a block from worker.
|
io.grpc.stub.StreamObserver<ReadRequest> |
readBlock(io.grpc.stub.StreamObserver<ReadResponse> responseObserver)
Reads a block from the worker.
|
com.google.common.util.concurrent.ListenableFuture<Object> |
readBlockNoDataBack(ReadRequest request)
Reads a block with getting actual data.
|
RemoveBlockResponse |
removeBlock(RemoveBlockRequest request)
Removes a block from worker.
|
RenamePResponse |
rename(RenamePRequest request)
Rename the src to dst.
|
SetAttributePResponse |
setAttribute(SetAttributePRequest request)
SetAttribute for a file or dir.
|
io.grpc.stub.StreamObserver<WriteRequest> |
writeBlock(io.grpc.stub.StreamObserver<WriteResponse> responseObserver)
Writes a block to the worker asynchronously.
|
boolean isShutdown()
boolean isHealthy()
io.grpc.stub.StreamObserver<WriteRequest> writeBlock(io.grpc.stub.StreamObserver<WriteResponse> responseObserver)
responseObserver
- the stream observer for the server responseio.grpc.stub.StreamObserver<ReadRequest> readBlock(io.grpc.stub.StreamObserver<ReadResponse> responseObserver)
responseObserver
- the stream observer for the server responsecom.google.common.util.concurrent.ListenableFuture<Object> readBlockNoDataBack(ReadRequest request)
request
- the read requestRemoveBlockResponse removeBlock(RemoveBlockRequest request)
request
- the remove block requestio.grpc.StatusRuntimeException
- if any error occursMoveBlockResponse moveBlock(MoveBlockRequest request)
request
- the remove block requestio.grpc.StatusRuntimeException
- if any error occursClearMetricsResponse clearMetrics(ClearMetricsRequest request)
request
- the request to clear metricsvoid cache(CacheRequest request)
request
- the cache requestio.grpc.StatusRuntimeException
- if any error occursvoid freeWorker()
com.google.common.util.concurrent.ListenableFuture<LoadResponse> load(LoadRequest request)
request
- the cache requestio.grpc.StatusRuntimeException
- if any error occurscom.google.common.util.concurrent.ListenableFuture<LoadFileResponse> loadFile(LoadFileRequest request)
request
- GetStatusPResponse getStatus(GetStatusPRequest request)
request
- Iterator<ListStatusPResponse> listStatus(ListStatusPRequest request)
request
- com.google.common.util.concurrent.ListenableFuture<CopyResponse> copy(CopyRequest request)
request
- the copy requestio.grpc.StatusRuntimeException
- if any error occurscom.google.common.util.concurrent.ListenableFuture<MoveResponse> move(MoveRequest request)
request
- the move requestio.grpc.StatusRuntimeException
- if any error occursCreateFilePResponse createFile(CreateFilePRequest request)
request
- the request to create a fileCompleteFilePResponse completeFile(CompleteFilePRequest request)
request
- the request to complete a fileDeletePResponse delete(DeletePRequest request)
request
- the request to delete a fileRenamePResponse rename(RenamePRequest request)
request
- the request to do renameCreateDirectoryPResponse createDirectory(CreateDirectoryPRequest request)
request
- the request to create a dirExistsPResponse exists(ExistsPRequest request)
request
- the request to do the cechkingSetAttributePResponse setAttribute(SetAttributePRequest request)
request
- the request to do the operationCopyright © 2023. All Rights Reserved.