我正在向Hadoop集羣提交遠程Spark任務。但獲取下面的錯誤消息幫助我解決這個問題。線程「main」中的異常java.lang.NoClassDefFoundError:org/apache/hadoop/fs/FSDataInputStream
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/fs/FSDataInputStream
at org.apache.spark.Logging$.<init>(Logging.scala:162)
at org.apache.spark.Logging$.<clinit>(Logging.scala)
at org.apache.spark.Logging$class.initializeIfNecessary(Logging.scala:103)
at org.apache.spark.Logging$class.log(Logging.scala:50)
at org.apache.spark.deploy.yarn.ApplicationMaster$.log(ApplicationMaster.scala:635)
at org.apache.spark.deploy.yarn.ApplicationMaster$.main(ApplicationMaster.scala:649)
at org.apache.spark.deploy.yarn.ExecutorLauncher$.main(ApplicationMaster.scala:674)
at org.apache.spark.deploy.yarn.ExecutorLauncher.main(ApplicationMaster.scala)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.fs.FSDataInputStream
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 8 more
我使用CDH集羣。我已經使用包裹安裝了火花。 –
對不起,沒有使用CDH的經驗,但我在我的獨立Spark羣集上發生了同樣的錯誤,該羣集已按上述方式成功解析。 – Roman