spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dragos <>
Subject [GitHub] spark pull request: [SPARK-12832][CORE] Fix dispatcher does not ha...
Date Fri, 15 Jan 2016 15:04:22 GMT
Github user dragos commented on a diff in the pull request:
    --- Diff: core/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosClusterScheduler.scala
    @@ -519,6 +521,20 @@ private[spark] class MesosClusterScheduler(
         val currentTime = new Date()
         stateLock.synchronized {
    +      var it = offers.iterator()
    +      while (it.hasNext) {
    +        val offer =
    +        val offerAttributes = toAttributeMap(offer.getAttributesList)
    +        val meetsConstraints = matchesAttributeRequirements(driverOfferConstraints, offerAttributes)
    +        if (!meetsConstraints) {
    +          driver.declineOffer(offer.getId)
    +          it.remove()
    --- End diff --
    I'd rather not mutate the underlying collection. Anyhow, this has no effect because the
code below is using `currentOffers`, which is a copy of the original resources made earlier.
I suggest you insert this filter at that point.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message