Skip to content

Conversation

@Abacn
Copy link
Contributor

@Abacn Abacn commented Mar 13, 2025

Adds support for --add-modules JVM option through a new pipeline option JdkAddRootModules

fixes: #30281


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.

@Abacn
Copy link
Contributor Author

Abacn commented Mar 13, 2025

Tested on Dataflow v2 + Java 21 with a pipeline uses "jdk.incubator.vector"

Beam 2.63.0 (job Id 2025-03-13_15_08_35-746015370466363900):

"org.apache.beam.sdk.util.UserCodeException: java.lang.NoClassDefFoundError: jdk/incubator/vector/Vector
	at org.apache.beam.sdk.util.UserCodeException.wrap(UserCodeException.java:39)
	at com.github.abacn.VectorTest$1$DoFnInvoker.invokeProcessElement(Unknown Source)

with this change (build java core locally, build a custom container, add pipeline option --sdkContainerImage=gcr.io/.../beam_java21_sdk:2.63.0-custom --jdkAddRootModules=jdk.incubator.vector), it succeeded. job id: 2025-03-13_15_22_36-15628134386308323283

@Abacn Abacn marked this pull request as ready for review March 13, 2025 22:30
@Abacn
Copy link
Contributor Author

Abacn commented Mar 13, 2025

R: @kennknowles

@github-actions
Copy link
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

@Abacn
Copy link
Contributor Author

Abacn commented Mar 14, 2025

also worked for Dataflow legacy runner (after internal change)

job id: 2025-03-14_08_57_18-6904344628307499835

@Abacn
Copy link
Contributor Author

Abacn commented Mar 14, 2025

R: @dannymccormick

@Abacn
Copy link
Contributor Author

Abacn commented Mar 18, 2025

R: @tvalentyn (internal tracker: b/337016101)

Copy link
Contributor

@tvalentyn tvalentyn left a comment

Choose a reason for hiding this comment

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

Thanks!

Abacn and others added 2 commits March 18, 2025 12:24
Co-authored-by: tvalentyn <tvalentyn@users.noreply.github.com>
@tvalentyn
Copy link
Contributor

(Updated pr description)

@Abacn
Copy link
Contributor Author

Abacn commented Mar 18, 2025

failed Dataflow worker test:

  • testCommit_handlesFailedCommits
  • testStop_successfullyTerminates
  • testLatencyAttributionToCommittingState

not related to the change

@Abacn Abacn merged commit f8a6783 into apache:master Mar 18, 2025
25 of 26 checks passed
@Abacn Abacn deleted the addmodules branch March 18, 2025 18:30
talatuyarer pushed a commit to talatuyarer/beam that referenced this pull request Mar 20, 2025
* Expose add-modules JVM option in SDKHarnessOptions

* add changes.md

* Update CHANGES.md

Co-authored-by: tvalentyn <tvalentyn@users.noreply.github.com>

* Fix whitespace

* fix whitespace

---------

Co-authored-by: tvalentyn <tvalentyn@users.noreply.github.com>
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]: Enable to configure --add-modules jvm flag

2 participants