diff options
author | Reynold Xin <rxin@cs.berkeley.edu> | 2013-05-17 18:51:35 -0700 |
---|---|---|
committer | Reynold Xin <rxin@cs.berkeley.edu> | 2013-05-17 18:51:35 -0700 |
commit | 8d78c5f89f25d013c997c03587193f3d87a268b0 (patch) | |
tree | 08b63066e16d7f207acba42d54739008acad21dc /core | |
parent | 0eab7a78b90e2593075c479282f631a5a20e77a9 (diff) | |
download | spark-8d78c5f89f25d013c997c03587193f3d87a268b0.tar.gz spark-8d78c5f89f25d013c997c03587193f3d87a268b0.tar.bz2 spark-8d78c5f89f25d013c997c03587193f3d87a268b0.zip |
Changed the logging level from info to warning when addJar(null) is
called.
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/spark/SparkContext.scala | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/core/src/main/scala/spark/SparkContext.scala b/core/src/main/scala/spark/SparkContext.scala index 736b5485b7..69b4c5d20d 100644 --- a/core/src/main/scala/spark/SparkContext.scala +++ b/core/src/main/scala/spark/SparkContext.scala @@ -538,16 +538,17 @@ class SparkContext( */ def addJar(path: String) { if (null == path) { - logInfo("null specified as parameter to addJar") - return - } - val uri = new URI(path) - val key = uri.getScheme match { - case null | "file" => env.httpFileServer.addJar(new File(uri.getPath)) - case _ => path + logWarning("null specified as parameter to addJar", + new SparkException("null specified as parameter to addJar")) + } else { + val uri = new URI(path) + val key = uri.getScheme match { + case null | "file" => env.httpFileServer.addJar(new File(uri.getPath)) + case _ => path + } + addedJars(key) = System.currentTimeMillis + logInfo("Added JAR " + path + " at " + key + " with timestamp " + addedJars(key)) } - addedJars(key) = System.currentTimeMillis - logInfo("Added JAR " + path + " at " + key + " with timestamp " + addedJars(key)) } /** |