oleg-ostanin commented on a change in pull request #7566: IGNITE-12832 Add user 
attributes support to control.sh
URL: https://github.com/apache/ignite/pull/7566#discussion_r399970203
 
 

 ##########
 File path: 
modules/core/src/main/java/org/apache/ignite/internal/commandline/CommonArgParser.java
 ##########
 @@ -336,4 +369,70 @@ private String securityWarningMessage(String password) {
 
         return String.format(pwdArgWarnFmt, password, password);
     }
+
+    /**
+     * Extracts user properties from property string or file.
+     *
+     * @param userPropStr {@code String} Property string.
+     * @param userPropPath {@code String} Property file path.
+     */
+    private Map<String, String> userProperties(String userPropStr, String 
userPropPath){
+        Map<String, String> res = parsePropertiesFromString(userPropStr);
+
+        parsePropertiesFromFile(userPropPath).forEach(res::putIfAbsent);
+
+        return res;
+    }
+
+    /**
+     * Extracts user properties from attribute string.
+     *
+     * @param propStr {@code String} Attribute string.
+     */
+    private Map<String, String> parsePropertiesFromString(String propStr) {
+        Map<String, String> res = new HashMap<>();
+
+        if(propStr == null)
 
 Review comment:
   fixed

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

Reply via email to