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

    https://github.com/apache/spark/pull/3121#discussion_r19991204
  
    --- Diff: 
streaming/src/main/scala/org/apache/spark/streaming/StreamingContext.scala ---
    @@ -487,20 +487,20 @@ class StreamingContext private[streaming] (
        *                       received data to be completed
        */
       def stop(stopSparkContext: Boolean, stopGracefully: Boolean): Unit = 
synchronized {
    -    // Warn (but not fail) if context is stopped twice,
    -    // or context is stopped before starting
    -    if (state == Initialized) {
    -      logWarning("StreamingContext has not been started yet")
    -      return
    -    }
         if (state == Stopped) {
           logWarning("StreamingContext has already been stopped")
    -      return
    -    } // no need to throw an exception as its okay to stop twice
    -    scheduler.stop(stopGracefully)
    -    logInfo("StreamingContext stopped successfully")
    -    waiter.notifyStop()
    -    if (stopSparkContext) sc.stop()
    +    } else {
    --- End diff --
    
    I like thtis change but I owuld like this as part of a separate JIRA + PR 
tied to streaming so that its easier to track. Could issue a new PR (with unit 
test), and I can merge that quickly and unblock this.


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