You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2022/03/15 06:22:52 UTC

[GitHub] [kafka] showuon commented on a change in pull request #11705: KAFKA-9847: add config to set default store type (KIP-591)

showuon commented on a change in pull request #11705:
URL: https://github.com/apache/kafka/pull/11705#discussion_r826615748



##########
File path: streams/src/main/java/org/apache/kafka/streams/TopologyConfig.java
##########
@@ -153,6 +166,17 @@ public TopologyConfig(final String topologyName, final StreamsConfig globalAppCo
         } else {
             deserializationExceptionHandlerSupplier = () -> globalAppConfigs.getConfiguredInstance(DEFAULT_DESERIALIZATION_EXCEPTION_HANDLER_CLASS_CONFIG, DeserializationExceptionHandler.class);
         }
+
+        // Override the default store type config no matter it's a named topology or not since it should apply to all topologies
+        storeType = getString(DEFAULT_DSL_STORE_CONFIG);
+        log.info("Topology {} is overriding {} to {}", topologyName, DEFAULT_DSL_STORE_CONFIG, storeType);
+    }
+
+    public Materialized.StoreType parseStoreType() {
+        if (storeType.equals(IN_MEMORY)) {

Review comment:
       @lihaosky , thanks for your comment. `storeType` is retrieved from stream config, where we can't accept enum. Currently, we only accept `rocksDB` or `in_memory`. If there's a typo, the config will throw exception, like we only accept `delete` and `compact` in `log.cleanup.policy`, and will throw exception if the provided value is other values.




-- 
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.

To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org