DaveTeng0 commented on code in PR #4524:
URL: https://github.com/apache/ozone/pull/4524#discussion_r1159195766


##########
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/client/HddsClientUtils.java:
##########
@@ -127,17 +127,25 @@ private static void doNameChecks(String resName) {
     }
   }
 
-  private static boolean isSupportedCharacter(char c) {
-    return (c == '.' || c == '-' ||
-        Character.isLowerCase(c) || Character.isDigit(c));
+  private static boolean isSupportedCharacter(char c, boolean 
isNamespaceS3RuleCompliant) {
+    if (isNamespaceS3RuleCompliant) {
+      return (c == '.' || c == '-' ||
+              Character.isLowerCase(c) || Character.isDigit(c));
+    } else {
+      // allow ozone namespace to follow other volume/bucket naming convention,
+      // for example, here adds 'underscore',
+      // which is a valid character in POSIX-compliant system, like HDFS.
+      return (c == '.' || c == '-' || c == '_' ||
+              Character.isLowerCase(c) || Character.isDigit(c));
+    }

Review Comment:
   Yup updated thanks attila!



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to