title: How to add configuration file to classpath of all Spark executors in Spark 1.2.0?
body: <p>I'm using Typesafe Config, <a href="https://github.com/typesafehub/config">https://github.com/typesafehub/config</a>, to parameterize a Spark job running in yarn-cluster mode with a configuration file. The default behavior of Typesafe Config is to search the classpath for resources with names matching a regex and to load them into your configuration class automatically with <code>ConfigFactory.load()</code> (for our purposes, assume the file it looks for is called <code>application.conf</code>).</p>
  
  <p>I am able to load the configuration file into the driver using <code>--driver-class-path &lt;directory containing configuration file&gt;</code>, but using <code>--conf spark.executor.extraClassPath=&lt;directory containing configuration file&gt;</code> does not put the resource on the classpath of all executors like it should. The executors report that they can not find a certain configuration setting for a key that does exist in the configuration file that I'm attempting to add to their classpaths. </p>
  
  <p>What is the correct way to add a file to the classpaths of all executor JVMs using Spark?</p>