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

[BEAM-10311] Sharing restriction trackers between SDF and DataSource. #12095

Merged
merged 1 commit into from Jun 26, 2020

Conversation

youngoli
Copy link
Contributor

Adding a channel that can be used to retrieve the current restriction
tracker from the DataSource.


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
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
Python Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
Build Status
--- Build Status
XLang --- --- Build Status --- ---

Pre-Commit Tests Status (on master branch)

--- Java Python Go Website
Non-portable 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.

@youngoli
Copy link
Contributor Author

R: @lostluck

Ended up being a really small PR. I tried to think of a way to test it (like testing that the channel gets set in the DataSource maybe), but it seems too specific of an interaction to test, and any test for it would be a bit complicated.

For context of what I'm intending when it comes to the actual splitting: The idea is the DataSource will receive the restriction tracker from the channel when it needs to check progress or perform a split, and then return the restriction tracker to the channel when done with it. The goal is to make sure there's only one copy of that tracker being sent around, so that nothing else is using the tracker when processing is done and the tracker is getting deleted.

Copy link
Contributor

@lostluck lostluck left a comment

Choose a reason for hiding this comment

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

Agreed that this isn't something that can be tested independently without just testing that the language works. It's not currently doing anything beyond configuration and set up and what it needs to do is best finished up in the other with the tests.

@@ -217,6 +218,11 @@ type ProcessSizedElementsAndRestrictions struct {
PDo *ParDo

inv *ctInvoker

// rt allows this unit to send out restriction trackers being processed.
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo" Rt

Suggested change
// rt allows this unit to send out restriction trackers being processed.
// Rt allows this unit to send out restriction trackers being processed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. (Also switched the channel from *RTracker to RTracker)

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah yes. Good catch. Don't use pointers to interface types :)

Adding a channel that can be used to retrieve the current restriction
tracker from the DataSource.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants