squito commented on a change in pull request #24704: [SPARK-20286][core]
Improve logic for timing out executors in dynamic allocation.
URL: https://github.com/apache/spark/pull/24704#discussion_r289548862
##########
File path:
core/src/test/scala/org/apache/spark/scheduler/dynalloc/ExecutorMonitorSuite.scala
##########
@@ -223,6 +227,32 @@ class ExecutorMonitorSuite extends SparkFunSuite {
assert(monitor.timedOutExecutors(idleDeadline) === Seq("1"))
}
+ test("track executors pending for removal") {
+ knownExecs ++= Set("1", "2", "3")
+
+ monitor.onExecutorAdded(SparkListenerExecutorAdded(clock.getTimeMillis(),
"1", null))
+ monitor.onExecutorAdded(SparkListenerExecutorAdded(clock.getTimeMillis(),
"2", null))
+ monitor.onExecutorAdded(SparkListenerExecutorAdded(clock.getTimeMillis(),
"3", null))
+ clock.setTime(idleDeadline)
+ assert(monitor.timedOutExecutors().toSet === Set("1", "2", "3"))
+ assert(monitor.pendingRemovalCount === 0)
+
+ monitor.executorsKilled(Seq("1"))
Review comment:
a brief comment here would be helpful, eg. "The scheduler only kills some of
the executors we asked it to (eg. because another task just started there, but
really for whatever reason the scheduler feels like). Make sure the timedOut
list gets updated appropriately."
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]