hemantk-12 commented on code in PR #4708:
URL: https://github.com/apache/ozone/pull/4708#discussion_r1204562215


##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OmUtils.java:
##########
@@ -612,6 +612,21 @@ public static void validateKeyName(String keyName)
     }
   }
 
+  /**
+   * Verify if key name contains invalid snapshot reserved word or not.

Review Comment:
   nit:
   ```suggestion
      * Verify if key name contains snapshot reserved word.
   ```



##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OmUtils.java:
##########
@@ -612,6 +612,21 @@ public static void validateKeyName(String keyName)
     }
   }
 
+  /**
+   * Verify if key name contains invalid snapshot reserved word or not.
+   * This verification will run even when
+   * ozone.om.keyname.character.check.enabled sets to false
+   */
+  public static void verifyKeyNameWithSnapshotReservedWord(String keyName)
+          throws OMException {
+    if (keyName.startsWith(OM_SNAPSHOT_INDICATOR + OM_KEY_PREFIX)) {

Review Comment:
   1. Can `keyName` be null? 
   2. Should it be `String.contains()` or `String.startsWith()`?



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