diff --git a/repl/scala-2.10/src/main/scala/com/cloudera/livy/repl/SparkInterpreter.scala b/repl/scala-2.10/src/main/scala/com/cloudera/livy/repl/SparkInterpreter.scala index ec1292994..5ef54918d 100644 --- a/repl/scala-2.10/src/main/scala/com/cloudera/livy/repl/SparkInterpreter.scala +++ b/repl/scala-2.10/src/main/scala/com/cloudera/livy/repl/SparkInterpreter.scala @@ -92,6 +92,10 @@ class SparkInterpreter(conf: SparkConf, .filter { u => u.getProtocol == "file" && new File(u.getPath).isFile } // Livy rsc and repl are also in the extra jars list. Filter them out. .filterNot { u => Paths.get(u.toURI).getFileName.toString.startsWith("livy-") } + // Some bad spark packages depend on the wrong version of scala-reflect. Blacklist it. + .filterNot { u => + Paths.get(u.toURI).getFileName.toString.contains("org.scala-lang_scala-reflect") + } extraJarPath.foreach { p => debug(s"Adding $p to Scala interpreter's class path...") } sparkIMain.addUrlsToClassPath(extraJarPath: _*) diff --git a/repl/scala-2.11/src/main/scala/com/cloudera/livy/repl/SparkInterpreter.scala b/repl/scala-2.11/src/main/scala/com/cloudera/livy/repl/SparkInterpreter.scala index bf2f680d8..6735b3a3e 100644 --- a/repl/scala-2.11/src/main/scala/com/cloudera/livy/repl/SparkInterpreter.scala +++ b/repl/scala-2.11/src/main/scala/com/cloudera/livy/repl/SparkInterpreter.scala @@ -78,6 +78,10 @@ class SparkInterpreter(conf: SparkConf, .filter { u => u.getProtocol == "file" && new File(u.getPath).isFile } // Livy rsc and repl are also in the extra jars list. Filter them out. .filterNot { u => Paths.get(u.toURI).getFileName.toString.startsWith("livy-") } + // Some bad spark packages depend on the wrong version of scala-reflect. Blacklist it. + .filterNot { u => + Paths.get(u.toURI).getFileName.toString.contains("org.scala-lang_scala-reflect") + } extraJarPath.foreach { p => debug(s"Adding $p to Scala interpreter's class path...") } sparkILoop.addUrlsToClassPath(extraJarPath: _*)