Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExecutorClassLoader error in Spylon notebook #45

Open
parente opened this issue Aug 3, 2018 · 0 comments
Open

ExecutorClassLoader error in Spylon notebook #45

parente opened this issue Aug 3, 2018 · 0 comments

Comments

@parente
Copy link
Contributor

parente commented Aug 3, 2018

Transfer from jupyter/docker-stacks#690

What docker image you are using?

jupyter/all-spark-notebook

What complete docker command do you run to launch the container (omitting sensitive values)?

docker run -it --rm -p 8888:8888 -v "$PWD":/home/jovyan/work jupyter/all-spark-notebook

What steps do you take once the container is running to reproduce the issue?

  1. Visit http://localhost:8888
  2. Start a Spylon noteobok
  3. Execute the following code:
import spark.implicits._

case class A (a1: String, a2: String)
case class B (b1: String, b2: String)

val as = Seq(A("1", "2"), A("2", "2"), A("1", "3"))
val df = spark.createDataFrame(as)
df.as[A].repartition(2, df.col("a1")).mapPartitions(seq => {
    seq.toSeq.groupBy(_.a1).map{
        case (key, group) => {
            val last = group.maxBy(_.a2)
            B(last.a1, last.a2)
        }
    }.iterator
}).collect()

What do you expect to happen?

We should have the following result:

res0: Array[B] = Array(B(1,3), B(2,2))

What actually happens?

It fails with the following exception:

2018-08-03 12:49:01 ERROR ExecutorClassLoader:91 - Failed to check existence of class <root>.package on REPL class server at spark://dc5457f81c19:39449/classes
java.net.URISyntaxException: Illegal character in path at index 35: spark://dc5457f81c19:39449/classes/<root>/package.class

Note that the same code, typed directly in a spark-shell session (launched using a terminal from Jupyter) gives the correct result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant