Skip to content

Conversation

@swegner
Copy link
Contributor

@swegner swegner commented Apr 7, 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 7, 2016

R: @bjchambers

This PR is based on feeback from #123, #124, #125, #126. I will update those PRs to consume these APIs once merged.

return builder.toString();
}

private static String convertNamespace(Class<?> nsClass) {
Copy link
Contributor

Choose a reason for hiding this comment

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

namespaceOf(...)? classToNamespace? (just thinking out loud, feel free to ignore if you don't think they're improvements).

@bjchambers
Copy link
Contributor

LGTM


Only thing that occurred to me is that we could reduce the number of methods on the builder by putting more logic into the Type enum. Let's stick with this for now since the other PRs are based on the existing API, but it may be worth thinking about something like:

Type.STRING.entry("key", "value")
Type.STRING.entryIfNotNull("key", value)
Type.STRING.entryIfNotDefault("key", value, defaultValue)

Then the builder API just needs a method to add an entry if its not null:

builder.add(Type.STRING.entryIfNotDefault("key", value, "default"))

This is also nice when including the inference:

builder.add(Type.infer(value).entry("key", value))

@asfgit asfgit closed this in 245cffa Apr 8, 2016
@swegner swegner deleted the displaydata-defaults branch April 14, 2016 15:16
@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
mareksimunek pushed a commit to mareksimunek/beam that referenced this pull request May 9, 2018
[euphoria-spark] Propagate exception in SparkFlowTranslator
pl04351820 pushed a commit to pl04351820/beam that referenced this pull request Dec 20, 2023
* feat: integrate limit_to_last changes from apache#57 to async

* fix: whitespace in docs

* fix: whitespace in docs
MabelYC pushed a commit to MabelYC/beam that referenced this pull request Mar 23, 2025
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