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

IsolatedClientLoader ignores needed Hadoop classes not present in Spark's loader

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.1.0
    • SQL
    • None

    Description

      While trying to use a custom classpath for metastore jars (spark.sql.hive.metastore.jars pointing at some filesystem path), I ran into the following issue:

      java.lang.ClassNotFoundException: java.lang.NoClassDefFoundError: org/apache/hadoop/mapred/MRVersion when creating Hive client using classpath
      

      The issue here is that MRVersion is not packaged anywhere with Spark, and the code in IsolatedClientLoader only ever tries the parent class loader when loading hadoop classes in this configuration. So even though I had the class in the list of files in spark.sql.hive.metastore.jars, Spark never tries to load it.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            vanzin Marcelo Masiero Vanzin
            vanzin Marcelo Masiero Vanzin
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment