Description
If the user sets up an ec2 cluster, the scripts automatically add the following lines to conf/spark-env.sh
export SPARK_SUBMIT_LIBRARY_PATH="/root/ephemeral-hdfs/lib/native/"
export SPARK_SUBMIT_CLASSPATH=$SPARK_CLASSPATH:/root/ephemeral-hdfs/conf"
Unfortunately, these variables are exported after spark-submit parses the --driver-* flags, which also set these variables. As a result, all values set via the --driver-* flags get overridden.
The simple fix is to append to, instead of overwrite, these variables.