[
https://issues.apache.org/jira/browse/BEAM-6740?focusedWorklogId=205080&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-205080
]
ASF GitHub Bot logged work on BEAM-6740:
----------------------------------------
Author: ASF GitHub Bot
Created on: 27/Feb/19 10:09
Start Date: 27/Feb/19 10:09
Worklog Time Spent: 10m
Work Description: echauchot commented on issue #7948: [BEAM-6740] Add
comment explaining unused combine.globally translation
URL: https://github.com/apache/beam/pull/7948#issuecomment-467803091
> It might be pretty easy to follow the example at
>
>
[beam/runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/CombineTranslation.java](https://github.com/apache/beam/blob/b83b302ef97767e4ca245ea24e8bd40a6692e72c/runners/core-construction-java/src/main/java/org/apache/beam/runners/core/construction/CombineTranslation.java#L56)
>
> Line 56 in
[b83b302](/apache/beam/commit/b83b302ef97767e4ca245ea24e8bd40a6692e72c)
>
> public static class CombinePayloadTranslator
> to create the translator.
Thanks Kenn for taking a look.
Sure it is just that I don't have time right now to create one and deal with
the impacts and tests for all the runners. So I prefer to focus on making
combine work on the new POC runner even if I temporary get back to translator
resolution based on classes.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 205080)
Time Spent: 0.5h (was: 20m)
> Combine.globally translation is never called
> --------------------------------------------
>
> Key: BEAM-6740
> URL: https://issues.apache.org/jira/browse/BEAM-6740
> Project: Beam
> Issue Type: Bug
> Components: runner-core
> Reporter: Etienne Chauchot
> Priority: Major
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> SDK translates Combine.Globally as a composite transform composed of:
> * Map that assigns Void keys
> * Combine.PerKey
> on spark: As Combine.Perkey uses a spark GBK inside it, the runner adds its
> own translation of Combine.Globally to avoid less performant GBK. This
> translation should be called in place of entering the composite transform
> translation.A pipeline like this:
> {code}
> PCollection<Integer> input = pipeline.apply(Create.of(1, 2, 3, 4, 5, 6, 7, 8,
> 9, 10));
> input.apply(
> Combine.globally(new IntegerCombineFn()));
> {code}
> {code}
> private static class IntegerCombineFn extends Combine.CombineFn<Integer,
> Integer, Integer> {
> @Override
> public Integer createAccumulator() {
> return 0;
> }
> @Override
> public Integer addInput(Integer accumulator, Integer input) {
> return accumulator + input;
> }
> @Override
> public Integer mergeAccumulators(Iterable<Integer> accumulators) {
> Integer result = 0;
> for (Integer value : accumulators) {
> result += value;
> }
> return result;
> }
> @Override
> public Integer extractOutput(Integer accumulator) {
> return accumulator;
> }
> }
> {code}
> is translated as the above composite.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)