我在Kubernetes集群(Minikube)中有一个Spark集群(Master + 2 Workers)。
我想在我的k8s集群中添加Zeppelin并将其配置为使用我的Spark集群。
所以我尝试使用Zeppelin 0.8.1 image from apache/zeppelin或another image built on Zeppelin 0.9.0-SNAPSHOT (still in develop)来做到这一点
我跟着官方的Zeppelin documentation(至少需要Zeppelin 0.9.0,即使它还没有被释放¯\ _(ツ)_ /¯)
我做了什么 :
然后我浏览我的Zeppelin笔记本,并尝试运行一个小火花测试,看它是否有效,但我收到以下错误:
java.lang.RuntimeException: SPARK_HOME is not specified in interpreter-setting for non-local mode, if you specify it in zeppelin-env.sh, please move that into interpreter setting
at org.apache.zeppelin.interpreter.launcher.SparkInterpreterLauncher.setupPropertiesForSparkR(SparkInterpreterLauncher.java:181)
at org.apache.zeppelin.interpreter.launcher.SparkInterpreterLauncher.buildEnvFromProperties(SparkInterpreterLauncher.java:63)
at org.apache.zeppelin.interpreter.launcher.StandardInterpreterLauncher.launch(StandardInterpreterLauncher.java:86)
at org.apache.zeppelin.interpreter.InterpreterSetting.createInterpreterProcess(InterpreterSetting.java:698)
at org.apache.zeppelin.interpreter.ManagedInterpreterGroup.getOrCreateInterpreterProcess(ManagedInterpreterGroup.java:63)
at org.apache.zeppelin.interpreter.remote.RemoteInterpreter.getOrCreateInterpreterProcess(RemoteInterpreter.java:110)
at org.apache.zeppelin.interpreter.remote.RemoteInterpreter.internal_create(RemoteInterpreter.java:163)
at org.apache.zeppelin.interpreter.remote.RemoteInterpreter.open(RemoteInterpreter.java:131)
at org.apache.zeppelin.interpreter.remote.RemoteInterpreter.getFormType(RemoteInterpreter.java:290)
at org.apache.zeppelin.notebook.Paragraph.jobRun(Paragraph.java:402)
at org.apache.zeppelin.notebook.Paragraph.jobRun(Paragraph.java:75)
at org.apache.zeppelin.scheduler.Job.run(Job.java:172)
at org.apache.zeppelin.scheduler.AbstractScheduler.runJob(AbstractScheduler.java:121)
at org.apache.zeppelin.scheduler.RemoteScheduler$JobRunner.run(RemoteScheduler.java:187)
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)
首先,我看到错误来自函数setupPropertiesForSparkR()
,即使我不使用Spark R.
但是我失去的主要是因为我使用Zeppelin和Spark泊坞窗图像,我不知道如何设置我的SPARK_HOME以及它应该具有什么价值。
备注:
您可以使用以下配置环境变量:
docker run --env SPARK_HOME=/path ...
您还可以使用Spark群集创建卷
docker run --env SPARK_HOME=/pathInCluster -v /pathYourSparkCluster:/pathInCluster ...