Github user ArtRand commented on a diff in the pull request:
https://github.com/apache/spark/pull/19390#discussion_r147067951
--- Diff:
resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosCoarseGrainedSchedulerBackend.scala
---
@@ -349,13 +349,22 @@ private[spark] class
MesosCoarseGrainedSchedulerBackend(
val offerMem = getResource(offer.getResourcesList, "mem")
val offerCpus = getResource(offer.getResourcesList, "cpus")
val offerPorts = getRangeResource(offer.getResourcesList, "ports")
+ val offerAllocationInfo = offer.getAllocationInfo
+ val offerReservationInfo = offer
+ .getResourcesList
+ .asScala
+ .find(resource => Option(resource.getReservation).isDefined)
--- End diff --
could you not just use `resource.hasReservation` here instead of defining a
whole new method?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]