apache zeppelin 抛出 NullPointerException 错误 [英] apache zeppelin throwing NullPointerException error

查看:38
本文介绍了apache zeppelin 抛出 NullPointerException 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 zeppelin 的新手,正在尝试在我的系统上设置 zeppelin.到目前为止,我已经完成了以下步骤:

I am new to zeppelin and trying to setup the zeppelin on my system. Till now I have done the following steps:

  1. 此处
  2. 下载了 zeppelin
  3. 在我的系统环境变量中设置 JAVA_HOME.
  4. 转到 zeppelin-0.7.3-bin-all\bin 并运行 zeppelin.cmd
  5. 能够在 http://localhost:8090
  6. 看到 zeppelin-ui
  1. Downloaded zeppelin from here
  2. Setup the JAVA_HOME at my system environment variable.
  3. Goto zeppelin-0.7.3-bin-all\bin and ran zeppelin.cmd
  4. Able to see zeppelin-ui at http://localhost:8090

当我尝试运行 zeppelin tutotial 中提到的 load data into table 程序时 -> Basic Features(spark) 它抛出以下错误

When I am trying to run load data into table program mentioned in zeppelin tutotial -> Basic Features(spark) it is throwing following error

java.lang.NullPointerException
    at org.apache.zeppelin.spark.Utils.invokeMethod(Utils.java:38)
    at org.apache.zeppelin.spark.Utils.invokeMethod(Utils.java:33)
    at org.apache.zeppelin.spark.SparkInterpreter.createSparkContext_2(SparkInterpreter.java:398)
    at org.apache.zeppelin.spark.SparkInterpreter.createSparkContext(SparkInterpreter.java:387)
    at org.apache.zeppelin.spark.SparkInterpreter.getSparkContext(SparkInterpreter.java:146)
    at org.apache.zeppelin.spark.SparkInterpreter.open(SparkInterpreter.java:843)
    at org.apache.zeppelin.interpreter.LazyOpenInterpreter.open(LazyOpenInterpreter.java:70)
    at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:491)
    at org.apache.zeppelin.scheduler.Job.run(Job.java:175)
    at org.apache.zeppelin.scheduler.FIFOScheduler$1.run(FIFOScheduler.java:139)
    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:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

上述错误日志我可以在 zeppelin-ui 的输出中看到,同时我的控制台 (cmd) 显示以下错误:

The above mentioned error log i am able to see in output inside zeppelin-ui at the same time my console (cmd) shows following error:

DEBUG [2018-01-11 10:55:30,059] ({Exec Stream Pumper} RemoteInterpreterManagedProcess.java[processLine]:206) - DEBUG [2018-01-11 10:55:30,059] ({pool-1-thread-3} Interpreter.java[getProperty]:165) - key: zeppelin.spark.concurrentSQL, value: false
 WARN [2018-01-11 10:55:30,061] ({pool-2-thread-2} NotebookServer.java[afterStatusChange]:2064) - Job 20150210-015259_1403135953 is finished, status: ERROR, exception: null, result: %text java.lang.NullPointerException
        at org.apache.zeppelin.spark.Utils.invokeMethod(Utils.java:38)
        at org.apache.zeppelin.spark.Utils.invokeMethod(Utils.java:33)
        at org.apache.zeppelin.spark.SparkInterpreter.createSparkContext_2(SparkInterpreter.java:398)
        at org.apache.zeppelin.spark.SparkInterpreter.createSparkContext(SparkInterpreter.java:387)
        at org.apache.zeppelin.spark.SparkInterpreter.getSparkContext(SparkInterpreter.java:146)
        at org.apache.zeppelin.spark.SparkInterpreter.open(SparkInterpreter.java:843)
        at org.apache.zeppelin.interpreter.LazyOpenInterpreter.open(LazyOpenInterpreter.java:70)
        at org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:491)
        at org.apache.zeppelin.scheduler.Job.run(Job.java:175)
        at org.apache.zeppelin.scheduler.FIFOScheduler$1.run(FIFOScheduler.java:139)
        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:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

有什么我遗漏的或与火花有关的吗?因为我假设 zeppelin 会处理 spark,我们不必设置 spark.预先感谢您帮助我!

Is there anything that I am missing or anything to do with spark? Because I am assuming zeppelin will take care of spark and we do not have to setup the spark. Thanks in advance for helping me!

推荐答案

首先,我会确保 spark 正常运行.

First i would ensure that spark is generally running.

您是否尝试过运行新的spark notebook".

Have you tried to run a new "spark notebook".

  1. 创建新笔记本
  2. 选择 spark 作为默认解释器
  3. 只需运行一个包含sc"的段落

它尝试初始化一个 sparkcontext.当它工作时,我们很好,我们需要检查选项和您正在使用的段落中使用的语法.

It tries to initialize a sparkcontext. When it works we are good and we need to check the options an syntax which is used in the paragraph you are using.

如果它没有运行,我将使用以下变量检查/设置 zeppelin-env.cmd:

If that is not running i would check/set the zeppelin-env.cmd with the following variables:

  • SPARK_HOME
  • JAVA_HOME
  • HADOOP_CONF_DIR(如果使用 hadoop)

如果你没有在windows上设置spark,它就无法工作.

If you didnt setup spark on windows yet it can not work.

  1. 下载你喜欢使用的spark版本https://spark.apache.org/下载.html

将其解压到您选择的文件夹中(例如windows c:/hadoop/sparkVERSION)

unzip it in a folder of your choice (e.g.windows c:/hadoop/sparkVERSION)

如果所有这些步骤都不起作用,请向我展示您尝试运行的输出和代码.

If all those steps dont work, please show me the output and code you try to run.

BR

更新以下帖子准确描述了如何在 Windows 上设置 zeppelin 以运行教程.

UPDATE Following post exactly desribes how to setup zeppelin on windows to run the tutorials.

https://hernandezpaul.wordpress.com/2016/11/14/apache-zeppelin-installation-on-windows-10/

我刚刚在我的 Windows 机器上完成了它,对我来说效果很好.

I just went through it on my windows machine and it worked fine for me.

这篇关于apache zeppelin 抛出 NullPointerException 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆