chungen0126 commented on code in PR #9457:
URL: https://github.com/apache/ozone/pull/9457#discussion_r2701948658
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/tagging/S3PutObjectTaggingRequest.java:
##########
@@ -56,6 +58,59 @@ public class S3PutObjectTaggingRequest extends OMKeyRequest {
private static final Logger LOG =
LoggerFactory.getLogger(S3PutObjectTaggingRequest.class);
+ // NOTE: These limits must be kept in sync with
+ // org.apache.hadoop.ozone.s3.util.S3Consts (S3 Gateway side),
+ // but OM cannot depend on s3gateway, so we define them here as well.
+ private static final int TAG_NUM_LIMIT = 10;
+ private static final int TAG_KEY_LENGTH_LIMIT = 128;
+ private static final int TAG_VALUE_LENGTH_LIMIT = 256;
+ private static final String AWS_TAG_PREFIX = "aws:";
+ private static final Pattern TAG_REGEX_PATTERN =
+ Pattern.compile("^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-]*)$");
+
+ private static void validateTags(Map<String, String> tags) throws
OMException {
Review Comment:
Could you please explain why we need this here?
--
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]