-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDDS-6440. Handle custom metadata (x-amz-meta) during put-object through S3 API. #3728
Conversation
…nt/OzoneKey.java Co-authored-by: Doroszlai, Attila <6454655+adoroszlai@users.noreply.github.com>
…e into HDDS-6440-master
cc. kerneltime, adoroszlai |
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/EndpointBase.java
Outdated
Show resolved
Hide resolved
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java
Show resolved
Hide resolved
hadoop-ozone/client/src/main/java/org/apache/hadoop/ozone/client/OzoneKey.java
Outdated
Show resolved
Hide resolved
…s key filtering logic;create s3 request metadata size limit constant
hadoop-hdds/common/src/main/java/org/apache/hadoop/ozone/OzoneConsts.java
Outdated
Show resolved
Hide resolved
…nd gdpr enabled tag
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/EndpointBase.java
Show resolved
Hide resolved
this.replicationConfig = ReplicationConfig.fromTypeAndFactor(type, | ||
ReplicationFactor.valueOf(replicationFactor)); | ||
this(volumeName, bucketName, keyName, size, creationTime, modificationTime, | ||
ReplicationConfig.fromTypeAndFactor(type, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting the instance this(creationTime, modificationTime )
can remain initialized with Instant.ofEpochMilli(creationTime)
and Instant.ofEpochMilli(modificationTime)
respectively.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@neils-dev can you please explain, I am not sure I understood your comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure @kerneltime, the intialization for the creationTime, modification can retain its previous initialization prior to the change:
previous:
this.creationTime = Instant.ofEpochMilli(creationTime);
this.modificationTime = Instant.ofEpochMilli(modificationTime);
now:
line 73,
this(volumeName, bucketName, keyName, size,
Instant.ofEpochMilli(creationTime), Instant.ofEpochMilli(modificationTime), ...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The constructor called internally does the same, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes!
What changes were proposed in this pull request?
Handle user defined metadata supplied through the s3 interface.
Reference - https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingObjects.html
(This PR is a fork from #3200, with updates from latest master branch and resolve conflicts if there is any.)
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-6440
How was this patch tested?
Manually tested put, head and copy object.
Added acceptance tests.