NoSuchMethodException:运行pyspark代码zepplin时出现scala.tools.nsc.interpreter.ILoop.scala

时间:2018-12-18 21:58:03

标签: scala apache-spark pyspark apache-zeppelin

我试图在齐柏林飞艇中运行pyspark单元格,但在scala.tools.nsc.interpreter.ILoop.scala上收到NoSuchMethodException

单元格代码:

%pyspark

print("hello")

错误:

java.lang.NoSuchMethodException: scala.tools.nsc.interpreter.ILoop.scala$tools$nsc$interpreter$ILoop$$loopPostInit()
    at java.lang.Class.getMethod(Class.java:1786)
    at org.apache.zeppelin.spark.BaseSparkScalaInterpreter.callMethod(BaseSparkScalaInterpreter.scala:268)
    at org.apache.zeppelin.spark.BaseSparkScalaInterpreter.callMethod(BaseSparkScalaInterpreter.scala:262)
    at org.apache.zeppelin.spark.SparkScala211Interpreter.open(SparkScala211Interpreter.scala:84)
    at org.apache.zeppelin.spark.NewSparkInterpreter.open(NewSparkInterpreter.java:102)
    at org.apache.zeppelin.spark.SparkInterpreter.open(SparkInterpreter.java:62)
    at org.apache.zeppelin.interpreter.LazyOpenInterpreter.open(LazyOpenInterpreter.java:69)
    at org.apache.zeppelin.spark.PySparkInterpreter.getSparkInterpreter(PySparkInterpreter.java:664)
    at org.apache.zeppelin.spark.PySparkInterpreter.createGatewayServerAndStartScript(PySparkInterpreter.java:260)
    at org.apache.zeppelin.spark.PySparkInterpreter.open(PySparkInterpreter.java:194)
    at org.apache.zeppelin.interpreter.LazyOpenInterpreter.open(LazyOpenInterpreter.java:69)
    at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:617)
    at org.apache.zeppelin.scheduler.Job.run(Job.java:188)
    at org.apache.zeppelin.scheduler.FIFOScheduler$1.run(FIFOScheduler.java:140)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

齐柏林飞艇版本:0.8.0

火花版本:2.4.0

scala版本:2.11.12

2 个答案:

答案 0 :(得分:1)

与齐柏林飞艇的星火版本有关,我有同样的错误,我只是试图将星火版本更改为2.3.2并运行它。

答案 1 :(得分:1)

[ZEPPELIN-3810] Support Spark 2.4中描述了该问题,而齐柏林飞艇0.8.1的发布已解决了该问题。