Uploaded image for project: 'TOREE'
  1. TOREE
  2. TOREE-430

ClassNotFoundException with lambdas on CDH 5.10.0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.1.0
    • None
    • Kernel
    • None
    • CDH 5.10.0 (Spark 1.6.0, Scala 2.10.5)

    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:

      Example.scala
      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}")
      

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Myllyenko Igor Melnichenko
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: