Use bigdataoss 3.x-compatible API in BigQueryIO's BatchLoads#34105
Merged
ahmedabu98 merged 2 commits intoapache:masterfrom Mar 3, 2025
Merged
Use bigdataoss 3.x-compatible API in BigQueryIO's BatchLoads#34105ahmedabu98 merged 2 commits intoapache:masterfrom
ahmedabu98 merged 2 commits intoapache:masterfrom
Conversation
clairemcginty
commented
Feb 27, 2025
| // written. | ||
| static final int DEFAULT_FILE_TRIGGERING_BYTE_COUNT = | ||
| AsyncWriteChannelOptions.UPLOAD_CHUNK_SIZE_DEFAULT; // 64MiB as of now | ||
| AsyncWriteChannelOptions.DEFAULT.getUploadChunkSize(); // 64MiB as of now |
Contributor
Author
There was a problem hiding this comment.
we could also just inline the value, though it changes a bit in bigdataoss 2.x vs 3.x
public static final int UPLOAD_CHUNK_SIZE_GRANULARITY = 8 * 1024 * 1024;
public static final int UPLOAD_CHUNK_SIZE_DEFAULT =
Runtime.getRuntime().maxMemory() < 512 * 1024 * 1024
? UPLOAD_CHUNK_SIZE_GRANULARITY
: 8 * UPLOAD_CHUNK_SIZE_GRANULARITY;3.x:
private static final int UPLOAD_CHUNK_SIZE_GRANULARITY = 8 * 1024 * 1024;
private static final int DEFAULT_UPLOAD_CHUNK_SIZE =
Runtime.getRuntime().maxMemory() < 512 * 1024 * 1024
? UPLOAD_CHUNK_SIZE_GRANULARITY
: 3 * UPLOAD_CHUNK_SIZE_GRANULARITY;
Contributor
|
Assigning reviewers. If you would like to opt out of this review, comment R: @damondouglas for label java. Available commands:
The PR bot will only process comments in the main thread (not review comments). |
VardhanThigle
pushed a commit
to VardhanThigle/beam
that referenced
this pull request
Mar 21, 2025
…34105) * Make DEFAULT_FILE_TRIGGERING_BYTE_COUNT derivation compatible with bigdataoss 3.x * update CHANGES.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
related to #33368; Beam cannot upgrade its bigdataoss libs to 3.x yet, since they target Java 11 bytecode. However, there are a few breaking changes in 3.x that prohibit me as an end-user from upgrading my project to use 3.x. In addition to the linked PR, this one updates the reference to
AsyncWriteChannelOptions.UPLOAD_CHUNK_SIZE_DEFAULT, which has been removed in 3.x, and uses an API compatible with both 2.x and 3.x.Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
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, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.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)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.