use of alluxio.hub.proto.GetConfigurationSetResponse in project alluxio by Alluxio.
the class ManagerProcessContext method startGetConfigurationSetListener.
/**
* Starts a request stream observer for {@link HostedManagerServiceGrpc} GetConfigurationSet
* RPC calls.
*/
public void startGetConfigurationSetListener() {
HostedManagerServiceGrpc.HostedManagerServiceStub asyncStub = getHostedAsyncStub();
RequestStreamObserver requestObserver = new RequestStreamObserver<GetConfigurationSetRequest, GetConfigurationSetResponse>() {
@Override
public GetConfigurationSetResponse exec(GetConfigurationSetRequest req) {
AlluxioConfigurationSet confSet = configurationSetFor(req.getPayload().getNodeType());
return GetConfigurationSetResponse.newBuilder().setHubMetadata(mHubMetadata).setPayload(GetConfigurationSetResponse.Payload.newBuilder().setConfSet(confSet).build()).build();
}
@Override
public void restart() {
startGetConfigurationSetListener();
}
@Override
public void handleError(String message, Throwable t) {
handleStatusRuntimeException(message, t);
}
};
StreamObserver<GetConfigurationSetResponse> responseObserver = asyncStub.getConfigurationSet(requestObserver);
requestObserver.start(responseObserver, GetConfigurationSetResponse.newBuilder().setHubMetadata(mHubMetadata).build());
LOG.info("Started GetConfigurationSet async listener", asyncStub);
}
Aggregations