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

    https://github.com/apache/spark/pull/247#discussion_r11281494
  
    --- Diff: 
streaming/src/main/scala/org/apache/spark/streaming/StreamingContext.scala ---
    @@ -430,12 +448,27 @@ class StreamingContext private[streaming] (
       /**
        * Stop the execution of the streams.
        * @param stopSparkContext Stop the associated SparkContext or not
    +   * @param stopGracefully Stop gracefully by waiting for the processing 
of all
    +   *                       received data to be completed
        */
    -  def stop(stopSparkContext: Boolean = true) = synchronized {
    -    scheduler.stop()
    +  def stop(
    +      stopSparkContext: Boolean = true,
    +      stopGracefully: Boolean = false
    +    ): Unit = synchronized {
    +    // Silently warn if context is stopped twice, or context is stopped 
before starting
    --- End diff --
    
    I removed silently. But on that note, do you think whether the semantics 
make sense?
    1. Stopping twice --> only warn
    2. Stop before start --> only warn
    3. Starting twice --> fail
    4. Starting after stopping --> fail
    
    ?


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

Reply via email to