use of io.pravega.shared.controller.tracing.RPCTracingTags.IS_STREAMCUT_VALID in project pravega by pravega.
the class ControllerServiceImpl method isStreamCutValid.
@Override
public void isStreamCutValid(Controller.StreamCut request, StreamObserver<Controller.StreamCutValidityResponse> responseObserver) {
RequestTag requestTag = requestTracker.initializeAndTrackRequestTag(controllerService.nextRequestId(), IS_STREAMCUT_VALID, request.getStreamInfo().getScope(), request.getStreamInfo().getStream());
log.info(requestTag.getRequestId(), "isStreamCutValid called for stream {}/{} streamcut {}.", request.getStreamInfo().getScope(), request.getStreamInfo().getStream(), request.getCutMap());
authenticateExecuteAndProcessResults(() -> this.grpcAuthHelper.checkAuthorizationAndCreateToken(authorizationResource.ofStreamInScope(request.getStreamInfo().getScope(), request.getStreamInfo().getStream()), AuthHandler.Permissions.READ), delegationToken -> controllerService.isStreamCutValid(request.getStreamInfo().getScope(), request.getStreamInfo().getStream(), request.getCutMap(), requestTag.getRequestId()).thenApply(bRes -> Controller.StreamCutValidityResponse.newBuilder().setResponse(bRes).build()), responseObserver);
}
Aggregations