[
https://issues.apache.org/jira/browse/TOREE-375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15876892#comment-15876892
]
Jakob Odersky edited comment on TOREE-375 at 2/21/17 10:37 PM:
---------------------------------------------------------------
[~fschueler] so I'm actually not entirely sure what's the cause of this bug,
however I can confirm it is not specific to Toree.
It can be reproduces in a standard spark shell as well:
{code}scala> :power
Power mode enabled. :phase is at typer.
import scala.tools.nsc._, intp.global._, definitions._
Try :help or completions for vals._ and power._
scala> power.intp.addUrlsToClassPath(jar)
scala> import org.apache.sysml.api.MLContext
import org.apache.sysml.api.MLContext
scala> val ml = new MLContext(sc)
<console>:50: error: overloaded method constructor MLContext with alternatives:
(x$1:
org.apache.spark.api.java.JavaSparkContext)org.apache.sysml.api.MLContext <and>
(x$1:
org.apache.spark.org.apache.spark.org.apache.spark.org.apache.spark.org.apache.spark.SparkContext)org.apache.sysml.api.MLContext
cannot be applied to
(org.apache.spark.org.apache.spark.org.apache.spark.org.apache.spark.org.apache.spark.SparkContext)
val ml = new MLContext(sc)
{code}
was (Author: jodersky):
[~fschueler] so I'm actually not entirely sure what's the cause of this bug,
however I can confirm it is not specific to Toree.
It can be reproduces in a standard spark shell as well:
```
scala> :power
Power mode enabled. :phase is at typer.
import scala.tools.nsc._, intp.global._, definitions._
Try :help or completions for vals._ and power._
scala> power.intp.addUrlsToClassPath(jar)
scala> import org.apache.sysml.api.MLContext
import org.apache.sysml.api.MLContext
scala> val ml = new MLContext(sc)
<console>:50: error: overloaded method constructor MLContext with alternatives:
(x$1:
org.apache.spark.api.java.JavaSparkContext)org.apache.sysml.api.MLContext <and>
(x$1:
org.apache.spark.org.apache.spark.org.apache.spark.org.apache.spark.org.apache.spark.SparkContext)org.apache.sysml.api.MLContext
cannot be applied to
(org.apache.spark.org.apache.spark.org.apache.spark.org.apache.spark.org.apache.spark.SparkContext)
val ml = new MLContext(sc)
```
> Incorrect fully qualified name for spark context
> ------------------------------------------------
>
> Key: TOREE-375
> URL: https://issues.apache.org/jira/browse/TOREE-375
> Project: TOREE
> Issue Type: Bug
> Environment: Jupyter Notebook with Toree latest master
> (1a9c11f5f1381c15b691a716acd0e1f0432a9a35) and Spark 2.0.2, Scala 2.11
> Reporter: Felix Schüler
> Priority: Critical
>
> When running below snippet in a cell I get a compile error for the MLContext
> Constructor. Somehow the fully qualified name of the SparkContext gets messed
> up.
> The same does not happen when I start a Spark shell with the --jars command
> and create the MLContext there.
> Snippet (the systemml jar is build with the latest master of SystemML):
> {code}
> %addjar
> file:///home/felix/repos/incubator-systemml/target/systemml-0.13.0-incubating-SNAPSHOT.jar
> -f
> import org.apache.sysml.api.mlcontext._
> import org.apache.sysml.api.mlcontext.ScriptFactory._
> val ml = new MLContext(sc)
> Starting download from
> file:///home/felix/repos/incubator-systemml/target/systemml-0.13.0-incubating-SNAPSHOT.jar
> Finished download of systemml-0.13.0-incubating-SNAPSHOT.jar
> Name: Compile Error
> Message: <console>:25: error: overloaded method constructor MLContext with
> alternatives:
> (x$1:
> org.apache.spark.api.java.JavaSparkContext)org.apache.sysml.api.mlcontext.MLContext
> <and>
> (x$1:
> org.apache.spark.org.apache.spark.org.apache.spark.org.apache.spark.org.apache.spark.SparkContext)org.apache.sysml.api.mlcontext.MLContext
> cannot be applied to
> (org.apache.spark.org.apache.spark.org.apache.spark.org.apache.spark.org.apache.spark.SparkContext)
> val ml = new MLContext(sc)
> ^
> StackTrace:
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)