Skip to content

Conversation

@zsxwing
Copy link
Member

@zsxwing zsxwing commented Nov 28, 2017

What changes were proposed in this pull request?

Use a separate Spark event queue for StreamingQueryListenerBus so that if there are many non-streaming events, streaming query listeners don't need to wait for other Spark listeners and can catch up.

How was this patch tested?

Jenkins

@SparkQA
Copy link

SparkQA commented Nov 29, 2017

Test build #84274 has finished for PR 19838 at commit 60035fa.

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

* listeners to be somewhat isolated from others.
*/
private def addToQueue(listener: SparkListenerInterface, queue: String): Unit = synchronized {
private[spark] def addToQueue(
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it necessary to make this change?

Copy link
Member Author

Choose a reason for hiding this comment

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

Change it in order to call it in StreamingQueryListenerBus.

import StreamingQueryListener._

sparkListenerBus.addToSharedQueue(this)
sparkListenerBus.addToQueue(this, "streams")
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: wanna make this a constant?

@brkyvz
Copy link
Contributor

brkyvz commented Nov 29, 2017

LGTM but I have very limited context on this codepath. Maybe @tdas can also take a very quick look?

@vanzin
Copy link
Contributor

vanzin commented Nov 29, 2017

Don't you mean "thread" instead of "query" in your summary?

@zsxwing zsxwing changed the title [SPARK-22638][SS]Use a separate query for StreamingQueryListenerBus [SPARK-22638][SS]Use a separate queue for StreamingQueryListenerBus Nov 29, 2017
@zsxwing
Copy link
Member Author

zsxwing commented Nov 29, 2017

@vanzin yeah. Good catch. Just a typo.

@SparkQA
Copy link

SparkQA commented Nov 30, 2017

Test build #84319 has finished for PR 19838 at commit 9b4ce99.

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

@tdas
Copy link
Contributor

tdas commented Dec 1, 2017

LGTM.

@zsxwing
Copy link
Member Author

zsxwing commented Dec 1, 2017

Thanks! Merging to master.

@zsxwing zsxwing closed this Dec 1, 2017
@zsxwing zsxwing deleted the SPARK-22638 branch December 1, 2017 21:04
asfgit pushed a commit that referenced this pull request Dec 1, 2017
## What changes were proposed in this pull request?

Use a separate Spark event queue for StreamingQueryListenerBus so that if there are many non-streaming events, streaming query listeners don't need to wait for other Spark listeners and can catch up.

## How was this patch tested?

Jenkins

Author: Shixiong Zhu <[email protected]>

Closes #19838 from zsxwing/SPARK-22638.
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.

6 participants