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

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

问题描述

我是zeppelin的新手,尝试在我的系统上安装齐柏林飞艇。
直到现在,我已经完成了以下步骤:


  1. here

  2. 在我的系统环境变量中设置JAVA_HOME。
  3. 转到zeppelin-0.7.3-bin-all \bin并运行zeppelin.cmd

  4. 可以在 http:// localhost:8090

当我试图运行将数据加载到表中在zeppelin tutotial中提到的程序 - >基本功能(spark)它抛出以下错误

  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.crea teSparkContext(SparkInterpreter.java:387)
在org.apache.zeppelin.spark.SparkInterpreter.getSparkContext(SparkInterpreter.java:146)
在org.apache.zeppelin.spark.SparkInterpreter.open(SparkInterpreter。 Java的:在org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer $ InterpretJob.jobRun(RemoteInterpreterServer在org.apache.zeppelin.interpreter.LazyOpenInterpreter.open 843)
(LazyOpenInterpreter.java:70)
。 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)
在java.util.concurrent.ScheduledThreadPoolExecutor $ ScheduledFutureTask.run(ScheduledThreadPoolExecutor。 java:293)
在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)$ b $在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

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

  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) - 键:zeppelin.spark.concurrentSQL,值:false 
WARN [2018-01-11 10:55:30,061]({pool-2-thread-2} NotebookServer .java [afterStatusChange]:2064) - 作业20150210-015259_1403135953已完成,状态:ERROR,异常:null,结果:%text java.lang.NullPointerException $ b $ org.apache.zeppelin.spark.Utils.invokeMethod( Utils.java:38)
at org.apache.zeppelin.spark.Utils.invokeMethod(Utils.java:33)
处org.apache org.apache.zeppelin.spark.SparkInterpreter.createSparkContext_2(SparkInterpreter.java:398)
。 zeppelin.spark.SparkInterpreter.createSparkContext(SparkInterpreter.java:387)
处org.apache.zeppelin.spark org.apache.zeppelin.spark.SparkInterpreter.getSparkContext(SparkInterpreter.java:146)
。 SparkInterpreter.open(SparkInterpreter.java:843)
在org.apache.zeppelin.interpreter.LazyOpenInterpreter.open(LazyOpenInterpreter.java:70)
。在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)$ java.util.concurrent.Executors
$ RunnableAdapter.call(Executors.java:511)$ b $ java.util.concurrent.FutureTask.run(F utureTask.java:266)在java.util.concurrent.ScheduledThreadPoolExecutor中$ ScheduledFutureTask.access
$ 201(ScheduledThreadPoolExecutor.java:180)
。在java.util.concurrent.ScheduledThreadPoolExecutor中$ ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java :293)
在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)$ b $在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617)
在java.lang.Thread.run(Thread.java:745)

有什么是我的我错过了什么或火花?因为我假设齐柏林飞船会照顾火花,我们不必设置火花。感谢您提前帮助我!

解决方案

首先,我会确保火花正常运行。

您是否尝试运行新的火花笔记本。


  1. 创建新笔记本

  2. 选择spark作为默认解释器

  3. 只需运行一个包含sc的段落

它试图初始化一个sparkcontext。
当它工作时,我们很好,我们需要检查选项中使用的段落的语法。



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


  • SPARK_HOME

  • JAVA_HOME

  • HADOOP_CONF_DIR(如果使用hadoop)



不工作。


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


  2. 将其解压缩一个你选择的文件夹(egwindows c:/ hadoop / sparkVERSION)




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



    BR



    更新
    下面的文章完全赞同如何在windows上设置zeppelin来运行教程。



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



    我刚刚通过它在我的Windows机器上,它为我工作得很好。


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

    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

    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)
    

    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)
    

    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!

    解决方案

    First i would ensure that spark is generally running.

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

    1. create new notebook
    2. select spark as default interpreter
    3. just run a paragraph with "sc" in it

    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.

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

    • SPARK_HOME
    • JAVA_HOME
    • HADOOP_CONF_DIR (if using hadoop)

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

    1. download the spark version you like to use https://spark.apache.org/downloads.html

    2. 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

    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/

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

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

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