Github user squito commented on a diff in the pull request:
https://github.com/apache/spark/pull/15505#discussion_r96889501
--- Diff:
core/src/main/scala/org/apache/spark/scheduler/cluster/CoarseGrainedSchedulerBackend.scala
---
@@ -602,6 +619,20 @@ class CoarseGrainedSchedulerBackend(scheduler:
TaskSchedulerImpl, val rpcEnv: Rp
Future.successful(false)
}
-private[spark] object CoarseGrainedSchedulerBackend {
+private[spark] object CoarseGrainedSchedulerBackend extends Logging {
val ENDPOINT_NAME = "CoarseGrainedScheduler"
+ // abort TaskSetManager without exception
+ def abortTaskSetManager(
+ scheduler: TaskSchedulerImpl,
+ taskId: Long,
+ msg: => String,
+ exception: Option[Throwable] = None): Unit = {
+ scheduler.taskIdToTaskSetManager.get(taskId).foreach { taskSetMgr =>
+ try {
+ taskSetMgr.abort(msg, exception)
--- End diff --
we need to be careful about thread safety here -- this isn't safe to call
w/out a lock on `TaskSchedulerImpl`. Need to look a little closer as there are
warnings elsewhere about deadlock between backend and taskscheduler.
also style nit: method body should be indented 2 spaces, not 4.
---
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]