我试图用hadoop 2.8的快照运行spark 2.02。我在网站上使用spark-2.0.2-bin-without-hadoop
。我使用these directions构建了hadoop 2.8。根据spark网站,在运行spark-submit
之前,我致电:
export SPARK_DIST_CLASSPATH=$(/path/to/hadoop2.8/bin/hadoop classpath)
我将spark-submit称为如下
spark-submit --verbose --master mesos://$MASTER_HOST/mesos
但是我收到以下错误:
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/fs/FSDataInputStream
at org.apache.spark.deploy.SparkSubmitArguments.handle(SparkSubmitArguments.scala:403)
at org.apache.spark.launcher.SparkSubmitOptionParser.parse(SparkSubmitOptionParser.java:163)
at org.apache.spark.deploy.SparkSubmitArguments.<init>(SparkSubmitArguments.scala:98)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:117)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.fs.FSDataInputStream
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 5 more
在我可以指定hadoop的位置时,是否存在一些spark-submit参数?
答案 0 :(得分:1)
尝试将HADOOP_HOME设置为Hadoop二进制文件的位置。
export HADOOP_HOME="/path/to/hadoop"