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

Choose classloader consistently inside of Spark codebase

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 1.0.0
    • Spark Core
    • None

    Description

      The Spark codebase is not always consistent on which class loader it uses when classlaoders are explicitly passed to things like serializers. This caused SPARK-1403 and also causes a bug where when the driver has a modified context class loader it is not translated correctly in local mode to the (local) executor.

      In most cases what we want is the following behavior:
      1. If there is a context classloader on the thread, use that.
      2. Otherwise use the classloader that loaded Spark.

      We should just have a utility function for this and call that function whenever we need to get a classloader.

      Note that SPARK-1403 is a workaround for this exact problem (it sets the context class loader because downstream code assumes it is set). Once this gets fixed in a more general way SPARK-1403 can be reverted.

      Attachments

        Issue Links

          Activity

            People

              pwendell Patrick Wendell
              pwendell Patrick Wendell
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: