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

Supply gcs-connector options from default Configuration #5549

Merged
merged 4 commits into from
Jan 31, 2025

Conversation

clairemcginty
Copy link
Contributor

apache/beam#32769 is released in Beam 2.62.0; this PR uses the new GcsOption to pass all available gcs-connector options, parsed from the default Configuration (i.e. core-site.xml).

val config = new Configuration()
val o = optionsAs[GcsOptions]

o.setGoogleCloudStorageReadOptions(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's a method to parse all this for us but it's not public: https://github.com/GoogleCloudDataproc/hadoop-connectors/blob/v3.0.4/gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GoogleHadoopFileSystemConfiguration.java#L645-L660

I do have a PR up to make it public so hopefully it can be dropped in in a future release.

Copy link
Contributor

Choose a reason for hiding this comment

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

Link the PR in the code somewhere so we can find it later

Copy link

codecov bot commented Jan 22, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 61.32%. Comparing base (db7b14e) to head (898b16e).
Report is 36 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5549      +/-   ##
==========================================
+ Coverage   61.31%   61.32%   +0.01%     
==========================================
  Files         314      314              
  Lines       11249    11236      -13     
  Branches      770      778       +8     
==========================================
- Hits         6897     6891       -6     
+ Misses       4352     4345       -7     

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

val config = new Configuration()
val o = optionsAs[GcsOptions]

o.setGoogleCloudStorageReadOptions(
Copy link
Contributor

Choose a reason for hiding this comment

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

Link the PR in the code somewhere so we can find it later

@kellen kellen merged commit 661bacf into main Jan 31, 2025
11 checks passed
@kellen kellen deleted the gcs-connector-opts branch January 31, 2025 17:12
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.

2 participants