I am doing a smoke test against a yarn cluster using yarn-cluster as the master with the SparkPi example program. Here is the command line:
If you are using spark with hdp, then you have to do the following things:
Add these entries in $SPARK_HOME/conf/spark-defaults.conf
spark.driver.extraJavaOptions -Dhdp.version=2.2.0.0-2041 (your installed HDP version)
spark.yarn.am.extraJavaOptions -Dhdp.version=2.2.0.0-2041 (your installed HDP version)
Create a file called java-opts in $SPARK_HOME/conf and add the installed HDP version to that file like this:
-Dhdp.version=2.2.0.0-2041 (your installed HDP version)
To figure out which hdp version is installed, please run this command in the cluster:
hdp-select status hadoop-client