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 2019/12/13 15:32:05 UTC

[GitHub] [flink] tillrohrmann commented on a change in pull request #10571: [FLINK-15241] Revert the unexpected change of the configuration for M…

tillrohrmann commented on a change in pull request #10571: [FLINK-15241] Revert the unexpected change of the configuration for M…
URL: https://github.com/apache/flink/pull/10571#discussion_r357700091
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/TaskExecutorResourceUtils.java
 ##########
 @@ -570,7 +570,7 @@ private static CPUResource getCpuCores(final Configuration config, double fallba
 			if (cpuCores < 0) {
 				throw new IllegalConfigurationException("Configured cpu cores must be non-negative.");
 			}
-		} else if (fallback >= 0.0) {
 
 Review comment:
   Looking at the other code in the if branch above this one, it looks as if `0` would be a valid `CPU_CORES` value. If we want to keep it consistent one needs to touch this branch as well or we change the default of `MESOS_RM_TASKS_CPUS` to a negative value.
   
   Maybe the reason to allow `0` CPUs is to accept only slot requests which don't require cores in their `ResourceSpec`. But maybe @xintongsong can tell us more why `TaskExecutorResourceUtils#getCpuCores` allows to return `0` cores.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services