You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by pw...@apache.org on 2014/01/06 19:29:14 UTC
[1/3] git commit: Fix handling of empty SPARK_EXAMPLES_JAR
Updated Branches:
refs/heads/master a2e7e0497 -> 357083c29
Fix handling of empty SPARK_EXAMPLES_JAR
Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/ad35c1a5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/ad35c1a5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/ad35c1a5
Branch: refs/heads/master
Commit: ad35c1a5f2bbc44c077ccf1adb41910dc7ef0029
Parents: 10fe23b
Author: Thomas Graves <tg...@apache.org>
Authored: Sat Jan 4 11:42:17 2014 -0600
Committer: Thomas Graves <tg...@apache.org>
Committed: Sat Jan 4 11:42:17 2014 -0600
----------------------------------------------------------------------
core/src/main/scala/org/apache/spark/SparkConf.scala | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/ad35c1a5/core/src/main/scala/org/apache/spark/SparkConf.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/SparkConf.scala b/core/src/main/scala/org/apache/spark/SparkConf.scala
index 98343e9..7073a99 100644
--- a/core/src/main/scala/org/apache/spark/SparkConf.scala
+++ b/core/src/main/scala/org/apache/spark/SparkConf.scala
@@ -67,7 +67,7 @@ class SparkConf(loadDefaults: Boolean) extends Serializable with Cloneable {
/** Set JAR files to distribute to the cluster. */
def setJars(jars: Seq[String]): SparkConf = {
- set("spark.jars", jars.mkString(","))
+ set("spark.jars", jars.filter(_ != null).mkString(","))
}
/** Set JAR files to distribute to the cluster. (Java-friendly version.) */
[3/3] git commit: Merge pull request #330 from
tgravescs/fix_addjars_null_handling
Posted by pw...@apache.org.
Merge pull request #330 from tgravescs/fix_addjars_null_handling
Fix handling of empty SPARK_EXAMPLES_JAR
Currently if SPARK_EXAMPLES_JAR is left unset you get a null pointer exception when running the examples (atleast on spark on yarn). The null now gets turned into a string of "null" when its put into the SparkConf so addJar no longer properly ignores it. This fixes that so that it can be left unset.
Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/357083c2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/357083c2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/357083c2
Branch: refs/heads/master
Commit: 357083c29f59bc7df593911ac2c5735e4ee9de74
Parents: a2e7e04 25446dd
Author: Patrick Wendell <pw...@gmail.com>
Authored: Mon Jan 6 10:29:04 2014 -0800
Committer: Patrick Wendell <pw...@gmail.com>
Committed: Mon Jan 6 10:29:04 2014 -0800
----------------------------------------------------------------------
core/src/main/scala/org/apache/spark/SparkConf.scala | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
[2/3] git commit: Add warning to null setJars check
Posted by pw...@apache.org.
Add warning to null setJars check
Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/25446dd9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/25446dd9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/25446dd9
Branch: refs/heads/master
Commit: 25446dd931cce5916de5dddf4689b41ee6fd3148
Parents: ad35c1a
Author: Thomas Graves <tg...@apache.org>
Authored: Mon Jan 6 07:58:59 2014 -0600
Committer: Thomas Graves <tg...@apache.org>
Committed: Mon Jan 6 07:58:59 2014 -0600
----------------------------------------------------------------------
core/src/main/scala/org/apache/spark/SparkConf.scala | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/25446dd9/core/src/main/scala/org/apache/spark/SparkConf.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/SparkConf.scala b/core/src/main/scala/org/apache/spark/SparkConf.scala
index 7073a99..55f2703 100644
--- a/core/src/main/scala/org/apache/spark/SparkConf.scala
+++ b/core/src/main/scala/org/apache/spark/SparkConf.scala
@@ -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)
@@ -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(","))
}