You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@toree.apache.org by "Igor Melnichenko (JIRA)" <ji...@apache.org> on 2017/08/08 16:08:00 UTC

[jira] [Updated] (TOREE-430) ClassNotFoundException with lambdas on CDH 5.10.0

     [ https://issues.apache.org/jira/browse/TOREE-430?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Melnichenko updated TOREE-430:
-----------------------------------
    Description: 
In the specified environment, Toree classloader fails to load classes defined and compiled in REPL. For instance, the following Spark example fails with ClassNotFoundException and works fine if the lambda is removed:
{code:title=Example.scala|borderStyle=solid}
val NUM_SAMPLES = 100
val count = sc.parallelize(1 to NUM_SAMPLES).filter { _ =>
  val x = math.random
  val y = math.random
  x*x + y*y < 1
}.count()
println(s"Pi is roughly ${4.0 * count / NUM_SAMPLES}")
{code}

Cause: a location of a directory used by a REPL compiler to store runtime-compiled classes is different from a location where classloader tries to find these classes.

PR with fix will be opened soon.

  was:
In the specified environment, Toree classloader fails to load classes defined and compiled in REPL. For instance, the following Spark example fails with ClassNotFoundException and works fine if the lambda is removed:
{{
val count = sc.parallelize(1 to NUM_SAMPLES).filter { _ =>
  val x = math.random
  val y = math.random
  x*x + y*y < 1
}.count()
println(s"Pi is roughly ${4.0 * count / NUM_SAMPLES}")
}}

Cause: a location of a directory used by a REPL compiler to store runtime-compiled classes is different from a location where classloader tries to find these classes.

PR with fix will be opened soon.


> ClassNotFoundException with lambdas on CDH 5.10.0
> -------------------------------------------------
>
>                 Key: TOREE-430
>                 URL: https://issues.apache.org/jira/browse/TOREE-430
>             Project: TOREE
>          Issue Type: Bug
>          Components: Kernel
>    Affects Versions: 0.1.0
>         Environment: CDH 5.10.0 (Spark 1.6.0, Scala 2.10.5)
>            Reporter: Igor Melnichenko
>
> In the specified environment, Toree classloader fails to load classes defined and compiled in REPL. For instance, the following Spark example fails with ClassNotFoundException and works fine if the lambda is removed:
> {code:title=Example.scala|borderStyle=solid}
> val NUM_SAMPLES = 100
> val count = sc.parallelize(1 to NUM_SAMPLES).filter { _ =>
>   val x = math.random
>   val y = math.random
>   x*x + y*y < 1
> }.count()
> println(s"Pi is roughly ${4.0 * count / NUM_SAMPLES}")
> {code}
> Cause: a location of a directory used by a REPL compiler to store runtime-compiled classes is different from a location where classloader tries to find these classes.
> PR with fix will be opened soon.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)