2016-03-16 13 views
6

Ich verwende spark-1.5.0-cdh5.6.0. versucht, die Beispielanwendung (scala) Befehl lautet:FEHLER SparkContext: Fehler beim Initialisieren von SparkContext

> spark-submit --class com.cloudera.spark.simbox.sparksimbox.WordCount --master local /home/hadoop/work/testspark.jar 

Haben Sie die folgende Fehlermeldung:

ERROR SparkContext: Error initializing SparkContext. 
java.io.FileNotFoundException: File file:/user/spark/applicationHistory does not exist 
     at org.apache.hadoop.fs.RawLocalFileSystem.deprecatedGetFileStatus(RawLocalFileSystem.java:534) 
     at org.apache.hadoop.fs.RawLocalFileSystem.getFileLinkStatusInternal(RawLocalFileSystem.java:747) 
     at org.apache.hadoop.fs.RawLocalFileSystem.getFileStatus(RawLocalFileSystem.java:524) 
     at org.apache.hadoop.fs.FilterFileSystem.getFileStatus(FilterFileSystem.java:424) 
     at org.apache.spark.scheduler.EventLoggingListener.start(EventLoggingListener.scala:100) 
     at org.apache.spark.SparkContext.<init>(SparkContext.scala:541) 
     at com.cloudera.spark.simbox.sparksimbox.WordCount$.main(WordCount.scala:12) 
     at com.cloudera.spark.simbox.sparksimbox.WordCount.main(WordCount.scala) 
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) 
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
     at java.lang.reflect.Method.invoke(Method.java:606) 
     at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:672) 
     at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180) 
     at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205) 
     at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:120) 
     at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala) 

Antwort

10

Funke verfügt über eine Funktion namens „Geschichte Server“, die Sie historische Ereignisse nach dem SparkContext Gesenke durchsuchen können . Diese Eigenschaft wird über die Einstellung spark.eventLog.enabled bis true festgelegt.

Sie haben zwei Möglichkeiten, entweder geben Sie ein gültiges Verzeichnis das Ereignisprotokoll über den spark.eventLog.dir Config-Wert zu speichern oder einfach eingestellt spark.eventLog.enabled-false, wenn Sie es nicht brauchen.

Sie können mehr darüber in der Spark Configuration Seite lesen.

+0

vielen dank sir, es funktioniert jetzt –

+0

@ G.Saleh Froh, dass es geholfen hat. –

+0

Ich klickte ohne es zu merken –

Verwandte Themen