[
https://issues.apache.org/jira/browse/HDDS-1747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stephen O'Donnell reassigned HDDS-1747:
---------------------------------------
Assignee: (was: Stephen O'Donnell)
> Support override of configuration annotations
> ---------------------------------------------
>
> Key: HDDS-1747
> URL: https://issues.apache.org/jira/browse/HDDS-1747
> Project: Apache Ozone
> Issue Type: Sub-task
> Reporter: Marton Elek
> Priority: Major
>
> 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
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]