kaibozhou commented on a change in pull request #11250: [FLINK-16302][rest]add
log list and read log by name for taskmanager
URL: https://github.com/apache/flink/pull/11250#discussion_r393732242
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/taskmanager/AbstractTaskManagerHandler.java
##########
@@ -65,13 +64,24 @@ protected AbstractTaskManagerHandler(
@Override
protected CompletableFuture<P> handleRequest(@Nonnull HandlerRequest<R,
M> request, @Nonnull T gateway) throws RestHandlerException {
- Optional<ResourceManagerGateway> resourceManagerGatewayOptional
= resourceManagerGatewayRetriever.getNow();
-
- ResourceManagerGateway resourceManagerGateway =
resourceManagerGatewayOptional.orElseThrow(
- () -> new RestHandlerException("Cannot connect to
ResourceManager right now. Please try to refresh.",
HttpResponseStatus.NOT_FOUND));
+ ResourceManagerGateway resourceManagerGateway =
getResourceManagerGateway(resourceManagerGatewayRetriever);
return handleRequest(request, resourceManagerGateway);
}
protected abstract CompletableFuture<P> handleRequest(@Nonnull
HandlerRequest<R, M> request, @Nonnull ResourceManagerGateway gateway) throws
RestHandlerException;
+
+ /**
+ * Get ResourceManagerGateway from GatewayRetriever
ResourceManagerGateway.
+ * @param resourceManagerGatewayRetriever
+ * @return ResourceManagerGateway
+ * @throws RestHandlerException
Review comment:
`resourceManagerGatewayRetriever` and `RestHandlerException` tag desc is
missing
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services