HDDS-13569. Separate OM and SCM metadata dirs in MiniOzoneClusterImpl#8937
Merged
Conversation
…gnore the extra configs in that case.
Contributor
There was a problem hiding this comment.
Pull Request Overview
Separates OM and SCM metadata directories in MiniOzoneClusterImpl to improve directory organization and enable easier disk usage calculations. Currently both components store metadata under a shared "ozone-meta" directory, making it difficult to track OM-specific metadata usage.
- Creates separate directory structures for OM and SCM components with dedicated subdirectories
- Updates configuration to use component-specific paths for database, Ratis, and web server directories
- Modifies test code to use the new OM-specific configuration key for metadata directory access
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| UniformDatanodesFactory.java | Updates datanode metadata directory path to use "ozone-metadata" subdirectory |
| MiniOzoneHAClusterImpl.java | Passes HA flag to SCM configuration method |
| MiniOzoneClusterImpl.java | Implements separate directory structures and configuration for OM/SCM components |
| MiniOzoneCluster.java | Adds configuration cleanup to prevent conflicts between cluster builds |
| TestOMSnapshotDAG.java | Updates test to use OM-specific configuration key instead of generic metadata dirs |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
jojochuang
approved these changes
Aug 15, 2025
Contributor
|
Merged. Thanks @smengcl |
Contributor
Author
|
Thanks @jojochuang for the review. |
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?
Currently
MiniOzoneClusterImpl(non-HA) mixes OM and SCM metadata dirs all underozone-meta. e.g. under./hadoop-ozone/integration-test/target/test-dir/MiniOzoneClusterImpl-53868f3f-ffb9-495f-96ab-da3f551b9f06/. └── ozone-meta ├── datanode-1 │ ├── data-0 │ │ └── hdds │ │ └── 53868f3f-ffb9-495f-96ab-da3f551b9f06 │ │ ├── current │ │ │ └── containerDir0 │ │ │ ├── 1 │ │ │ │ ├── chunks │ │ │ │ └── metadata │ │ │ ├── 2 │ │ │ │ ├── chunks │ │ │ │ └── metadata │ │ ├── DS-974ed241-60c2-416c-aff0-4074acd5165f │ │ │ ├── container.db │ │ │ ├── db.checkpoints │ │ │ └── db.snapshots │ │ │ └── checkpointState │ │ └── tmp │ │ ├── deleted-containers │ │ └── disk-check │ ├── meta │ │ ├── db.checkpoints │ │ ├── db.snapshots │ │ │ └── checkpointState │ │ ├── dnlayoutversion │ │ ├── webserver │ │ └── witnessed_container.db │ └── ratis │ ├── 15d8f352-a9ca-474c-afe5-6a154bb0694f │ │ ├── current │ │ └── sm │ ├── 82cd09bf-ad27-44c0-b979-5625bf6ad9f4 │ │ ├── current │ │ └── sm │ ├── ac9d6dfc-16c0-4796-95a1-7b50c331b1e2 │ │ ├── current │ │ └── sm │ └── tmp │ └── disk-check ├── datanode-2 ... ├── datanode-3 ... ├── db.checkpoints ├── db.snapdiff ├── db.snapshots │ ├── checkpointState │ └── diffState │ ├── compaction-log │ ├── compaction-sst-backup │ └── snapDiff ├── om │ └── current ├── om.db │ └── archive ├── ratis │ └── bf265839-605b-3f16-9796-c5ba1605619e │ ├── current │ └── sm ├── scm │ └── current ├── scm-ha │ └── 53868f3f-ffb9-495f-96ab-da3f551b9f06 │ ├── current │ └── sm ├── scm.db │ └── archive ├── snapshot └── webserverThis makes it hard to calculate OM metadata disk usage.
Also, some dirs are incorrectly shared among OM and SCM, such as
snapshotandwebserver.The goal is to separate those dirs for OM and SCM like we would do in prod.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-13569
How was this patch tested?
. ├── om │ ├── data │ │ ├── db.checkpoints │ │ ├── db.snapshots │ │ │ ├── checkpointState │ │ │ │ ├── om.db-1bcfd4d3-6c44-4f16-b0ea-c5035fcdeead │ │ │ │ └── om.db-6dc5ca52-0471-4c84-94b4-39ee9a90bc9b │ │ │ └── diffState │ │ │ ├── compaction-log │ │ │ ├── compaction-sst-backup │ │ │ └── snapDiff │ │ ├── om │ │ │ └── current │ │ └── om.db │ │ └── archive │ ├── ozone-metadata │ │ ├── db.snapdiff │ │ ├── snapshot │ │ └── webserver │ └── ratis │ └── bf265839-605b-3f16-9796-c5ba1605619e │ ├── current │ └── sm ├── ozone-metadata │ ├── datanode-1 │ │ ├── data-0 │ │ │ └── hdds │ │ │ └── fa2ba8de-2651-4ed0-9e02-6c9bc16258a4 │ │ │ ├── current │ │ │ │ └── containerDir0 │ │ │ │ ├── 1 │ │ │ │ │ ├── chunks │ │ │ │ │ └── metadata │ │ │ │ ├── 2 │ │ │ │ │ ├── chunks │ │ │ │ │ └── metadata ... │ │ │ ├── DS-8aaa133f-56c4-414b-a5e4-6941bf65028e │ │ │ │ ├── container.db │ │ │ │ ├── db.checkpoints │ │ │ │ └── db.snapshots │ │ │ │ └── checkpointState │ │ │ └── tmp │ │ │ ├── deleted-containers │ │ │ └── disk-check │ │ ├── meta │ │ │ ├── db.checkpoints │ │ │ ├── db.snapshots │ │ │ │ └── checkpointState │ │ │ ├── dnlayoutversion │ │ │ └── witnessed_container.db │ │ └── ratis │ │ ├── 66b1eb71-d37d-438b-afa4-2ca5646ab092 │ │ │ ├── current │ │ │ └── sm │ │ ├── aef89295-7190-49f2-a483-f3a8dcc3b457 │ │ │ ├── current │ │ │ └── sm │ │ ├── c219a99e-5f88-4537-8bf5-41e07a246622 │ │ │ ├── current │ │ │ └── sm │ │ └── tmp │ │ └── disk-check │ ├── datanode-2 ... │ └── datanode-3 ... └── scm ├── data │ ├── db.checkpoints │ ├── db.snapshots │ │ └── checkpointState │ ├── scm │ │ └── current │ └── scm.db │ └── archive ├── ozone-metadata │ ├── snapshot │ └── webserver └── ratis └── fa2ba8de-2651-4ed0-9e02-6c9bc16258a4 ├── current └── sm