You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Attila Doroszlai (Jira)" <ji...@apache.org> on 2022/05/12 10:50:00 UTC

[jira] [Updated] (HDDS-6739) Clean up MiniOzoneCluster config handling

     [ https://issues.apache.org/jira/browse/HDDS-6739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Attila Doroszlai updated HDDS-6739:
-----------------------------------
    Description: 
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}

  was: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.


> 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.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org