Skip to content

Conversation

@swegner
Copy link
Contributor

@swegner swegner commented Apr 5, 2016

Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

  • Make sure the PR title is formatted like:
    [BEAM-<Jira issue #>] Description of pull request
  • Make sure tests pass via mvn clean verify. (Even better, enable
    Travis-CI on your fork and ensure the whole test matrix passes).
  • Replace "<Jira issue #>" in the title with the actual Jira issue
    number, if there is one.
  • If this contribution is large, please file an Apache
    Individual Contributor License Agreement.

@swegner
Copy link
Contributor Author

swegner commented Apr 5, 2016

R= @kennknowles @bjchambers

public void populateDisplayData(DisplayData.Builder builder) {
builder
.add("numMonths", number)
.add("startDate", new DateTime(startDate, timeZone).toInstant());
Copy link
Contributor

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).

@swegner swegner force-pushed the displaydata-window branch 4 times, most recently from 526bf2a to 370d229 Compare April 14, 2016 18:52
@swegner
Copy link
Contributor Author

swegner commented Apr 14, 2016

I've addressed all feedback so far. Please take another look. @bjchambers


@Override
public String toString() {
return "Repeatedly.forever(AfterWatermark.pastEndOfWindow)";
Copy link
Contributor

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()).

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good

@bjchambers
Copy link
Contributor

Some small comments, then I think this will LGTM

@swegner
Copy link
Contributor Author

swegner commented Apr 14, 2016

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()";
Copy link
Contributor

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?

@swegner swegner force-pushed the displaydata-window branch from c551412 to adf6d1c Compare April 14, 2016 22:46
@swegner
Copy link
Contributor Author

swegner commented Apr 15, 2016

I've addressed all feedback so far. Please take another look. @bjchambers

@asfgit asfgit closed this in 9ff4269 Apr 15, 2016
@bjchambers
Copy link
Contributor

LGTM. Merged.

@swegner swegner deleted the displaydata-window branch April 20, 2016 16:50
@swegner
Copy link
Contributor Author

swegner commented May 16, 2016

Backported via GoogleCloudPlatform/DataflowJavaSDK#216

iemejia referenced this pull request in iemejia/beam Jan 12, 2018
FuRyanf pushed a commit to FuRyanf/beam that referenced this pull request Sep 13, 2024
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.

3 participants