DaveTeng0 commented on code in PR #4708:
URL: https://github.com/apache/ozone/pull/4708#discussion_r1205880365
##########
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. yeah it's possible, it's better to check null here.
2. Hmm should be startsWith(). Since we might have valid key name like
'abc.snapshot/'..
--
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]