AHeise commented on a change in pull request #11725: [FLINK-15670][API] Provide a Kafka Source/Sink pair as KafkaShuffle URL: https://github.com/apache/flink/pull/11725#discussion_r410296442
########## File path: flink-core/src/main/java/org/apache/flink/util/PropertiesUtil.java ########## @@ -108,6 +109,27 @@ public static boolean getBoolean(Properties config, String key, boolean defaultV } } + /** + * Flatten a recursive {@link Properties} to a first level property map. + * In some cases, {KafkaProducer#propsToMap} for example, Properties is used purely as a HashMap + * without considering its default properties. + * + * @param config Properties to be flatten + * @return Properties without defaults; all properties are put in the first-level + */ + public static Properties flatten(Properties config) { Review comment: On a second thought, wouldn't it make more sense to provide a correct `propsToMap` implementation? If it's only used in KafkaProducer, then we could fix it there. If not, I'd consider that function more useful than this `flatten`. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services