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

Shaded Guava patch causes access issues with package private classes

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete CommentsDelete
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.2.0
    • 1.2.0
    • Spark Core
    • None

    Description

      The patch that introduced shading to Guava (SPARK-2848) tried to maintain backwards compatibility in the Java API by not relocating the "Optional" class. That causes problems when that class references package private members in the Absent and Present classes, which are now in a different package:

      Exception in thread "main" java.lang.IllegalAccessError: tried to access class org.spark-project.guava.common.base.Present from class com.google.common.base.Optional
      	at com.google.common.base.Optional.of(Optional.java:86)
      	at org.apache.spark.api.java.JavaUtils$.optionToOptional(JavaUtils.scala:25)
      	at org.apache.spark.api.java.JavaSparkContext.getSparkHome(JavaSparkContext.scala:542)
      

      Attachments

        Activity

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

          People

            vanzin Marcelo Masiero Vanzin Assign to me
            vanzin Marcelo Masiero Vanzin
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment