Error Exception in thread "main" java.lang.NoClassDefFoundError: org / apache / hadoop / fs / FSDataInputStream troubleshooting ideas


spark1 (default version comes with CDH) there is no problem, mainly to upgrade the spark2 (CDHparcel upgrade) version after installation need to rely on the old configuration spark1 to read hadoop cluster dependencies.

1./etc/spark2/conf directory needs to point /hadoop1/cloudera-manager/parcel-repo/SPARK2-2.1.0.cloudera1-1.cdh5.7.0.p0.120904/etc/spark2/conf.dist
(ln command -s /hadoop1/cloudera-manager/parcel-repo/SPARK2-2.1.0.cloudera1-1.cdh5.7.0.p0.120904/etc/spark2/conf.dist / etc / spark2 / conf )

2. Point to the directory of spark-env.sh which must have one of these two configurations, all references to the environment hadoop jar package
(export SPARK_DIST_CLASSPATH = $ (paste -sd : "$ SELF / classpath.txt") or export SPARK_DIST_CLASSPATH = $ (hadoop classpath) )

3. Use oozie management spark to start the application need to focus on the configuration parameters: oozie.service.SparkConfigurationService.spark.configurations value: * = / etc / spark2 / conf, this parameter needs to be synchronized to each machine. This parameter meaning oozie start spark when where to find the configuration file

Guess you like

Origin www.cnblogs.com/yaohaitao/p/11703753.html