You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/06/10 02:21:25 UTC

[GitHub] [flink-kubernetes-operator] Aitozi commented on a diff in pull request #227: [FLINK-27685] Scale subresource prototype

Aitozi commented on code in PR #227:
URL: https://github.com/apache/flink-kubernetes-operator/pull/227#discussion_r894100904


##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/utils/FlinkUtils.java:
##########
@@ -278,4 +280,10 @@ public static boolean isKubernetesHAActivated(Configuration configuration) {
     public static boolean clusterShutdownDisabled(FlinkDeploymentSpec spec) {
         return spec.getFlinkVersion().isNewerVersionThan(FlinkVersion.v1_14);
     }
+
+    public static int getNumTaskManagers(Configuration conf) {
+        int parallelism = conf.get(CoreOptions.DEFAULT_PARALLELISM);
+        int taskSlots = conf.get(TaskManagerOptions.NUM_TASK_SLOTS);
+        return (parallelism + taskSlots - 1) / taskSlots;

Review Comment:
   what's the meaning of `(parallelism + taskSlots - 1) / taskSlots` ? 



-- 
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