You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2014/11/07 20:23:34 UTC

[jira] [Commented] (SPARK-4301) StreamingContext should not allow start() to be called after calling stop()

    [ https://issues.apache.org/jira/browse/SPARK-4301?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14202503#comment-14202503 ] 

Apache Spark commented on SPARK-4301:
-------------------------------------

User 'JoshRosen' has created a pull request for this issue:
https://github.com/apache/spark/pull/3160

> StreamingContext should not allow start() to be called after calling stop()
> ---------------------------------------------------------------------------
>
>                 Key: SPARK-4301
>                 URL: https://issues.apache.org/jira/browse/SPARK-4301
>             Project: Spark
>          Issue Type: Bug
>          Components: Streaming
>    Affects Versions: 1.0.0, 1.0.2, 1.1.0, 1.2.0
>            Reporter: Josh Rosen
>            Assignee: Josh Rosen
>
> In Spark 1.0.0+, calling {{stop()}} on a StreamingContext that has not been started is a no-op which has no side-effects.  This allows users to call {{stop()}} on a fresh StreamingContext followed by {{start()}}.  I believe that this almost always indicates an error and is not behavior that we should support.  Since we don't allow {{start() stop() start()}} then I don't think it makes sense to allow {{stop() start()}}.
> The current behavior can lead to resource leaks when StreamingContext constructs its own SparkContext: if I call {{stop(stopSparkContext=True)}}, then I expect StreamingContext's underlying SparkContext to be stopped irrespective of whether the StreamingContext has been started.  This is useful when writing unit test fixtures.
> Prior discussions:
> - https://github.com/apache/spark/pull/3053#discussion-diff-19710333R490
> - https://github.com/apache/spark/pull/3121#issuecomment-61927353



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org