Skip to content

Modernize legacy DoFn in BatchElementsExample (#40557) - #40560

Merged
chamikaramj merged 1 commit into
apache:masterfrom
CH-Abhinav:DoFn-BatchElements
Oct 19, 2026
Merged

chamikaramj merged 1 commit into
apache:masterfrom
CH-Abhinav:DoFn-BatchElements

Conversation

@CH-Abhinav

Copy link
Copy Markdown
Contributor

Issue

Fixes #40557

Description

Modernizes the LogOutput DoFn in BatchElementsExample.java to use parameter injection (@Element and OutputReceiver) instead of the legacy ProcessContext.

Changes

  • Replaced ProcessContext c parameter with @Element List<String> batch and OutputReceiver<String> receiver.
  • Verified with ./gradlew :examples:java:compileJava and ./gradlew :examples:java:spotlessApply.

@github-actions

Copy link
Copy Markdown
Contributor

Assigning reviewers:

R: @Abacn for label java.
Backup reviewer: ahmedabu98 (if the main reviewer is unresponsive, you can escalate to them by tagging their username)

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

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).

@codecov

codecov Bot commented Oct 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 58.66%. Comparing base (76f6e6d) to head (6157027).
⚠️ Report is 232 commits behind head on master.

Files with missing lines Patch % Lines
...org/apache/beam/examples/BatchElementsExample.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master   #40560      +/-   ##
============================================
+ Coverage     56.16%   58.66%   +2.49%     
- Complexity     2288    13974   +11686     
============================================
  Files          1124     2594    +1470     
  Lines        178336   272334   +93998     
  Branches       1489    11305    +9816     
============================================
+ Hits         100170   159774   +59604     
- Misses        75645   106526   +30881     
- Partials       2521     6034    +3513     
Flag Coverage Δ
java 65.06% <0.00%> (-10.73%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chamikaramj chamikaramj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@chamikaramj
chamikaramj merged commit b4ecb26 into apache:master Oct 19, 2026
18 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Modernize legacy DoFn in BatchElementsExample to use parameter injection

2 participants