prateekm commented on a change in pull request #1251: SAMZA-2431: Fix the
checkpoint and changelog topic auto-creation.
URL: https://github.com/apache/samza/pull/1251#discussion_r366498670
##########
File path: samza-kafka/src/main/scala/org/apache/samza/config/KafkaConfig.scala
##########
@@ -316,16 +316,18 @@ class KafkaConfig(config: Config) extends
ScalaMapConfig(config) {
val filteredConfigs =
config.subset(KafkaConfig.CHANGELOG_STREAM_KAFKA_SETTINGS format name, true)
val kafkaChangeLogProperties = new Properties
- val appConfig = new ApplicationConfig(config)
// SAMZA-1600: do not use the combination of "compact,delete" as cleanup
policy until we pick up Kafka broker 0.11.0.57,
// 1.0.2, or 1.1.0 (see KAFKA-6568)
// Adjust changelog topic setting, when TTL is set on a RocksDB store
// - Disable log compaction on Kafka changelog topic
// - Set topic TTL to be the same as RocksDB TTL
- Option(config.get("stores.%s.rocksdb.ttl.ms" format name)) match {
+ val storeTTLkey = "stores.%s.rocksdb.ttl.ms" format name
+ Option(config.get(storeTTLkey)) match {
case Some(rocksDbTtl) =>
- if (!config.containsKey("stores.%s.changelog.kafka.cleanup.policy"
format name)) {
+ if (config.getInt(storeTTLkey, 0) < 0) {
+ kafkaChangeLogProperties.setProperty("cleanup.policy", "compact")
+ } else if
(!config.containsKey("stores.%s.changelog.kafka.cleanup.policy" format name)) {
Review comment:
Do you need this containsKey check in the new condition as well?
----------------------------------------------------------------
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