You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support for Datanode to report the StorageType of container replicas to SCM
Subsequently, SCM will determine whether the container replica needs to be migrated based on the ContainerReplicaStorageType, and verify whether the storage policy for the key is satisfied.
It's not directly related to this PR: StorageTypeUtils.getStorageTypeProto throws an unchecked IllegalArgumentException for any org.apache.hadoop.fs.StorageType it doesn't map. With Hadoop 3.4.3 that enum includes NVDIMM, which StorageTypeProto doesn't cover, and StorageLocation.parse accepts an [NVDIMM]/... entry in hdds.datanode.dir with no Ozone-side filtering. So a datanode with such a volume would throw here on every buildContainerReplicaProto, breaking that DN's container report.
It's not directly related to this PR: StorageTypeUtils.getStorageTypeProto throws an unchecked IllegalArgumentException for any org.apache.hadoop.fs.StorageType it doesn't map. With Hadoop 3.4.3 that enum includes NVDIMM, which StorageTypeProto doesn't cover, and StorageLocation.parse accepts an [NVDIMM]/... entry in hdds.datanode.dir with no Ozone-side filtering. So a datanode with such a volume would throw here on every buildContainerReplicaProto, breaking that DN's container report.
Thank you for your feedback. This is a vulnerability that needs to be fixed.
I'm considering whether to use Hadoop's org.apache.hadoop.fs.StorageType in Ozone. Perhaps we should define a custom org.apache.ozone.fs.StorageType.
Currently, using org.apache.hadoop.fs.StorageType doesn't seem to offer any benefits. Hadoop's org.apache.hadoop.fs.FileSystem only uses StorageType in setQuotaByStorageType, and Ozone may not be compatible with this interface.
If we define a custom StorageType, we can set the enum content more flexibly.
By the way, have you guys tried using the Storage Policy feature internally yet?
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
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?
Support for Datanode to report the StorageType of container replicas to SCM
ContainerReplicaStorageType, and verify whether the storage policy for the key is satisfied.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15242
How was this patch tested?
New tests.