Skip to content

Conversation

@tdas
Copy link
Contributor

@tdas tdas commented May 5, 2015

Currently attempt to start a streamingContext while another one is started throws a confusing exception that the action name JobScheduler is already registered. Instead its best to throw a proper exception as it is not supported.

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@tdas tdas changed the title [SPARK-7361][STREAMING] Added check for multiple streaming contexts [SPARK-7361][STREAMING] Throw unambiguous exception when attempting to start multiple StreamingContexts in the same JVM May 5, 2015
@tdas
Copy link
Contributor Author

tdas commented May 5, 2015

@JoshRosen Since you have done this before the SparkContext, could you quickly take a look at this?

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/31854/
Test FAILed.

@SparkQA
Copy link

SparkQA commented May 5, 2015

Test build #765 has started for PR 5907 at commit 5870e2b.

@SparkQA
Copy link

SparkQA commented May 5, 2015

Test build #765 has finished for PR 5907 at commit 5870e2b.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
    • case class Not(child: Expression) extends UnaryExpression with Predicate with ExpectsInputTypes
    • case class And(left: Expression, right: Expression)
    • case class Or(left: Expression, right: Expression)
    • abstract class BinaryComparison extends BinaryExpression with Predicate
    • trait StringRegexExpression extends ExpectsInputTypes
    • trait CaseConversionExpression extends ExpectsInputTypes
    • case class Substring(str: Expression, pos: Expression, len: Expression)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To clarify, we're allowed to start multiple StreamingContexts provided that only one context is running at a time, right? Since that's the case, what do you think about rewording this to something like "Only one StreamingContext may be running in this JVM"? I just worry that "started" might be misinterpreted as saying that you can only create one SparkContext per JVM.

We don't need to add an explicit test for starting a new StreamingContext after stopping the old one since this case is implicitly handled by all of our other test suites.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I think that core has some logic to print the call site of the active context in the error message, which can sometimes be a useful debugging aid when determining where contexts are being leaked.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, let me be a little bit more unambiguous in the choice of verbs. We are allowed to instantiate multiple StreamingContexts provided only one is started (ssc.start()) at a time. That's why I used "started" so that it directly maps to ssc.start(). This is different from SparkContexts where it is started as soon as it is instantiated.

I will add the callsite information.

@AmplabJenkins
Copy link

Build triggered.

@AmplabJenkins
Copy link

Build started.

@SparkQA
Copy link

SparkQA commented May 6, 2015

Test build #31985 has started for PR 5907 at commit 5870e2b.

@SparkQA
Copy link

SparkQA commented May 6, 2015

Test build #31985 has finished for PR 5907 at commit 5870e2b.

  • This patch fails Spark unit tests.
  • This patch does not merge cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Build finished. Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/31985/
Test FAILed.

@JoshRosen
Copy link
Contributor

This build break is my fault; a patch that I merged depended on a file that was removed while reverting another patch. Pushing a hotfix now to re-add that file.

@JoshRosen
Copy link
Contributor

Jenkins, retest this please.

@AmplabJenkins
Copy link

Build triggered.

@AmplabJenkins
Copy link

Build started.

@SparkQA
Copy link

SparkQA commented May 6, 2015

Test build #32007 has started for PR 5907 at commit 5870e2b.

@SparkQA
Copy link

SparkQA commented May 6, 2015

Test build #32007 has finished for PR 5907 at commit 5870e2b.

  • This patch fails Spark unit tests.
  • This patch does not merge cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Build finished. Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/32007/
Test FAILed.

Conflicts:
	streaming/src/main/scala/org/apache/spark/streaming/StreamingContext.scala
@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@SparkQA
Copy link

SparkQA commented May 7, 2015

Test build #32097 has started for PR 5907 at commit 5fdfc0d.

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@SparkQA
Copy link

SparkQA commented May 7, 2015

Test build #32098 has started for PR 5907 at commit a9cd5bb.

@SparkQA
Copy link

SparkQA commented May 7, 2015

Test build #32097 has finished for PR 5907 at commit 5fdfc0d.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/32097/
Test FAILed.

@SparkQA
Copy link

SparkQA commented May 7, 2015

Test build #32098 has finished for PR 5907 at commit a9cd5bb.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/32098/
Test FAILed.

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@SparkQA
Copy link

SparkQA commented May 7, 2015

Test build #32130 has started for PR 5907 at commit fb81c4a.

@AmplabJenkins
Copy link

Merged build finished. Test FAILed.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/32130/
Test FAILed.

@tdas
Copy link
Contributor Author

tdas commented May 7, 2015

test this again

@SparkQA
Copy link

SparkQA commented May 7, 2015

Test build #781 has started for PR 5907 at commit fb81c4a.

@SparkQA
Copy link

SparkQA commented May 8, 2015

Test build #781 has finished for PR 5907 at commit fb81c4a.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@tdas
Copy link
Contributor Author

tdas commented May 8, 2015

@JoshRosen any more thoughts?

@JoshRosen
Copy link
Contributor

LGTM; thanks for adding the callsite.

@tdas
Copy link
Contributor Author

tdas commented May 11, 2015

Thanks @JoshRosen I am merging this.

asfgit pushed a commit that referenced this pull request May 11, 2015
…to start multiple StreamingContexts in the same JVM

Currently attempt to start a streamingContext while another one is started throws a confusing exception that the action name JobScheduler is already registered. Instead its best to throw a proper exception as it is not supported.

Author: Tathagata Das <[email protected]>

Closes #5907 from tdas/SPARK-7361 and squashes the following commits:

fb81c4a [Tathagata Das] Fix typo
a9cd5bb [Tathagata Das] Added startSite to StreamingContext
5fdfc0d [Tathagata Das] Merge remote-tracking branch 'apache-github/master' into SPARK-7361
5870e2b [Tathagata Das] Added check for multiple streaming contexts

(cherry picked from commit 1b46556)
Signed-off-by: Tathagata Das <[email protected]>
@asfgit asfgit closed this in 1b46556 May 11, 2015
jeanlyn pushed a commit to jeanlyn/spark that referenced this pull request May 28, 2015
…to start multiple StreamingContexts in the same JVM

Currently attempt to start a streamingContext while another one is started throws a confusing exception that the action name JobScheduler is already registered. Instead its best to throw a proper exception as it is not supported.

Author: Tathagata Das <[email protected]>

Closes apache#5907 from tdas/SPARK-7361 and squashes the following commits:

fb81c4a [Tathagata Das] Fix typo
a9cd5bb [Tathagata Das] Added startSite to StreamingContext
5fdfc0d [Tathagata Das] Merge remote-tracking branch 'apache-github/master' into SPARK-7361
5870e2b [Tathagata Das] Added check for multiple streaming contexts
jeanlyn pushed a commit to jeanlyn/spark that referenced this pull request Jun 12, 2015
…to start multiple StreamingContexts in the same JVM

Currently attempt to start a streamingContext while another one is started throws a confusing exception that the action name JobScheduler is already registered. Instead its best to throw a proper exception as it is not supported.

Author: Tathagata Das <[email protected]>

Closes apache#5907 from tdas/SPARK-7361 and squashes the following commits:

fb81c4a [Tathagata Das] Fix typo
a9cd5bb [Tathagata Das] Added startSite to StreamingContext
5fdfc0d [Tathagata Das] Merge remote-tracking branch 'apache-github/master' into SPARK-7361
5870e2b [Tathagata Das] Added check for multiple streaming contexts
nemccarthy pushed a commit to nemccarthy/spark that referenced this pull request Jun 19, 2015
…to start multiple StreamingContexts in the same JVM

Currently attempt to start a streamingContext while another one is started throws a confusing exception that the action name JobScheduler is already registered. Instead its best to throw a proper exception as it is not supported.

Author: Tathagata Das <[email protected]>

Closes apache#5907 from tdas/SPARK-7361 and squashes the following commits:

fb81c4a [Tathagata Das] Fix typo
a9cd5bb [Tathagata Das] Added startSite to StreamingContext
5fdfc0d [Tathagata Das] Merge remote-tracking branch 'apache-github/master' into SPARK-7361
5870e2b [Tathagata Das] Added check for multiple streaming contexts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants