ableegoldman commented on code in PR #14648:
URL: https://github.com/apache/kafka/pull/14648#discussion_r1396493242


##########
streams/src/main/java/org/apache/kafka/streams/TopologyConfig.java:
##########
@@ -216,12 +232,38 @@ public TopologyConfig(final String topologyName, final 
StreamsConfig globalAppCo
         } else {
             storeType = globalAppConfigs.getString(DEFAULT_DSL_STORE_CONFIG);
         }
+
+        if (isTopologyOverride(DSL_STORE_SUPPLIERS_CLASS_CONFIG, 
topologyOverrides)) {
+            dslStoreSuppliers = getString(DSL_STORE_SUPPLIERS_CLASS_CONFIG);
+            log.info("Topology {} is overriding {} to {}", topologyName, 
DSL_STORE_SUPPLIERS_CLASS_CONFIG, dslStoreSuppliers);
+        } else {
+            dslStoreSuppliers = 
globalAppConfigs.getString(DSL_STORE_SUPPLIERS_CLASS_CONFIG);
+        }
     }
 
+    @Deprecated
     public Materialized.StoreType parseStoreType() {
         return MaterializedInternal.parse(storeType);
     }
 
+    /**
+     * @return the DslStoreSuppliers if the value was explicitly configured 
(either by
+     *         {@link StreamsConfig#DEFAULT_DSL_STORE} or {@link 
StreamsConfig#DSL_STORE_SUPPLIERS_CLASS_CONFIG})
+     */
+    public Optional<DslStoreSuppliers> resolveDslStoreSuppliers() {

Review Comment:
   Does this method even need to be in the `TopologyConfig` class? Seems like 
we should be able to do everything here from some static utility, in which case 
we don't need this.
   
   We definitely have a real problem with mixing up utility methods that are 
meant for internal use only with the by-definition public interface of the 
XXXConfig API. The Config classes just have some real fundamental abstractions 
issues. But we should try not to make the problem any worse at least, if we can 
help it.
   
   (In fact Matthias has a PR/draft KIP to clean up StreamsConfig: 
https://github.com/apache/kafka/pull/14548)



-- 
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-unsubscr...@kafka.apache.org

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

Reply via email to