flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fabian Hueske (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-1045) Remove Combinable Annotation
Date Tue, 12 Aug 2014 21:54:13 GMT

    [ https://issues.apache.org/jira/browse/FLINK-1045?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14094759#comment-14094759
] 

Fabian Hueske commented on FLINK-1045:
--------------------------------------

Exactly. I propose to remove the annotation and the default implementation and check combinability
by checking for the interface implementation. Since this is a API breaking change, I would
do it for 0.6 (if we do it). 

Users that want to enable the combiner for a RichGroupReduceFunction would need to provide
an implementation instead of attaching the annotation (and implement the combiner if they
don't want to use the default implementation). With the current implementation, the combinable
annotation also needs to be attached for UDFs that implement only the interface and not the
rich function.

I find it a bit awkward that users needs to implement an interface and activate the combinability
with the annotation where the implementation would be sufficient.

> Remove Combinable Annotation
> ----------------------------
>
>                 Key: FLINK-1045
>                 URL: https://issues.apache.org/jira/browse/FLINK-1045
>             Project: Flink
>          Issue Type: Improvement
>          Components: Java API, Scala API
>            Reporter: Fabian Hueske
>            Priority: Blocker
>              Labels: api-change
>
> Since the {{combine()}} method was extracted into an interface, we can check if a function
is combinable by checking if the interface is implemented.
> Hence, the {{Combinable}} annotation could be removed, IMHO.
> However, this would change the API because {{RichGroupReduceFunction}} could no longer
have a default implementation of {{combine()}} that can be enabled by attaching the annotation.
> Right now, the {{Combinable}} annotation is just not necessary as the implementation
of the interface tells the system everything it needs to know.
> Removing the {{Combinable}} annotation would also make the handling of different combinable
functions easier. For example a function that implements the interfaces {{GroupReduceFunction}}
and {{FlatCombineFunction}} does not need to attach the annotation.
> Since this is not a big, but API changing change, I would like to get it into 0.6 (if
we decide to do it).
> What do you guys think?



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message