flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eastcirclek <...@git.apache.org>
Subject [GitHub] flink pull request #5307: [FLINK-8431] [mesos] Allow to specify # GPUs for T...
Date Fri, 19 Jan 2018 02:35:34 GMT
Github user eastcirclek commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5307#discussion_r162525499
  
    --- Diff: flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosTaskManagerParameters.java
---
    @@ -238,6 +254,16 @@ public static MesosTaskManagerParameters create(Configuration flinkConfig)
{
     			cpus = Math.max(containeredParameters.numSlots(), 1.0);
     		}
     
    +		double gpus = flinkConfig.getDouble(MESOS_RM_TASKS_GPUS, 0.0);
    +		if (gpus < 0) {
    +			throw new IllegalConfigurationException(MESOS_RM_TASKS_GPUS.key() +
    +				" cannot be negative");
    +		}
    +		if (gpus % 1 != 0) {
    --- End diff --
    
    We'd better be on the safe side as you said. 


---

Mime
View raw message