-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-6683. Refactor OM server bucket layout configuration usage #3477
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
Conversation
rakeshadr
left a 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.
Error: org.apache.hadoop.ozone.om.TestOMStartupWithBucketLayout.testRestartWithFSOLayout Time elapsed: 11.725 s <<< FAILURE!
java.lang.AssertionError: expected:<FILE_SYSTEM_OPTIMIZED> but was:<LEGACY>
Error: org.apache.hadoop.ozone.om.TestObjectStoreWithFSO.testCreateBucketWithBucketLayout Time elapsed: 0.052 s <<< FAILURE!
java.lang.AssertionError: expected:<FILE_SYSTEM_OPTIMIZED> but was:<LEGACY>
TestDirectoryDeletingServiceWithFSO#test*
are failing because of the wrong default bucket layout values. Earlier LEGACY was replaced with OM.Server default. Now, with this patch an empty/null bucket layout (bucketInfo.hashasBucketLayout() == false) will use the OM.Server default bucket layout.
...e-manager/src/main/java/org/apache/hadoop/ozone/om/request/bucket/OMBucketCreateRequest.java
Outdated
Show resolved
Hide resolved
rakeshadr
left a 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.
+1 LGTM, thanks @tanvipenumudy for the contribution.
* master: (87 commits) HDDS-6686. Do Leadship check before SASL token verification. (apache#3382) HDDS-4364: [FSO]List FileStatus : startKey can be a non-existed path (apache#3481) HDDS-6091. Add file checksum to OmKeyInfo (apache#3201) HDDS-6706. Exposing Volume Information Metrics to the DataNode UI (apache#3478) HDDS-6759: Add listblock API in MockDatanodeStorage (apache#3452) HDDS-5821 Container cache management for closing RockDB (apache#3426) HDDS-6683. Refactor OM server bucket layout configuration usage (apache#3477) HDDS-6824. Revert changes made in proto.lock by HDDS-6768. (apache#3480) HDDS-6811. Bucket create message with layout type (apache#3479) HDDS-6810. Add a optional flag to trigger listStatus as part of listKeys for FSO buckets. (apache#3461) HDDS-6828. Revert RockDB version pending leak fixes (apache#3475) HDDS-6764: EC: DN ability to create RECOVERING containers for EC reconstruction. (apache#3458) HDDS-6795: EC: PipelineStateMap#addPipeline should not have precondition checks post db updates (apache#3453) HDDS-6823. Intermittent failure in TestOzoneECClient#testExcludeOnDNMixed (apache#3476) HDDS-6820. Bucket Layout Post-Finalization Validators for ACL Requests. (apache#3472) HDDS-6819. Add LEGACY to AllowedBucketLayouts in CreateBucketHandler (apache#3473) HDDS-4859. [FSO]ListKeys: seek all the files/dirs from startKey to keyPrefix (apache#3466) HDDS-6705 Add metrics for volume statistics including disk capacity, usage, Reserved (apache#3430) HDDS-6474. Add test to cover the FSO bucket list status with beyond batch boundary and cache. (apache#3379). Contributed by aswinshakil HDDS-6280. Support Container Balancer HA (apache#3423) ...
What changes were proposed in this pull request?
After the post finalization, user should be able to create LEGACY, FSO, OBS layouts.
The proposal is to modify the behavior on the server-side to only use the ozone.default.bucket.layout config if the client has not specified any bucket layout in the protobuf message.
If the client sends LEGACY bucket layout type then OM server will not override it with ozone.default.bucket.layout config value. This way a client has the flexibility to create a LEGACY bucket explicitly.
Hint: We can use the
bucketInfo.hasBucketLayout()Protobuf method to check if the field is set by the user.Reference: Discussion here
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-6683
How was this patch tested?
Added unit and integration tests.