Github user zsxwing commented on a diff in the pull request:

    https://github.com/apache/spark/pull/6294#discussion_r30970195
  
    --- Diff: 
streaming/src/main/scala/org/apache/spark/streaming/receiver/ReceiverSupervisor.scala
 ---
    @@ -136,12 +141,19 @@ private[streaming] abstract class ReceiverSupervisor(
       def stopReceiver(message: String, error: Option[Throwable]): Unit = 
synchronized {
         try {
           logInfo("Stopping receiver with message: " + message + ": " + 
error.getOrElse(""))
    -      receiverState = Stopped
    -      receiver.onStop()
    -      logInfo("Called receiver onStop")
    -      onReceiverStop(message, error)
    +      receiverState match {
    +        case Initialized =>
    +          logWarning("Skip stopping receiver because it has not yet 
stared")
    +        case Started =>
    --- End diff --
    
    @tdas now we stop the receiver only if  `receiverState` is `Started`. What 
do you think?


---
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]

Reply via email to