I am using configuration file according to guides Configure Spark to setup EMR configuration on AWS, for example, changing the spark.executor.extraClassPath
is via the following settings:
{
"Classification": "spark-defaults",
"Properties": {
"spark.executor.extraClassPath": "/home/hadoop/mongo-hadoop-spark.jar",
}
}
It works prefect and do change spark.executor.extraClassPath
on emr spark conf, but emr has some preset default paths in spark.executor.extraClassPath
, so instead of overwriting the spark.executor.extraClassPath
.I would like to know if there is a way to append the path and keep the default paths such as
{
"Classification": "spark-defaults",
"Properties": {
"spark.executor.extraClassPath": "{$extraClassPath}:/home/hadoop/mongo-hadoop-spark.jar",
}
}
Normally, there is a spark-defaults. conf file located in /etc/spark/conf after I create a spark cluster on EMR. Following the instructions from http://docs.aws.amazon.com//ElasticMapReduce/latest/ReleaseGuide/emr-configure-apps.html , i'm trying to add a jar to the driver and executor extraClassPath properties.
Note: In client mode, this config must not be set through the SparkConf directly in your application, because the driver JVM has already started at that point. Instead, please set this through the --driver-java-options command line option or in your default properties file. spark.
You can specify it in your emr template as follows
Classification: spark-defaults
ConfigurationProperties:
spark.jars: Your jar location
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With