2017-12-15 157 views
7

aracılığıyla tezgah ben SonraErişme HDF'ler - zeplin

https://github.com/big-data-europe/docker-hadoop-spark-workbench yüklü docker-compose up ile o kadar başlamıştır. the various urls mentioned in the git readme'a gittim ve hepsinin yukarı çıktığı görülüyor. zeplin tercüman ayarlarında

./bin/zeppelin.sh start 

i tercüman kıvılcım sonra gidilen ve docker

usta ile yüklenen yerel kümeye işaret edecek usta güncelledik:

Sonra yerel bir apache zeplin başladı:

: spark://localhost:8080

sonra bir dizüstü aşağıdaki kodu çalıştırmak için local[*] gelen güncellenmiş

import org.apache.hadoop.fs.{FileSystem,Path} 

FileSystem.get(sc.hadoopConfiguration).listStatus(new Path("hdfs:///")).foreach(x => println(x.getPath)) 
ben zeplin günlüklerinde bu durum almak:

INFO [2017-12-15 18:06:35,704] ({pool-2-thread-2} Paragraph.java[jobRun]:362) - run paragraph 20171212-200101_1553252595 using null [email protected]a20 
WARN [2017-12-15 18:07:37,717] ({pool-2-thread-2} NotebookServer.java[afterStatusChange]:2064) - Job 20171212-200101_1553252595 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:748) 

nasıl zeplin ve java/kıvılcım kodundan HDF'ler erişebilir?

cevap

1

İstisna nedeni, Zeppelin'de bir nedenle sparkSession nesnesinin null olmasıdır.

Referans: https://github.com/apache/zeppelin/blob/master/spark/src/main/java/org/apache/zeppelin/spark/SparkInterpreter.java

private SparkContext createSparkContext_2() { 
    return (SparkContext) Utils.invokeMethod(sparkSession, "sparkContext"); 
} 

bir yapılandırma ile ilgili sorun olabilir. Lütfen ayarları/yapılandırmayı ve kıvılcım kümesi ayarlarını çapraz olarak doğrulayın. Kıvılcımın iyi çalıştığından emin ol.

Referans: Bu yardımcı olur https://zeppelin.apache.org/docs/latest/interpreter/spark.html

Umut.