Repository: spark
Updated Branches:
  refs/heads/branch-1.6 bb92788f9 -> 702178d1f


[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 <[email protected]>

Closes #14056 from vanzin/SPARK-16385.

(cherry picked from commit 59f9c1bd1adfea7069e769fb68351c228c37c8fc)
Signed-off-by: Sean Owen <[email protected]>


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

Branch: refs/heads/branch-1.6
Commit: 702178d1f1f02aaa6efa2de84f23d11be5a8e681
Parents: bb92788
Author: Marcelo Vanzin <[email protected]>
Authored: Tue Jul 5 16:55:22 2016 -0700
Committer: Sean Owen <[email protected]>
Committed: Mon Jul 11 22:03:43 2016 +0100

----------------------------------------------------------------------
 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/702178d1/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 427b382..6c19e58 100644
--- a/core/src/main/scala/org/apache/spark/util/Utils.scala
+++ b/core/src/main/scala/org/apache/spark/util/Utils.scala
@@ -1773,7 +1773,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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to