Skip to content
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

[SPARK-23144][SS] Added console sink for continuous processing #20311

Closed
wants to merge 1 commit into from

Conversation

tdas
Copy link
Contributor

@tdas tdas commented Jan 18, 2018

What changes were proposed in this pull request?

Refactored ConsoleWriter into ConsoleMicrobatchWriter and ConsoleContinuousWriter.

How was this patch tested?

new unit test

@tdas
Copy link
Contributor Author

tdas commented Jan 18, 2018

@jose-torres PTAL

@SparkQA
Copy link

SparkQA commented Jan 18, 2018

Test build #86331 has finished for PR 20311 at commit 6f69669.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • trait ConsoleWriter extends Logging
  • class ConsoleMicroBatchWriter(batchId: Long, schema: StructType, val options: DataSourceV2Options)
  • class ConsoleContinuousWriter(schema: StructType, val options: DataSourceV2Options)

extends DataSourceV2Writer with ConsoleWriter {

override def commit(messages: Array[WriterCommitMessage]): Unit = {
printRows(messages, schema, s"Batch: $batchId")
Copy link
Contributor

Choose a reason for hiding this comment

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

Not part of this PR - but can you envision scenarios where microbatch.commit(messages) would be implemented differently than continuous.commit(batchId, messages)? Seeing this in context made me realize there's an obvious strategy to unify the streaming writer APIs.

@jose-torres
Copy link
Contributor

LGTM

asfgit pushed a commit that referenced this pull request Jan 18, 2018
## What changes were proposed in this pull request?
Refactored ConsoleWriter into ConsoleMicrobatchWriter and ConsoleContinuousWriter.

## How was this patch tested?
new unit test

Author: Tathagata Das <[email protected]>

Closes #20311 from tdas/SPARK-23144.

(cherry picked from commit bf34d66)
Signed-off-by: Tathagata Das <[email protected]>
@asfgit asfgit closed this in bf34d66 Jan 18, 2018
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.

3 participants