Skip to content

Conversation

@DaveTeng0
Copy link
Contributor

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.

@DaveTeng0
Copy link
Contributor Author

cc. kerneltime, adoroszlai

@DaveTeng0
Copy link
Contributor Author

cc @umamaheswararao

this.replicationConfig = ReplicationConfig.fromTypeAndFactor(type,
ReplicationFactor.valueOf(replicationFactor));
this(volumeName, bucketName, keyName, size, creationTime, modificationTime,
ReplicationConfig.fromTypeAndFactor(type,
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor

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), ...)

Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants