I am trying to run the spark-submit command on my Hadoop cluster
Here is a summary of my Hadoop Cluster:
- The cluster is built using 5 VirtualBox VM's connected on an internal network
- There is 1 namenode and 4 datanodes created.
- All the VM's were built from the Bitnami Hadoop Stack VirtualBox image
When I run the following command:
spark-submit --class org.apache.spark.examples.SparkPi $SPARK_HOME/examples/jars/spark-examples_2.12-3.0.3.jar 10
I receive the following error:
java.io.FileNotFoundException: File file:/home/bitnami/sparkStaging/bitnami/.sparkStaging/application_1658417340986_0002/__spark_conf__.zip does not exist
I also get a similar error when trying to create a sparkSession using PySpark:
spark = SparkSession.builder.appName('appName').getOrCreate()
I have tried/verified the following
- environment variables:
HADOOP_HOME,SPARK_HOMEANDHADOOP_CONF_DIRhave been set in my.bashrcfile SPARK_DIST_CLASSPATHandHADOOP_CONF_DIRhave been defined inspark-env.sh- Added
spark.master yarn,spark.yarn.stagingDir file:///home/bitnami/sparkStagingandspark.yarn.jars file:///opt/bitnami/hadoop/spark/jars/inspark-defaults.conf