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

Duplicate call in FairSchedulableBuilder.addTaskSetManager

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 2.1.0
    • 2.2.0
    • Scheduler, Spark Core
    • None

    Description

      org.apache.spark.scheduler.FairSchedulableBuilder#addTaskSetManager contains the code snippet:

        override def addTaskSetManager(manager: Schedulable, properties: Properties) {
          var poolName = DEFAULT_POOL_NAME
          var parentPool = rootPool.getSchedulableByName(poolName)
          if (properties != null) {
            poolName = properties.getProperty(FAIR_SCHEDULER_PROPERTIES, DEFAULT_POOL_NAME)
            parentPool = rootPool.getSchedulableByName(poolName)
            if (parentPool == null) {
      

      parentPool = rootPool.getSchedulableByName(poolName) is called twice if properties != null.

      I'm not sure whether this is an oversight or there's something else missing. This piece of the code hasn't been modified since 2013, so I doubt that this is a serious issue.

      Attachments

        Activity

          People

            snazy Robert Stupp
            snazy Robert Stupp
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: