Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      To support HDDS-1744 we need a way to override existing configuration defaults. For example given a main HttpConfiguration:

      
      public class OzoneHttpServerConfig {
      
        private int httpBindPort;
      
        @Config(key = "http-bind-port",
            defaultValue = "9874",
            description =
                "The actual port the web server will listen on for HTTP "
                    + "communication. If the "
                    + "port is 0 then the server will start on a free port.",
            tags = {ConfigTag.OM, ConfigTag.MANAGEMENT})
        public void setHttpBindPort(int httpBindPort) {
          this.httpBindPort = httpBindPort;
        }
      

      We need an option to extend  this class and override the default value:

        @ConfigGroup(prefix = "hdds.datanode")
        public static class HttpConfig extends OzoneHttpServerConfig {
      
          @Override
          @ConfigOverride(defaultValue = "9882")
          public void setHttpBindPort(int httpBindPort) {
            super.setHttpBindPort(httpBindPort);
          }
      
      
        }
      
      

      The expected behavior is a generated hdds.datanode.http-bind-port where the default is 9882.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              elek Marton Elek
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: