[
https://issues.apache.org/jira/browse/HDDS-6739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Attila Doroszlai updated HDDS-6739:
-----------------------------------
Target Version/s: (was: 1.4.0)
> Clean up MiniOzoneCluster config handling
> -----------------------------------------
>
> Key: HDDS-6739
> URL: https://issues.apache.org/jira/browse/HDDS-6739
> Project: Apache Ozone
> Issue Type: Improvement
> Components: test
> Reporter: Attila Doroszlai
> Priority: Major
>
> MiniOzoneCluster builders have several methods to set various config
> properties. Some are complex and interrelated, others are just for
> convenience. We should not clutter it with setter method for each config
> property. We can set defaults for integration tests in
> {{hadoop-ozone/integration-test/src/test/resources/ozone-site.xml}} and
> override in specific tests where necessary. The goal of this task is to
> remove all trivial config setting methods.
> Example:
> {code:title=https://github.com/apache/ozone/blob/5459b49538f16256a4e0f7d3c7f2981d0d7a9fae/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneCluster.java#L458-L466}
> /**
> * Sets the total number of pipelines to create.
> * @param val number of pipelines
> * @return MiniOzoneCluster.Builder
> */
> public Builder setTotalPipelineNumLimit(int val) {
> pipelineNumLimit = val;
> return this;
> }
> {code}
> and its usage:
> {code:title=https://github.com/apache/ozone/blob/5459b49538f16256a4e0f7d3c7f2981d0d7a9fae/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/MiniOzoneClusterImpl.java#L686-L689}
> // MiniOzoneCluster should have global pipeline upper limit.
> conf.setInt(ScmConfigKeys.OZONE_SCM_RATIS_PIPELINE_LIMIT,
> pipelineNumLimit >= DEFAULT_PIPELINE_LIMIT ?
> pipelineNumLimit : DEFAULT_PIPELINE_LIMIT);
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]