Skip to content

Code cleanup now that all runners support windowed side inputs.#1812

Closed
robertwb wants to merge 3 commits intoapache:python-sdkfrom
robertwb:side-inputs
Closed

Code cleanup now that all runners support windowed side inputs.#1812
robertwb wants to merge 3 commits intoapache:python-sdkfrom
robertwb:side-inputs

Conversation

@robertwb
Copy link
Copy Markdown
Contributor

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.

@robertwb
Copy link
Copy Markdown
Contributor Author

R: @charlesccychen

@coveralls
Copy link
Copy Markdown

Coverage Status

Changes Unknown when pulling 6ff06f0 on robertwb:side-inputs into ** on apache:python-sdk**.

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 22, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/6727/
--none--

@@ -98,13 +97,9 @@ def __init__(self,
self.is_new_dofn = True

# SideInputs
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you add a docstring for the constructor of DoFnRunner? In particular, we should note that the expected type for the side_input argument is a sideinputs.SideInputMap.

if isinstance(side_input, sideinputs.SideInputMap)
else {global_window: side_input}
for side_input in side_inputs]
self.side_inputs = side_inputs
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a little confusing now that there is no processing code here; we only need to save the self.side_inputs property when we're using a NewDoFn; can you add a comment to this effect?

@charlesccychen
Copy link
Copy Markdown
Contributor

Thanks! Looks good modulo comments for clarity.

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 22, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/6724/
--none--

@coveralls
Copy link
Copy Markdown

Coverage Status

Changes Unknown when pulling 0bbb51a on robertwb:side-inputs into ** on apache:python-sdk**.

@asfbot
Copy link
Copy Markdown

asfbot commented Jan 23, 2017

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/beam_PreCommit_Java_MavenInstall/6738/
--none--

fn: user DoFn to invoke
args: positional side input arguments (static and placeholder), if any
kwargs: keyword side input arguments (static and placeholder), if any
side_inputs: list of sideinput.SideInputMaps for deferred side inputs
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: this should be "sideinputs.SideInputMaps"; period at end of each description.

@charlesccychen
Copy link
Copy Markdown
Contributor

Thanks! LGTM (modulo nit).

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.

4 participants