You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Huynh Quang Thao (Jira)" <ji...@apache.org> on 2020/10/16 05:30:00 UTC

[jira] [Issue Comment Deleted] (KAFKA-10472) Consider migrating Topology methods to the Builder pattern

     [ https://issues.apache.org/jira/browse/KAFKA-10472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Huynh Quang Thao updated KAFKA-10472:
-------------------------------------
    Comment: was deleted

(was: If Wiki you mentioned is Confluence, then yes, I have already created one. My email is "huynhquangthao@gmail.com" and the account name is "hqt".)

> Consider migrating Topology methods to the Builder pattern
> ----------------------------------------------------------
>
>                 Key: KAFKA-10472
>                 URL: https://issues.apache.org/jira/browse/KAFKA-10472
>             Project: Kafka
>          Issue Type: Improvement
>          Components: streams
>            Reporter: John Roesler
>            Assignee: Huynh Quang Thao
>            Priority: Minor
>              Labels: need-kip
>
> During code review for KIP-478, I got this feedback from [~bbejeck] .
> In Topology, we have methods like this:
> {code:java}
> public synchronized <KIn, VIn> Topology addGlobalStore(
>   final StoreBuilder<?> storeBuilder,
>   final String sourceName,
>   final TimestampExtractor timestampExtractor,
>   final Deserializer<KIn> keyDeserializer,
>   final Deserializer<VIn> valueDeserializer,
>   final String topic,
>   final String processorName,
>   final ProcessorSupplier<KIn, VIn, Void, Void> stateUpdateSupplier){code}
> It would probably be better UX to preset a builder interface like:
> {code:java}
> public synchronized <KIn, VIn> Topology addGlobalStore(
>   AddGlobalStoreParameters.fromStoreBuilder(storeBuiler)
>                           .withSourceName(sourceName)
>                           .withSourceTopic(topic)
>                           .withTimestampExtractor(timestampExtractor)
>                           .withKeyDeserializer(keyDeserializer)
>                           .withValueDeserializer(valueDeserializer)
>                           .withProcessorName(processorName)
>                           .withStateUpdateSupplier(stateUpdateSupplier)
> ){code}
>  
> Note: new API design proposals should take into account the proposed grammar: https://cwiki.apache.org/confluence/display/KAFKA/Kafka+Streams+DSL+Grammar



--
This message was sent by Atlassian Jira
(v8.3.4#803005)