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