Repository: spark
Updated Branches:
  refs/heads/master 4db63fd2b -> 59f9c1bd1


[SPARK-16385][CORE] Catch correct exception when calling method via reflection.

Using "Method.invoke" causes an exception to be thrown, not an error, so
Utils.waitForProcess() was always throwing an exception when run on Java 7.

Author: Marcelo Vanzin <van...@cloudera.com>

Closes #14056 from vanzin/SPARK-16385.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/59f9c1bd
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/59f9c1bd
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/59f9c1bd

Branch: refs/heads/master
Commit: 59f9c1bd1adfea7069e769fb68351c228c37c8fc
Parents: 4db63fd
Author: Marcelo Vanzin <van...@cloudera.com>
Authored: Tue Jul 5 16:55:22 2016 -0700
Committer: Marcelo Vanzin <van...@cloudera.com>
Committed: Tue Jul 5 16:55:22 2016 -0700

----------------------------------------------------------------------
 core/src/main/scala/org/apache/spark/util/Utils.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/59f9c1bd/core/src/main/scala/org/apache/spark/util/Utils.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/util/Utils.scala 
b/core/src/main/scala/org/apache/spark/util/Utils.scala
index 0c23f3c..156cf17 100644
--- a/core/src/main/scala/org/apache/spark/util/Utils.scala
+++ b/core/src/main/scala/org/apache/spark/util/Utils.scala
@@ -1813,7 +1813,7 @@ private[spark] object Utils extends Logging {
         .invoke(process, timeoutMs.asInstanceOf[java.lang.Long], 
TimeUnit.MILLISECONDS)
         .asInstanceOf[Boolean]
     } catch {
-      case _: NoSuchMethodError =>
+      case _: NoSuchMethodException =>
         // Otherwise implement it manually
         var terminated = false
         val startTime = System.currentTimeMillis


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org
For additional commands, e-mail: commits-h...@spark.apache.org

Reply via email to