Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/4135#discussion_r26325661
--- Diff:
streaming/src/main/scala/org/apache/spark/streaming/receiver/ReceiverSupervisor.scala
---
@@ -161,22 +163,45 @@ private[streaming] abstract class ReceiverSupervisor(
}
}
- /** Check if receiver has been marked for stopping */
+ /** Check if receiver has been marked for stopping. */
def isReceiverStarted() = {
logDebug("state = " + receiverState)
receiverState == Started
}
- /** Check if receiver has been marked for stopping */
+ /** Check if receiver has been marked for stopping. */
def isReceiverStopped() = {
logDebug("state = " + receiverState)
receiverState == Stopped
}
+ /** Due to SPARK-5205, we need `TaskContext` to check if the task is
interrupted. */
+ def setTaskContext(context: TaskContext) = {
--- End diff --
Instead of adding a setter method, why not pass the TaskContext into the
ReceiverSupervistor's constructor?
---
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]