Skip to content

[BEAM-2453] Perform a Multi-step combine in the DirectRunner#3579

Closed
tgroh wants to merge 1 commit into
apache:masterfrom
tgroh:combiner_lifting_direct_runner
Closed

[BEAM-2453] Perform a Multi-step combine in the DirectRunner#3579
tgroh wants to merge 1 commit into
apache:masterfrom
tgroh:combiner_lifting_direct_runner

Conversation

@tgroh
Copy link
Copy Markdown
Member

@tgroh tgroh commented Jul 17, 2017

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

This exercises the entire CombineFn lifecycle for simple combine fns,
expressed as a collection of DoFns.

@tgroh tgroh force-pushed the combiner_lifting_direct_runner branch from 522fa54 to 300d807 Compare July 18, 2017 20:37
@tgroh
Copy link
Copy Markdown
Member Author

tgroh commented Jul 18, 2017

R: @kennknowles

@tgroh tgroh force-pushed the combiner_lifting_direct_runner branch from 300d807 to d2aa893 Compare July 18, 2017 21:39
return new PTransformMatcher() {
@Override
public boolean matches(AppliedPTransform<?, ?, ?> application) {
if (application.getTransform() instanceof Combine.PerKey) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This matcher will not match rehydrated combine after #3334, because no transform will have this class. Instead, I think a CombineTranslation is needed, check the URN here, and all the bits needed by isApplicable should be in the CombinePayload.

transform.getTransform().getFn().getClass().getName());
@SuppressWarnings("unchecked")
CombineFn<InputT, AccumT, OutputT> fn =
(CombineFn<InputT, AccumT, OutputT>) transform.getTransform().getFn();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Here, too, the override should be in terms of the bits pulled from CombinePayload. They can be cast to Java UDFs for now, but I think it is only needed at the last moment before you pass to MultiStepCombine.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.1%) to 70.758% when pulling d2aa893 on tgroh:combiner_lifting_direct_runner into 2d5b6d7 on apache:master.

@tgroh
Copy link
Copy Markdown
Member Author

tgroh commented Jul 19, 2017

Built on top of #3597, so that should be reviewed first.

@tgroh tgroh force-pushed the combiner_lifting_direct_runner branch 2 times, most recently from a183453 to 08093f7 Compare July 19, 2017 23:29
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.1%) to 70.755% when pulling 08093f7 on tgroh:combiner_lifting_direct_runner into 2e51bde on apache:master.

@tgroh tgroh force-pushed the combiner_lifting_direct_runner branch 2 times, most recently from b53d7e3 to 22c7efa Compare July 25, 2017 19:01
@coveralls
Copy link
Copy Markdown

Coverage Status

Changes Unknown when pulling 22c7efa on tgroh:combiner_lifting_direct_runner into ** on apache:master**.

@tgroh tgroh force-pushed the combiner_lifting_direct_runner branch 2 times, most recently from 805c9fe to 38c9d1e Compare July 26, 2017 21:43
This exercises the entire CombineFn lifecycle for simple combine fns,
expressed as a collection of DoFns.
@tgroh tgroh force-pushed the combiner_lifting_direct_runner branch from 38c9d1e to 845ac35 Compare July 26, 2017 21:50
@tgroh
Copy link
Copy Markdown
Member Author

tgroh commented Jul 26, 2017

PTAL

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.08%) to 70.481% when pulling 845ac35 on tgroh:combiner_lifting_direct_runner into b67a30b on apache:master.

Copy link
Copy Markdown
Member

@kennknowles kennknowles left a comment

Choose a reason for hiding this comment

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

LGTM

@asfgit asfgit closed this in 1f2634d Jul 28, 2017
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