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

spark-shell can't find imported types in class constructors, extends clause

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.2, 2.1.2, 2.2.0
    • Fix Version/s: 2.3.0
    • Component/s: Spark Shell
    • Labels:
      None

      Description

      $ spark-shell
      …
      scala> import org.apache.spark.Partition
      import org.apache.spark.Partition
      
      scala> class P(p: Partition)
      <console>:11: error: not found: type Partition
             class P(p: Partition)
                        ^
      
      scala> class P(val index: Int) extends Partition
      <console>:11: error: not found: type Partition
             class P(val index: Int) extends Partition
                                             ^
      

      Any class that I import gives "not found: type ___" when used as a parameter to a class, or in an extends clause; this applies to classes I import from JARs I provide via --jars as well as core Spark classes as above.

      This worked in 1.6.3 but has been broken since 2.0.0.

        Attachments

          Activity

            People

            • Assignee:
              mpetruska Mark Petruska
              Reporter:
              rdub Ryan Williams
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: