Hey just a minor clarification, you _can_ use SparkFiles.get in your application only if it runs on the executors, e.g. in the following way:
sc.parallelize(1 to 100).map { i => SparkFiles.get("my.file") }.collect() But not in general (otherwise NPE, as in your case). Perhaps this should be documented more clearly. Thanks to Marcelo for pointing this out.