ulysses-you commented on code in PR #44445:
URL: https://github.com/apache/spark/pull/44445#discussion_r1434650421
##########
core/src/main/scala/org/apache/spark/TaskContextImpl.scala:
##########
@@ -275,6 +275,8 @@ private[spark] class TaskContextImpl(
@GuardedBy("this")
override def isCompleted(): Boolean = synchronized(completed)
+ override def isFailed(): Boolean = synchronized(failureCauseOpt.isDefined)
+
override def isInterrupted(): Boolean = reasonIfKilled.isDefined
Review Comment:
`isCompleted` includes all the state `success`, `failure` and
`cancellation`. If isCompleted is true, then the task won't be in running any
more.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]