rmatharu commented on a change in pull request #1177: SAMZA-2339 : Update 
KafkaSystemAdmin to adhere to the checkpoint replication factor
URL: https://github.com/apache/samza/pull/1177#discussion_r331160950
 
 

 ##########
 File path: 
samza-kafka/src/main/java/org/apache/samza/system/kafka/KafkaSystemAdmin.java
 ##########
 @@ -540,6 +540,9 @@ public KafkaStreamSpec toKafkaSpec(StreamSpec spec) {
       kafkaSpec =
           new KafkaStreamSpec(spec.getId(), spec.getPhysicalName(), 
systemName, 1, coordinatorStreamReplicationFactor,
               coordinatorStreamProperties);
+    } else if (spec.isCheckpointStream()) {
+      kafkaSpec = 
KafkaStreamSpec.fromSpec(StreamSpec.createCheckpointStreamSpec(spec.getPhysicalName(),
 systemName))
+              .copyWithReplicationFactor(Integer.parseInt(new 
KafkaConfig(config).getCheckpointReplicationFactor().get()));
 
 Review comment:
   This makes sense, however, KafkaCheckpointManagerFactory already adheres to 
these configs when creating the spec. 
   Please see KafkaCheckpointManagerFactory Line 52-55
   
   ```val checkpointSpec = 
KafkaStreamSpec.fromSpec(StreamSpec.createCheckpointStreamSpec(checkpointTopic, 
checkpointSystemName))
           
.copyWithReplicationFactor(kafkaConfig.getCheckpointReplicationFactor.get.toInt)
           .copyWithProperties(kafkaConfig.getCheckpointTopicProperties)```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to