xintongsong 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_r352420189
##########
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)
Review comment:
I'm in favor of make it no default.
Setting it to 1 by default may break the behavior on standalone clusters.
Although we don't have any task that specify their cpu requirements at the
moment, once we have it may prevent us from deploying more tasks onto the task
executor if the machine does have more than one core but the user did not
explicitly configure it.
----------------------------------------------------------------
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