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 Runner : Replace queueStream with custom DStream in Spark streaming Flatten transform #34080

Merged
merged 8 commits into from
Mar 3, 2025

Conversation

twosom
Copy link
Contributor

@twosom twosom commented Feb 26, 2025

Please add a meaningful description for your change here

fixes #18144
fixes #20426

This PR replaces Spark's queueStream with a custom SingleEmitInputDStream implementation
for the Flatten transform in Spark streaming. The queueStream was not checkpoint-able,
which caused issues when recovering pipelines with flattened bounded and unbounded PCollections.

The custom SingleEmitInputDStream ensures:

  • Proper checkpoint recovery for Flatten transform
  • Single emission of bounded data in streaming context
  • Reliable handling of mixed bounded/unbounded PCollections

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

Copy link
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

@twosom
Copy link
Contributor Author

twosom commented Feb 26, 2025

assign set of reviewers

Copy link
Contributor

Assigning reviewers. If you would like to opt out of this review, comment assign to next reviewer:

R: @damccorm for label build.

Available commands:

  • stop reviewer notifications - opt out of the automated review tooling
  • remind me after tests pass - tag the comment author after tests pass
  • waiting on author - shift the attention set back to the author (any comment or push by the author will return the attention set to the reviewers)

The PR bot will only process comments in the main thread (not review comments).

@twosom
Copy link
Contributor Author

twosom commented Feb 27, 2025

Run Java_Spark3_Versions PreCommit

@twosom
Copy link
Contributor Author

twosom commented Feb 27, 2025

Run Java PreCommit

@twosom
Copy link
Contributor Author

twosom commented Feb 27, 2025

Run Spotless PreCommit

@twosom
Copy link
Contributor Author

twosom commented Feb 27, 2025

Run Spark ValidatesRunner

@twosom twosom force-pushed the replace-queue-stream branch from f0d1816 to 24118f7 Compare February 27, 2025 01:32
@twosom
Copy link
Contributor Author

twosom commented Feb 27, 2025

The failing tests are also failing in the latest master branch, unrelated to this PR's changes.

@Abacn
Copy link
Contributor

Abacn commented Feb 27, 2025

Thanks, spark runner tests are currently broken (by #33574) and we are working on Fix.

@Abacn
Copy link
Contributor

Abacn commented Feb 28, 2025

The tests are fixed on HEAD. Would you mind rebasing your PR onto the latest master branch? Thanks!

@twosom
Copy link
Contributor Author

twosom commented Mar 1, 2025

The tests are fixed on HEAD. Would you mind rebasing your PR onto the latest master branch? Thanks!

@Abacn Thank you. The test runs smoothly!

Copy link
Contributor

@Abacn Abacn left a comment

Choose a reason for hiding this comment

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

Thank you!

@Abacn Abacn merged commit 5ec0407 into apache:master Mar 3, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants