Skip to content
Snippets Groups Projects
Commit 25446dd9 authored by Thomas Graves's avatar Thomas Graves
Browse files

Add warning to null setJars check

parent ad35c1a5
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,7 @@ import com.typesafe.config.ConfigFactory ...@@ -24,7 +24,7 @@ import com.typesafe.config.ConfigFactory
* *
* @param loadDefaults whether to load values from the system properties and classpath * @param loadDefaults whether to load values from the system properties and classpath
*/ */
class SparkConf(loadDefaults: Boolean) extends Serializable with Cloneable { class SparkConf(loadDefaults: Boolean) extends Serializable with Cloneable with Logging {
/** Create a SparkConf that loads defaults from system properties and the classpath */ /** Create a SparkConf that loads defaults from system properties and the classpath */
def this() = this(true) def this() = this(true)
...@@ -67,6 +67,7 @@ class SparkConf(loadDefaults: Boolean) extends Serializable with Cloneable { ...@@ -67,6 +67,7 @@ class SparkConf(loadDefaults: Boolean) extends Serializable with Cloneable {
/** Set JAR files to distribute to the cluster. */ /** Set JAR files to distribute to the cluster. */
def setJars(jars: Seq[String]): SparkConf = { def setJars(jars: Seq[String]): SparkConf = {
for (jar <- jars if (jar == null)) logWarning("null jar passed to SparkContext constructor")
set("spark.jars", jars.filter(_ != null).mkString(",")) set("spark.jars", jars.filter(_ != null).mkString(","))
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment