You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "zentol (via GitHub)" <gi...@apache.org> on 2023/04/05 07:37:57 UTC

[GitHub] [flink] zentol commented on a diff in pull request #22350: [FLINK-31471] Allow setting JobResourceRequirements through WEB UI.

zentol commented on code in PR #22350:
URL: https://github.com/apache/flink/pull/22350#discussion_r1158131292


##########
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/RestHandlerConfiguration.java:
##########
@@ -96,13 +105,20 @@ public static RestHandlerConfiguration fromConfiguration(Configuration configura
 
         final boolean webSubmitEnabled = configuration.getBoolean(WebOptions.SUBMIT_ENABLE);
         final boolean webCancelEnabled = configuration.getBoolean(WebOptions.CANCEL_ENABLE);
+        final boolean webRescaleSupported =
+                JobManagerOptions.SchedulerType.Adaptive.equals(

Review Comment:
   Please use ClusterOptions#isAdaptiveSchedulerEnabled and ClusterOptions#isReactiveModeEnabled.



##########
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/RestHandlerConfiguration.java:
##########
@@ -96,13 +105,20 @@ public static RestHandlerConfiguration fromConfiguration(Configuration configura
 
         final boolean webSubmitEnabled = configuration.getBoolean(WebOptions.SUBMIT_ENABLE);
         final boolean webCancelEnabled = configuration.getBoolean(WebOptions.CANCEL_ENABLE);
+        final boolean webRescaleSupported =

Review Comment:
   Note: This may not work as we'd like it to. If the user has configured the adaptive scheduler, but submits a batch job, then the buttons will still be shown.



##########
flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/RestHandlerConfiguration.java:
##########
@@ -96,13 +105,20 @@ public static RestHandlerConfiguration fromConfiguration(Configuration configura
 
         final boolean webSubmitEnabled = configuration.getBoolean(WebOptions.SUBMIT_ENABLE);
         final boolean webCancelEnabled = configuration.getBoolean(WebOptions.CANCEL_ENABLE);
+        final boolean webRescaleSupported =
+                JobManagerOptions.SchedulerType.Adaptive.equals(
+                                configuration.get(JobManagerOptions.SCHEDULER))
+                        && configuration.get(JobManagerOptions.SCHEDULER_MODE) == null;
+        final boolean webRescaleEnabled =

Review Comment:
   Do we want this option to be purely for the UI or also for the REST API as a whole? If the latter, then we could also disable the requirement handlers directly in the endpoint.



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org