HDDS-15872. Ozone Bucket Support StoragePolicy and allowFallbackStoragePolicy. - #11192
Open
devmadhuu wants to merge 3 commits into
Open
HDDS-15872. Ozone Bucket Support StoragePolicy and allowFallbackStoragePolicy.#11192devmadhuu wants to merge 3 commits into
devmadhuu wants to merge 3 commits into
Conversation
…gePolicy. - Initial Commit.
devmadhuu
force-pushed
the
HDDS-15872
branch
from
September 2, 2026 14:08
807d6ef to
075ba59
Compare
devmadhuu
marked this pull request as ready for review
September 3, 2026 11:44
Contributor
Author
|
@xichen01 This patch is adaptation of patch diff 13 from the tar. Thanks for your contribution. Kindly review adaptation patch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
This PR is to add
storagePolicyandallowFallbackStoragePolicyas first-class bucket properties. The two fields flow end-to-end from the client into the OM bucket record, throughOmBucketInfo/OmBucketArgsserialization, and out again into recon and s3g stubs. The legacyhadoop.hdds.protocol.StorageTypewrapper enum is removed from the client-side bucket API surface, but thestorageTypewire field is retained (as deprecated) for backwardcompatibility with older peers — see below.
This is the client / OM-side data-model change only. There will be follow up PRs which will replace the current
OzoneStoragePolicy.getDefaultPolicy()hard-coded default inOMKeyRequest.allocateBlock.Protocol
hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto:BucketInfo: addedoptional hadoop.hdds.StoragePolicyProto storagePolicy = 24;andoptional bool allowFallbackStoragePolicy = 25;. The pre-existingstorageType = 5field is kept, marked[deprecated = true, default = DISK]and downgraded fromrequiredtooptionalfor wire compatibility (see next section).BucketArgs: addedoptional hadoop.hdds.StoragePolicyProto storagePolicy = 14;andoptional bool allowFallbackStoragePolicy = 15;. The pre-existingstorageType = 6is retained asoptional [deprecated = true].Both changes pass
proto-backwards-compatibility(protolock).Deleted
hadoop-ozone/common/src/main/java/org/apache/hadoop/hdds/protocol/StorageType.javais removed. The Datanode-facinghadoop.hdds.protocol.proto.HddsProtos.StorageTypeProtoenum is untouched and continues to describe DN volume types.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15872
How was this patch tested?
~30 tests updated for the new bucket surface. Representative changes:
OMRequestTestUtils.newBucketInfoBuilderno longer setsstorageTypeonthe proto (the field is
reserved).TestOmBucketInfo,TestBucketManagerImpl,TestOMBucketCreateRequest,TestOMBucketCreateRequestWithFSO,TestOMClientRequestWithUserInfo,TestOzoneManagerHAWithAllRunning,OzoneRpcClientTests,TestEndpoints(recon) migrated from
StorageType.X/getStorageType()toOzoneStoragePolicy.Y/getStoragePolicy().AbstractTreeNSSummaryScenarioandFlatNSSummaryScenariodropthe
storageTypeassertion (no storage-policy equivalent was set inthose scenarios).