Skip to content

Commit 15680ae

Browse files
Andrew Orsrowen
authored andcommitted
[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 <[email protected]> Closes #6305 from andrewor14/yarn-negative-sleep and squashes the following commits: b970770 [Andrew Or] Use existing cap 56d6e5e [Andrew Or] Avoid negative sleep
1 parent f6c486a commit 15680ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ private[spark] class ApplicationMaster(
345345
if (numPendingAllocate > 0) {
346346
val currentAllocationInterval =
347347
math.min(heartbeatInterval, nextAllocationInterval)
348-
nextAllocationInterval *= 2
348+
nextAllocationInterval = currentAllocationInterval * 2 // avoid overflow
349349
currentAllocationInterval
350350
} else {
351351
nextAllocationInterval = initialAllocationInterval

0 commit comments

Comments
 (0)