use of alluxio.hub.proto.DeleteMountPointRequest in project alluxio by Alluxio.
the class ManagerProcessContext method startDeleteMountPointListener.
/**
* Starts a request stream observer for {@link HostedManagerServiceGrpc} DeleteMountPoint
* RPC calls.
*/
public void startDeleteMountPointListener() {
HostedManagerServiceGrpc.HostedManagerServiceStub asyncStub = getHostedAsyncStub();
RequestStreamObserver requestObserver = new RequestStreamObserver<DeleteMountPointRequest, DeleteMountPointResponse>() {
@Override
public DeleteMountPointResponse exec(DeleteMountPointRequest req) {
return DeleteMountPointResponse.newBuilder().setHubMetadata(mHubMetadata).setPayload(deleteMount(req.getPayload().getMountPoint())).build();
}
@Override
public void restart() {
startDeleteMountPointListener();
}
@Override
public void handleError(String message, Throwable t) {
handleStatusRuntimeException(message, t);
}
};
StreamObserver<DeleteMountPointResponse> responseObserver = asyncStub.deleteMountPoint(requestObserver);
requestObserver.start(responseObserver, DeleteMountPointResponse.newBuilder().setHubMetadata(mHubMetadata).build());
LOG.info("Started DeleteMountPoint async listener", asyncStub);
}
Aggregations