Github user nickbp commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21516#discussion_r200472180
  
    --- Diff: 
resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackend.scala
 ---
    @@ -796,6 +811,38 @@ private[spark] class 
MesosCoarseGrainedSchedulerBackend(
           None
         }
       }
    +
    +  // Calls used for metrics polling, see MesosCoarseGrainedSchedulerSource:
    +
    +  def getCoresUsed(): Double = totalCoresAcquired
    --- End diff --
    
    In practice there shouldn't be. In the case of a race, values could be 
briefly out of date but they'd be fine on the following refresh. This structure 
mirrors the dispatcher in `MesosClusterScheduler.scala`, see e.g. 
`getQueuedDriversSize`, `getLaunchedDriversSize`, and 
`getPendingRetryDriversSize` in there.


---

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

Reply via email to