-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[BEAM-121] Add display data to windowing transforms #124
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
Conversation
| public void populateDisplayData(DisplayData.Builder builder) { | ||
| builder | ||
| .add("numMonths", number) | ||
| .add("startDate", new DateTime(startDate, timeZone).toInstant()); |
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.
This could benefit from the "omit default" logic (I believe we use the epoch as the default).
526bf2a to
370d229
Compare
|
I've addressed all feedback so far. Please take another look. @bjchambers |
|
|
||
| @Override | ||
| public String toString() { | ||
| return "Repeatedly.forever(AfterWatermark.pastEndOfWindow)"; |
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.
This should be either:
"DefaultTrigger" (which may be what users expect to see, and lets us differentiate the two)
or it should reuse AfterWatermark.TO_STRING and such (specifically, your toString there had pastEndOfWindow()).
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.
Actually, what if we just omit display data for the default trigger (and leave the toString() implementation as-is). This is consistent with other places where we exclude defaults.
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.
Sounds good
|
Some small comments, then I think this will LGTM |
|
I've addressed all feedback so far. Please take another look. @bjchambers |
| public class AfterWatermark { | ||
|
|
||
| private static final String TO_STRING = "AfterWatermark.pastEndOfWindow()"; | ||
| static final String TO_STRING = "AfterWatermark.pastEndOfWindow()"; |
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.
Since you're treating DefaultTrigger as default, you shouldn't need this to be visible, right?
c551412 to
adf6d1c
Compare
|
I've addressed all feedback so far. Please take another look. @bjchambers |
|
LGTM. Merged. |
|
Backported via GoogleCloudPlatform/DataflowJavaSDK#216 |
Be sure to do all of the following to help us incorporate your contribution
quickly and easily:
[BEAM-<Jira issue #>] Description of pull requestmvn clean verify. (Even better, enableTravis-CI on your fork and ensure the whole test matrix passes).
number, if there is one.
Individual Contributor License Agreement.