srowen commented on a change in pull request #23758: [SPARK-17454][MESOS] Use 
Mesos disk resources for executors.
URL: https://github.com/apache/spark/pull/23758#discussion_r264722557
 
 

 ##########
 File path: 
resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackend.scala
 ##########
 @@ -550,14 +555,24 @@ private[spark] class MesosCoarseGrainedSchedulerBackend(
     val (nonPortResources, portResourcesToUse) =
       partitionPortResources(nonZeroPortValuesFromConfig(sc.conf), 
afterGPUResources)
 
-    (nonPortResources,
+    var (remainingResources, resourcesToUse) = (nonPortResources,
       cpuResourcesToUse ++ memResourcesToUse ++ portResourcesToUse ++ 
gpuResourcesToUse)
+
+    if (taskDisk.isDefined) {
 
 Review comment:
   This is nice and safe. I think it's OK to be consistent with how GPUs are 
handled -- which may mean it's good to copy your approach for GPU config too. 
You can use a default of 0 for disk too (I suppose that's nice as if someone 
sets it to 0, that should have a similar meaning as not set).

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to