You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "sadanand48 (via GitHub)" <gi...@apache.org> on 2024/02/14 13:34:13 UTC
[PR] HDDS-10369. Set Times API doesn't work with linked buckets. [ozone]
sadanand48 opened a new pull request, #6220:
URL: https://github.com/apache/ozone/pull/6220
## What changes were proposed in this pull request?
Set Times API doesn't work with linked buckets, This PR fixes this by adding resolution for the linked bucket.
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-10369
## How was this patch tested?
Unit test
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-10369. Set Times API doesn't work with linked buckets. [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on code in PR #6220:
URL: https://github.com/apache/ozone/pull/6220#discussion_r1489840579
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeySetTimesRequest.java:
##########
@@ -63,9 +64,10 @@ public OMRequest preExecute(OzoneManager ozoneManager) throws IOException {
OMRequest request = super.preExecute(ozoneManager);
SetTimesRequest setTimesRequest = request.getSetTimesRequest();
String keyPath = setTimesRequest.getKeyArgs().getKeyName();
+ OmBucketInfo bucketInfo = ozoneManager.getBucketInfo(volumeName, bucketName);
String normalizedKeyPath =
validateAndNormalizeKey(ozoneManager.getEnableFileSystemPaths(),
- keyPath, getBucketLayout());
+ keyPath, bucketInfo.getBucketLayout());
Review Comment:
What is the reason for this part of the change?
The original `getBucketLayout()` returns the layout of the actual bucket (following any links), and is initialized already, so usage does not need extra lookup.
I ran all subclasses of `AbstractRootedOzoneFileSystemTest`, both layouts were the same in all cases (`getBucketLayout()` and `bucketInfo.getBucketLayout()`). So we I don't think we need the extra `getBucketInfo()` lookup.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-10369. Set Times API doesn't work with linked buckets. [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #6220:
URL: https://github.com/apache/ozone/pull/6220#issuecomment-1945818644
Thanks @sadanand48 for updating the patch.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-10369. Set Times API doesn't work with linked buckets. [ozone]
Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai merged PR #6220:
URL: https://github.com/apache/ozone/pull/6220
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
Re: [PR] HDDS-10369. Set Times API doesn't work with linked buckets. [ozone]
Posted by "sadanand48 (via GitHub)" <gi...@apache.org>.
sadanand48 commented on code in PR #6220:
URL: https://github.com/apache/ozone/pull/6220#discussion_r1490440541
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/key/OMKeySetTimesRequest.java:
##########
@@ -63,9 +64,10 @@ public OMRequest preExecute(OzoneManager ozoneManager) throws IOException {
OMRequest request = super.preExecute(ozoneManager);
SetTimesRequest setTimesRequest = request.getSetTimesRequest();
String keyPath = setTimesRequest.getKeyArgs().getKeyName();
+ OmBucketInfo bucketInfo = ozoneManager.getBucketInfo(volumeName, bucketName);
String normalizedKeyPath =
validateAndNormalizeKey(ozoneManager.getEnableFileSystemPaths(),
- keyPath, getBucketLayout());
+ keyPath, bucketInfo.getBucketLayout());
Review Comment:
Right BucketLayoutAwareOMKeyRequestFactory#createRequest gets the actual bucket layout and passes to the request constructor, This is not needed. will remove.
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org