Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-6739

Clean up MiniOzoneCluster config handling

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Implemented
    • None
    • 1.5.0
    • test
    • None

    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:

          /**
           * 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;
          }
      

      and its usage:

            // MiniOzoneCluster should have global pipeline upper limit.
            conf.setInt(ScmConfigKeys.OZONE_SCM_RATIS_PIPELINE_LIMIT,
                pipelineNumLimit >= DEFAULT_PIPELINE_LIMIT ?
                    pipelineNumLimit : DEFAULT_PIPELINE_LIMIT);
      

      Attachments

        Issue Links

          Activity

            People

              adoroszlai Attila Doroszlai
              adoroszlai Attila Doroszlai
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: