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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to