Skip to content

Commit

Permalink
Add warning to null setJars check
Browse files Browse the repository at this point in the history
  • Loading branch information
tgravescs committed Jan 6, 2014
1 parent ad35c1a commit 25446dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/main/scala/org/apache/spark/SparkConf.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import com.typesafe.config.ConfigFactory
*
* @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 */
def this() = this(true)
Expand Down Expand Up @@ -67,6 +67,7 @@ class SparkConf(loadDefaults: Boolean) extends Serializable with Cloneable {

/** Set JAR files to distribute to the cluster. */
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(","))
}

Expand Down

0 comments on commit 25446dd

Please sign in to comment.