You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Clemens Valiente (Jira)" <ji...@apache.org> on 2019/10/16 14:20:00 UTC
[jira] [Resolved] (KAFKA-5648) make Merger extend Aggregator
[ https://issues.apache.org/jira/browse/KAFKA-5648?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Clemens Valiente resolved KAFKA-5648.
-------------------------------------
Resolution: Won't Fix
> make Merger extend Aggregator
> -----------------------------
>
> Key: KAFKA-5648
> URL: https://issues.apache.org/jira/browse/KAFKA-5648
> Project: Kafka
> Issue Type: New Feature
> Components: streams
> Affects Versions: 0.11.0.0
> Reporter: Clemens Valiente
> Assignee: Clemens Valiente
> Priority: Minor
>
> Hi,
> I suggest that Merger<K,V> should extend Aggregator<K,V,V>.
> reason:
> Both classes usually do very similar things. A merger takes two sessions and combines them, an aggregator takes an existing session and aggregates new values into it.
> in some use cases it is actually the same thing, e.g.:
> <null, log_event> -> .map() to <session_id,SingletonList<log_event>> -> .groupByKey().aggregate() to <session_id, List<log_event>>
> In this case both merger and aggregator do the same thing: take two lists and combine them into one.
> With the proposed change we could pass the Merger as both the merger and aggregator to the .aggregate() method and keep our business logic within one merger class.
> Or in other words: The Merger is simply an Aggregator that happens to aggregate two objects of the same class
--
This message was sent by Atlassian Jira
(v8.3.4#803005)