diff options
author | Patrick Wendell <pwendell@gmail.com> | 2013-12-29 11:57:57 -0800 |
---|---|---|
committer | Patrick Wendell <pwendell@gmail.com> | 2013-12-29 11:57:57 -0800 |
commit | a8729770f5dc944444b9996716c2f6a26485a819 (patch) | |
tree | d7871e6dc30b0500bc74e1aef2d3d34139933590 /core/src/main | |
parent | 8da1012f9bb9431123d3aae26d4bb78f8e5374bc (diff) | |
download | spark-a8729770f5dc944444b9996716c2f6a26485a819.tar.gz spark-a8729770f5dc944444b9996716c2f6a26485a819.tar.bz2 spark-a8729770f5dc944444b9996716c2f6a26485a819.zip |
Slight change to retry logic
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/scala/org/apache/spark/deploy/worker/DriverRunner.scala | 5 |
1 files changed, 3 insertions, 2 deletions
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 51baa35018..e8ae2d302b 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 } } } |