oleg-ostanin commented on a change in pull request #7566: Ignite 12832 URL: https://github.com/apache/ignite/pull/7566#discussion_r397727879
########## File path: modules/core/src/main/java/org/apache/ignite/internal/commandline/CommonArgParser.java ########## @@ -336,4 +374,52 @@ private String securityWarningMessage(String password) { return String.format(pwdArgWarnFmt, password, password); } + + /** + * Extracts user attributes from attribute string. + * + * @param attrMap {@code Map} Attribute map. + * @param attrs {@code String} Attribute string. + */ + private void extractAttributesFromString(Map<String, String> attrMap, String attrs) { + final int partsOfAttrStr = 2; + + for (String attr : attrs.split(",")) { + if (!attr.contains("=")) { + logger.warning(String.format("Failed to parse attribute %s", attr)); + + continue; + } + + String[] keyVal = attr.split("=", partsOfAttrStr); + + if (!attrMap.containsKey(keyVal[0])) + attrMap.put(keyVal[0], keyVal[1]); + } + } + + /** + * Extracts user attributes from a given file. + * + * @param attrMap {@code Map} Attribute map. + * @param path {@code String} Path to the file. + */ + private void extractAttributesFromFile(Map<String, String> attrMap, String path) { Review comment: done ---------------------------------------------------------------- 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