azagrebin commented on a change in pull request #10146: [FLINK-14188][runtime] 
TaskExecutor derive and register with default slot resource profile
URL: https://github.com/apache/flink/pull/10146#discussion_r351864748
 
 

 ##########
 File path: 
flink-core/src/main/java/org/apache/flink/configuration/TaskManagerOptions.java
 ##########
 @@ -217,9 +217,22 @@
                                .build());
 
        // 
------------------------------------------------------------------------
-       //  Memory Options
+       //  Resource Options
        // 
------------------------------------------------------------------------
 
+       /**
+        * This config key is used for passing cpu cores into TaskExecutors.
+        * There're YarnConfigOptions#VCORES and 
MesosTaskManagerParameters#MESOS_RM_TASKS_CPUS for configuring TM container
+        * CPU on Yarn and Mesos respectively.
+        */
+       public static final ConfigOption<Double> CPU_CORES =
+               key("taskmanager.cpu.cores")
+                       .doubleType()
+                       .defaultValue(-1.0)
+                       .withDescription("CPU cores for the TaskExecutors. If 
not explicitly configured, legacy config "
+                               + "options 'yarn.containers.vcores' and 
'mesos.resourcemanager.tasks.cpus' will be used for Yarn / Mesos "
+                               + "setups, and an unlimited number of cpu cores 
will be set for standalone setups.");
 
 Review comment:
   we should probably mention here that it `CPU_CORES` has to be an integer in 
case of yarn and check it as well in `YarnResourceManager`.

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

Reply via email to