aboutsummaryrefslogtreecommitdiff
path: root/yarn
diff options
context:
space:
mode:
authorAndrew Or <andrew@databricks.com>2015-05-21 20:34:20 +0100
committerSean Owen <sowen@cloudera.com>2015-05-21 20:34:20 +0100
commit15680aeed425c900a5de34d12b61929d1e5df607 (patch)
treede4b356a9b1e6b43337f394a9ef93c23f8e03b1e /yarn
parentf6c486aa4b0d3a50b53c110fd63d226fffeb87f7 (diff)
downloadspark-15680aeed425c900a5de34d12b61929d1e5df607.tar.gz
spark-15680aeed425c900a5de34d12b61929d1e5df607.tar.bz2
spark-15680aeed425c900a5de34d12b61929d1e5df607.zip
[SPARK-7775] YARN AM negative sleep exception
``` SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation. SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory] Exception in thread "Reporter" java.lang.IllegalArgumentException: timeout value is negative at java.lang.Thread.sleep(Native Method) at org.apache.spark.deploy.yarn.ApplicationMaster$$anon$1.run(ApplicationMaster.scala:356) ``` This kills the reporter thread. This is caused by #6082 (merged into master branch only). Author: Andrew Or <andrew@databricks.com> Closes #6305 from andrewor14/yarn-negative-sleep and squashes the following commits: b970770 [Andrew Or] Use existing cap 56d6e5e [Andrew Or] Avoid negative sleep
Diffstat (limited to 'yarn')
-rw-r--r--yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala b/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala
index 63a6f2e947..af4927b0e4 100644
--- a/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala
+++ b/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala
@@ -345,7 +345,7 @@ private[spark] class ApplicationMaster(
if (numPendingAllocate > 0) {
val currentAllocationInterval =
math.min(heartbeatInterval, nextAllocationInterval)
- nextAllocationInterval *= 2
+ nextAllocationInterval = currentAllocationInterval * 2 // avoid overflow
currentAllocationInterval
} else {
nextAllocationInterval = initialAllocationInterval