You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by GitBox <gi...@apache.org> on 2019/10/03 17:30:02 UTC

[GitHub] [samza] rmatharu commented on a change in pull request #1177: SAMZA-2339 : Update KafkaSystemAdmin to adhere to the checkpoint replication factor

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:
users@infra.apache.org


With regards,
Apache Git Services