zhoulii commented on code in PR #2819:
URL:
https://github.com/apache/incubator-streampark/pull/2819#discussion_r1246181033
##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/FlinkRESTAPIWatcher.java:
##########
@@ -733,12 +717,15 @@ private CheckPoints httpCheckpoints(Application
application, FlinkCluster flinkC
reqURL = String.format(format, application.getJobManagerUrl(),
application.getJobId());
}
return yarnRestRequest(reqURL, CheckPoints.class);
- } else if (ExecutionMode.REMOTE.equals(execMode)
- || ExecutionMode.YARN_SESSION.equals(execMode)) {
+ } else if (ExecutionMode.REMOTE.equals(execMode)) {
Review Comment:
```suggestion
} else if (ExecutionMode.isRemoteMode(execMode)) {
```
##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/FlinkRESTAPIWatcher.java:
##########
@@ -765,4 +752,19 @@ private <T> T httpRestRequest(String url, Class<T> clazz)
throws IOException {
public boolean isWatchingApp(Long id) {
return WATCHING_APPS.containsKey(id);
}
+
+ private <T> T httpClusterOrElseTry(Long clusterId, Callback<FlinkCluster, T>
function)
Review Comment:
nice design.
##########
streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/task/FlinkRESTAPIWatcher.java:
##########
@@ -700,30 +683,31 @@ private JobsOverview httpJobsOverview(Application
application, FlinkCluster flin
reqURL = String.format(format, application.getJobManagerUrl());
}
return yarnRestRequest(reqURL, JobsOverview.class);
- } else if (ExecutionMode.REMOTE.equals(execMode)
- || ExecutionMode.YARN_SESSION.equals(execMode)) {
+ } else if (ExecutionMode.REMOTE.equals(execMode)) {
Review Comment:
```suggestion
} else if (ExecutionMode.isRemoteMode(execMode)) {
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]