use of io.pravega.controller.stream.api.grpc.v1.Controller.DelegationToken in project pravega by pravega.
the class ControllerServiceImpl method updateSubscriberStreamCut.
@Override
public void updateSubscriberStreamCut(SubscriberStreamCut request, StreamObserver<UpdateSubscriberStatus> responseObserver) {
String scope = request.getStreamCut().getStreamInfo().getScope();
String stream = request.getStreamCut().getStreamInfo().getStream();
String subscriber = request.getSubscriber();
String readerGroupId = request.getReaderGroupId();
long generation = request.getGeneration();
StreamCut streamCut = request.getStreamCut();
RequestTag requestTag = requestTracker.initializeAndTrackRequestTag(controllerService.nextRequestId(), UPDATE_TRUNCATION_STREAM_CUT, scope, stream);
log.info(requestTag.getRequestId(), "updateSubscriberStreamCut called for stream {}/{}.", scope, stream);
authenticateExecuteAndProcessResults(() -> this.grpcAuthHelper.checkAuthorization(authorizationResource.ofStreamInScope(scope, stream), AuthHandler.Permissions.READ_UPDATE), delegationToken -> controllerService.updateSubscriberStreamCut(scope, stream, subscriber, readerGroupId, generation, ImmutableMap.copyOf(ModelHelper.encode(streamCut)), requestTag.getRequestId()), responseObserver, requestTag);
}
Aggregations