You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Matthias J. Sax (JIRA)" <ji...@apache.org> on 2017/12/05 19:13:00 UTC

[jira] [Comment Edited] (KAFKA-6138) Simplify StreamsBuilder#addGlobalStore

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

Matthias J. Sax edited comment on KAFKA-6138 at 12/5/17 7:12 PM:
-----------------------------------------------------------------

At DSL level, you can access stores (of both types) via {{transform()}}, {{transformValues}}, and {{process()}}. If we don't have {{StreamsBuilder#addStateStore()}} and {{StreamsBuilder#addGlobalStore}}, uses would need get the underlying {[Topology}} via {{StreamsBuilder#builde()}} and add stores via corresponding {{Topology}} methods. This is quite unnatural. DSL users should not worry/think about the topology. Makes sense?

This was also discussed for KIP-120 -- the DISCUSS email thread archive is linked in the KIP wik page, if you want to check it out.


was (Author: mjsax):
At DSL level, you can access stores (of both types) via {{transform()}}, {{transformValues}}, and {{process()}}. If we don't have {{StreamsBuilder#addStateStore()}} and {{StreamsBuilder#addGlobalStore}}, uses would need get the underlying {[Topology}} via {{StreamsBuilder#builde()}} and add stores via corresponding {{Topology}} methods. This is quite unnatural. DSL users should not worry/think about the topology. Makes sense?

> Simplify StreamsBuilder#addGlobalStore
> --------------------------------------
>
>                 Key: KAFKA-6138
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6138
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 1.0.0
>            Reporter: Matthias J. Sax
>            Assignee: Panuwat Anawatmongkhon
>              Labels: beginner, needs-kip, newbie
>
> {{StreamsBuilder#addGlobalStore}} is conceptually a 1:1 copy of {{Topology#addGlobalStore}}, that would follow DSL design principles though. Atm, {{StreamsBuilder#addGlobalStore}} does not follow provide a good user experience as it forces users to specify names for processor names -- processor name are a Processor API detail should be hidden in the DSL. The current API is the following:
> {noformat}
>     public synchronized StreamsBuilder addGlobalStore(final StoreBuilder storeBuilder,
>                                                       final String topic,
>                                                       final String sourceName,
>                                                       final Consumed consumed,
>                                                       final String processorName,
>                                                       final ProcessorSupplier stateUpdateSupplier)
> {noformat}
> We should remove the two parameters {{sourceName}} and {{processorName}}. To be backward compatible, the current method must be deprecated and a new method should be added with reduced number of parameters. This is a public API change and thus requires a KIP. Details about the KIP process can be found in the wiki: https://cwiki.apache.org/confluence/display/KAFKA/Kafka+Improvement+Proposals



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)