-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-7361][STREAMING] Throw unambiguous exception when attempting to start multiple StreamingContexts in the same JVM #5907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Merged build triggered. |
|
Merged build started. |
|
@JoshRosen Since you have done this before the SparkContext, could you quickly take a look at this? |
|
Merged build finished. Test FAILed. |
|
Test FAILed. |
|
Test build #765 has started for PR 5907 at commit |
|
Test build #765 has finished for PR 5907 at commit
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
|
Build triggered. |
|
Build started. |
|
Test build #31985 has started for PR 5907 at commit |
|
Test build #31985 has finished for PR 5907 at commit
|
|
Build finished. Test FAILed. |
|
Test FAILed. |
|
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. |
|
Jenkins, retest this please. |
|
Build triggered. |
|
Build started. |
|
Test build #32007 has started for PR 5907 at commit |
|
Test build #32007 has finished for PR 5907 at commit
|
|
Build finished. Test FAILed. |
|
Test FAILed. |
Conflicts: streaming/src/main/scala/org/apache/spark/streaming/StreamingContext.scala
|
Merged build triggered. |
|
Merged build started. |
|
Test build #32097 has started for PR 5907 at commit |
|
Merged build triggered. |
|
Merged build started. |
|
Test build #32098 has started for PR 5907 at commit |
|
Test build #32097 has finished for PR 5907 at commit
|
|
Merged build finished. Test FAILed. |
|
Test FAILed. |
|
Test build #32098 has finished for PR 5907 at commit
|
|
Merged build finished. Test FAILed. |
|
Test FAILed. |
|
Merged build triggered. |
|
Merged build started. |
|
Test build #32130 has started for PR 5907 at commit |
|
Merged build finished. Test FAILed. |
|
Test FAILed. |
|
test this again |
|
Test build #781 has started for PR 5907 at commit |
|
Test build #781 has finished for PR 5907 at commit
|
|
@JoshRosen any more thoughts? |
|
LGTM; thanks for adding the callsite. |
|
Thanks @JoshRosen I am merging this. |
…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]>
…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
…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
…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
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.