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

SparkContext - avoid using local lazy val

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.4.7
    • 2.4.8
    • Spark Core
    • None

    Description

      `org.apache.spark.SparkContext#getCallSite` uses local lazy val for `callsite`. But in scala 2.11, local lazy val need synchronization on the containing object `this` (see https://docs.scala-lang.org/sips/improved-lazy-val-initialization.html#version-6---no-synchronization-on-this-and-concurrent-initialization-of-fields and https://github.com/scala/scala-dev/issues/133 )

      `getCallSite` is called at the job submission, and thus will be a bottle neck if we are submitting a large amount of jobs on a single spark session. We observed thread blocked due to this in our load test.

      Attachments

        Activity

          People

            lxian2 Li Xian
            lxian2 Li Xian
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: