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