zhuzhurk commented on code in PR #23852:
URL: https://github.com/apache/flink/pull/23852#discussion_r1448706412


##########
flink-core/src/main/java/org/apache/flink/configuration/GlobalConfiguration.java:
##########
@@ -241,6 +265,95 @@ private static Configuration loadYAMLResource(File file) {
         return config;
     }
 
+    /**
+     * Flattens a nested configuration map to be only one level deep.
+     *
+     * <p>Nested keys are concatinated using the {@code KEY_SEPARATOR} 
character. So that:
+     *
+     * <pre>
+     * keyA:
+     *   keyB:
+     *     keyC: "hello"
+     *     keyD: "world"
+     * </pre>
+     *
+     * <p>becomes:
+     *
+     * <pre>
+     * keyA.keyB.keyC: "hello"
+     * keyA.keyB.keyD: "world"
+     * </pre>
+     *
+     * @param config an arbitrarily nested config map
+     * @param keyPrefix The string to prefix the keys in the current config 
level
+     * @return A flattened, 1 level deep map
+     */
+    @SuppressWarnings("unchecked")
+    private static Map<String, Object> flatten(
+            @Nonnull Map<String, Object> config, String keyPrefix) {

Review Comment:
   Flink parameters are by default non-null. Only nullable ones should be 
explicitly annotated with `@Nullable`.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to