Repository: spark Updated Branches: refs/heads/branch-2.0 801fb7994 -> a2ef13a7d
[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. (cherry picked from commit 59f9c1bd1adfea7069e769fb68351c228c37c8fc) Signed-off-by: Marcelo Vanzin <van...@cloudera.com> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/a2ef13a7 Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/a2ef13a7 Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/a2ef13a7 Branch: refs/heads/branch-2.0 Commit: a2ef13a7d3b3daf888f9aba5e28fcdf813c4171c Parents: 801fb79 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:45 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/a2ef13a7/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