You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Beam JIRA Bot (Jira)" <ji...@apache.org> on 2020/08/10 17:08:22 UTC
[jira] [Commented] (BEAM-6511) AbstractGlobalCombineFn hierarchy is
inconsistent
[ https://issues.apache.org/jira/browse/BEAM-6511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17174774#comment-17174774 ]
Beam JIRA Bot commented on BEAM-6511:
-------------------------------------
This issue is P2 but has been unassigned without any comment for 60 days so it has been labeled "stale-P2". If this issue is still affecting you, we care! Please comment and remove the label. Otherwise, in 14 days the issue will be moved to P3.
Please see https://beam.apache.org/contribute/jira-priorities/ for a detailed explanation of what these priorities mean.
> AbstractGlobalCombineFn hierarchy is inconsistent
> -------------------------------------------------
>
> Key: BEAM-6511
> URL: https://issues.apache.org/jira/browse/BEAM-6511
> Project: Beam
> Issue Type: Bug
> Components: runner-dataflow
> Affects Versions: 2.9.0
> Reporter: Nahuel Lofeudo
> Priority: P2
> Labels: stale-P2
> Attachments: combineFn-hierarchy.png
>
>
> Subclasses of AbstractGlobalCombineFn seem to be arranged in a way that prevents them from being used with the DataflowRunner.
> Subclasses of AbstractGlobalCombineFn are under either CombineFn or CombineFnWithContext, which seems to be in itself a CombineFn which has access to PipelineOptions and Side Inputs.
> However, the DataflowRunner casts all combiners passed from user code to CombineFn (see [1]) which prevents combiners that extend CombineFnWithContext from being used there.
>
> For example:
> public class CustomCombinerFn extends CombineWithContext.CombineFnWithContext<...> \{...}
>
> final PCollectionView<SomeObject<String>> newCollection = oldCollection
> .apply("Custom Combiner", Combine.globally(new CustomCombinerFn(filter))
> .withSideInputs(filter)
> .withoutDefaults()
> .asSingletonView());
>
> IMHO either CombineFnWithContext should be a subclass of CombineFn or DataflowRunner should cast the combiner to AbstractGlobalCombineFn.
>
> [1] https://github.com/apache/beam/blob/b83b302ef97767e4ca245ea24e8bd40a6692e72c/runners/google-cloud-dataflow-java/src/main/java/org/apache/beam/runners/dataflow/DataflowRunner.java#L514
--
This message was sent by Atlassian Jira
(v8.3.4#803005)