Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-2269

Clean up and add unit tests for resourceOffers in MesosSchedulerBackend

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.0
    • Fix Version/s: 1.2.0
    • Component/s: Mesos
    • Labels:
      None
    • Target Version/s:

      Description

      This function could be simplified a bit. We could re-write it without offerableIndices or creating the mesosTasks array as large as the offer list. There is a lot of logic around making sure you get the correct index into mesosTasks and offers, really we should just build mesosTasks directly from the offers we get back. To associate the tasks we are launching with the offers we can just create a hashMap from the slaveId to the original offer.

      The basic logic of the function is that you take the mesos offers, convert them to spark offers, then convert the results back.

      One reason I think it might be designed as it is now is to deal with the case where Mesos gives multiple offers for a single slave. I checked directly with the Mesos team and they said this won't ever happen, you'll get at most one offer per mesos slave within a set of offers.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                chengt Tim Chen
                Reporter:
                pwendell Patrick Wendell
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: