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

Use getOrElse() instead of contains() in ResourceAllocator

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 3.4.0
    • 3.5.0
    • Spark Core
    • None

    Description

      In ResourceAllocator, we can use `.getOrElse(address, throw new SparkException(...))` instead of one `contains` which can gain better performance.

      Attachments

        Activity

          People

            zhongjingxiong jingxiong zhong
            zhongjingxiong jingxiong zhong
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: