Elek, Marton created HDDS-1747:
----------------------------------

             Summary: Support override of configuration annotations
                 Key: HDDS-1747
                 URL: https://issues.apache.org/jira/browse/HDDS-1747
             Project: Hadoop Distributed Data Store
          Issue Type: Sub-task
            Reporter: Elek, Marton
            Assignee: Stephen O'Donnell


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

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;
  }
{code}
We need an option to extend  this class and override the default value:
{code:java}
  @ConfigGroup(prefix = "hdds.datanode")
  public static class HttpConfig extends OzoneHttpServerConfig {

    @Override
    @ConfigOverride(defaultValue = "9882")
    public void setHttpBindPort(int httpBindPort) {
      super.setHttpBindPort(httpBindPort);
    }


  }

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



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org

Reply via email to