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-9951] Using the builder pattern for Go synthetic config frontend #11747
Conversation
R: @lostluck |
// restriction will always be output, so the number of splits will be in | ||
// the range of [1, N] where N is the size of the original restriction. | ||
InitialSplits int | ||
numElements int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: Default encoding with JSON (or even future with beam.Schemas) will not encode unexported fields. You'll need to register a coder with beam.RegisterCoder if you want to ensure these get encoded properly.
Alternatively, having the fields be exported while still providing and recommending a builder is not unreasonable. Eg. Document on the type (as you have it) that the builder is recommended etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yea, forgot about that. I'll go with having them exported and just recommend a builder. Done.
// always be output, so the number of splits will be in the range of [1, N] | ||
// where N is the size of the original restriction. | ||
InitialSplits int | ||
outputPerInput int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment here WRT the unexported fields being unserializable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks!
Instead of just creating SourceConfigs and StepConfigs, have a builder pattern to allow more user-friendly creation of those configs with defaults.
9db94d9
to
d032818
Compare
Instead of just creating SourceConfigs and StepConfigs, have a builder
pattern to allow more user-friendly creation of those configs with
defaults.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username
).[BEAM-XXX] Fixes bug in ApproximateQuantiles
, where you replaceBEAM-XXX
with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.CHANGES.md
with noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
Post-Commit Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.