Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/7888#discussion_r44812801
--- Diff:
core/src/test/scala/org/apache/spark/deploy/StandaloneDynamicAllocationSuite.scala
---
@@ -404,6 +404,33 @@ class StandaloneDynamicAllocationSuite
assert(apps.head.getExecutorLimit === 1)
}
+ test("disable force kill for busy executors (SPARK-9552)") {
+ sc = new SparkContext(appConf.set("spark.dynamicAllocation.testing",
"true"))
+ val appId = sc.applicationId
+ eventually(timeout(10.seconds), interval(10.millis)) {
+ val apps = getApplications()
+ assert(apps.size === 1)
+ assert(apps.head.id === appId)
+ assert(apps.head.executors.size === 2)
+ assert(apps.head.getExecutorLimit === Int.MaxValue)
+ }
+ // sync executors between the Master and the driver, needed because
+ // the driver refuses to kill executors it does not know about
+ syncExecutors(sc)
+ var executors = getExecutorIds(sc)
+ assert(executors.size === 2)
+ // force kill busy executor
+ assert(killExecutorWithForce(sc, executors.head))
+ var apps = getApplications()
+ // kill executor successfully
+ assert(apps.head.executors.size === 1)
+ // try to kill busy executor but it should be failed
+ assert(killExecutorWithForce(sc, executors.head, false) === false)
--- End diff --
need to name the boolean parameters `force = false`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]