You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2021/02/18 13:53:22 UTC

[GitHub] [ignite-3] SammyVimes commented on a change in pull request #55: IGNITE-14194 Multiple storages support for configuration framework.

SammyVimes commented on a change in pull request #55:
URL: https://github.com/apache/ignite-3/pull/55#discussion_r578433427



##########
File path: modules/configuration/src/main/java/org/apache/ignite/configuration/internal/util/ConfigurationUtil.java
##########
@@ -133,6 +134,56 @@ else if (node == null)
         return node.accept(null, visitor);
     }
 
+    /**
+     * Converts raw map with dot-separated keys into a prefix map.
+     *
+     * @param rawConfig Original map.
+     * @return Prefix map.
+     * @see #split(String)
+     */
+    public static Map<String, ?> toPrefixMap(Map<String, Serializable> rawConfig) {
+        Map<String, Object> res = new HashMap<>();
+
+        for (Map.Entry<String, Serializable> entry : rawConfig.entrySet()) {
+            List<String> keys = split(entry.getKey());
+
+            assert keys instanceof RandomAccess : keys.getClass();
+
+            insert(res, keys, 0, entry.getValue());
+        }
+
+        return res;
+    }
+
+    /** */

Review comment:
       Missing javadoc




----------------------------------------------------------------
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:
users@infra.apache.org