You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "Rayman (Jira)" <ji...@apache.org> on 2019/10/08 18:00:00 UTC

[jira] [Created] (SAMZA-2342) Replication-factor logic in toKafkaSpec() of KafkaSystemAdmin

Rayman created SAMZA-2342:
-----------------------------

             Summary: Replication-factor logic in toKafkaSpec() of KafkaSystemAdmin
                 Key: SAMZA-2342
                 URL: https://issues.apache.org/jira/browse/SAMZA-2342
             Project: Samza
          Issue Type: Bug
            Reporter: Rayman


A KafkaStreamSpec carries replication-factor.
A Stream does not.

In 

public KafkaStreamSpec toKafkaSpec(StreamSpec spec) {
}

we check discard any incoming replication-factor that comes with the StreamSpec, instead use stream-IDs to convert it into a KafkaStreamSpec, even when the StreamSpec passed is already a KafkaStreamSpec.
Moreover, for streams with not a well-known stream-id, we slap-on a default replication-factor when converting it to a KafkaStreamSpec, and then try to figure out the RF using the system-stream-etc hierarchy.


This code can and should be simplified to 
a. if streamSpec is KafkaStreamSpec, respect its replication-factor, 

b. if it is not, then use defined hierarchy of system-default-RF, or 

KafkaConfig.topic-default-rf.



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