Skip to content
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

HDDS-10320. Introduce factory to configure MiniOzoneCluster's datanodes #6246

Merged
merged 1 commit into from
Feb 23, 2024

Conversation

adoroszlai
Copy link
Contributor

What changes were proposed in this pull request?

Currently MiniOzoneCluster creates almost identical datanodes, based on global config and few datanode-specific properties:

  • numDataVolumes
  • datanodeReservedSpace
  • dnLayoutVersion

This change introduces a factory to create datanodes for MiniOzoneCluster, further cleaning up the global MiniOzoneCluster.Builder interface.

Other implementations can be added in the future to customize each datanode (e.g. different number of volumes, different amount of reserved space, etc.).

https://issues.apache.org/jira/browse/HDDS-10320

How was this patch tested?

CI:
https://github.com/adoroszlai/ozone/actions/runs/7979189177

@adoroszlai adoroszlai self-assigned this Feb 21, 2024
@adoroszlai adoroszlai changed the title HDDS-10320. Allow configuring MiniOzoneCluster's datanodes separately HDDS-10320. Introduce factory to configure MiniOzoneCluster's datanodes Feb 21, 2024
Copy link
Contributor

@errose28 errose28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the improvement @adoroszlai LGTM. Just a question: in the future how would we implement a factory or factories to make a cluster with different datanode configurations?

@adoroszlai
Copy link
Contributor Author

in the future how would we implement a factory or factories to make a cluster with different datanode configurations?

By refactoring the current implementation as needed: extracting methods to be overridden, etc.

The factory interface can also be implemented from scratch. We will need to expose parts of the current implementation for reuse.

@adoroszlai adoroszlai merged commit 83cb2b7 into apache:master Feb 23, 2024
27 checks passed
@adoroszlai adoroszlai deleted the HDDS-10320 branch February 23, 2024 08:48
@adoroszlai
Copy link
Contributor Author

Thanks @errose28 for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants