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/10 03:38:27 UTC
[22/37] git commit: Slight change to retry logic
Slight change to retry logic
Project: http://git-wip-us.apache.org/repos/asf/incubator-spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-spark/commit/a8729770
Tree: http://git-wip-us.apache.org/repos/asf/incubator-spark/tree/a8729770
Diff: http://git-wip-us.apache.org/repos/asf/incubator-spark/diff/a8729770
Branch: refs/heads/master
Commit: a8729770f5dc944444b9996716c2f6a26485a819
Parents: 8da1012
Author: Patrick Wendell <pw...@gmail.com>
Authored: Sun Dec 29 11:57:57 2013 -0800
Committer: Patrick Wendell <pw...@gmail.com>
Committed: Sun Dec 29 11:57:57 2013 -0800
----------------------------------------------------------------------
.../scala/org/apache/spark/deploy/worker/DriverRunner.scala | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-spark/blob/a8729770/core/src/main/scala/org/apache/spark/deploy/worker/DriverRunner.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/deploy/worker/DriverRunner.scala b/core/src/main/scala/org/apache/spark/deploy/worker/DriverRunner.scala
index 51baa35..e8ae2d3 100644
--- a/core/src/main/scala/org/apache/spark/deploy/worker/DriverRunner.scala
+++ b/core/src/main/scala/org/apache/spark/deploy/worker/DriverRunner.scala
@@ -167,12 +167,13 @@ private[spark] class DriverRunner(
val exitCode = process.get.waitFor()
- keepTrying = supervise && exitCode != 0 && !killed
- if (keepTrying) {
+ if (supervise && exitCode != 0 && !killed) {
waitSeconds = waitSeconds * 2 // exponential back-off
logInfo(s"Command exited with status $exitCode, re-launching after $waitSeconds s.")
(0 until waitSeconds).takeWhile(f => {Thread.sleep(1000); !killed})
}
+
+ keepTrying = supervise && exitCode != 0 && !killed
}
}
}