Skip to content

Conversation

@nehsyc
Copy link
Contributor

@nehsyc nehsyc commented Jan 31, 2021

Use GroupIntoBatches.WithShardedKey API to enable dynamic sharding when using FILE_LOADS for unbounded data. This is a follow-up change to #13496.

This PR

  • Wires withAutoSharding option in BigQueryIO builder to BatchLoads.
  • Allows numFileShards to be 0 when performing streaming FILE_LOADS.

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

  • Choose reviewer(s) and mention them in a comment (R: @username).
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
  • 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.

Post-Commit Tests Status (on master branch)

Lang SDK Dataflow Flink Samza Spark Twister2
Go Build Status --- Build Status --- Build Status ---
Java Build Status Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status Build Status
Build Status
Build Status
Build Status
Python Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
--- Build Status ---
XLang Build Status Build Status Build Status --- Build Status ---

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website Whitespace Typescript
Non-portable Build Status Build Status
Build Status
Build Status
Build Status
Build Status Build Status Build Status Build Status
Portable --- Build Status --- --- --- ---

See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests

See CI.md for more information about GitHub Actions CI.

@nehsyc
Copy link
Contributor Author

nehsyc commented Feb 1, 2021

R: @reuvenlax, @pabloem

@nehsyc nehsyc changed the title [BEAM-11408] Integrate BigQuery sink file loads with GroupIntoBatches [BEAM-11772] Integrate BigQuery sink file loads with GroupIntoBatches Feb 8, 2021
@pabloem
Copy link
Member

pabloem commented Feb 8, 2021

Run Java_Examples_Dataflow PreCommit

Copy link
Member

@pabloem pabloem left a comment

Choose a reason for hiding this comment

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

This mostly looks reasonable. I just have one question on the test utilty change.

Map<String, List<String>> insertErrors = Maps.newHashMap();

// The counter for the number of insertions performed.
static AtomicInteger insertCount;
Copy link
Member

Choose a reason for hiding this comment

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

why is this static? shouldn't it belong to the instance?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It seems that the instance can be reconstructed for multiple times. If not using a static variable, the counter will be zero at the verification time. There is explanation for the static table map above:
...each ParDo will get a separate instance of FakeDatasetServices...

static org.apache.beam.vendor.guava.v26_0_jre.com.google.common.collect.Table<

Copy link
Member

Choose a reason for hiding this comment

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

makes sense.

@pabloem
Copy link
Member

pabloem commented Feb 9, 2021

Run Java PostCommit

Copy link
Member

@pabloem pabloem left a comment

Choose a reason for hiding this comment

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

LGTM

@reuvenlax PTAL - I will merge in a couple days if you don't have any more comments.

@pabloem pabloem merged commit dc29b8c into apache:master Feb 11, 2021
@pabloem
Copy link
Member

pabloem commented Feb 11, 2021

thanks @nehsyc !

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