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

Attila Doroszlai updated HDDS-8091:
-----------------------------------
    Description: 
Configuration properties can be tagged as a way of grouping (HADOOP-15005).  
Tags can be used as a filter when browsing config on the web UI.

While any string can be used as tag, the web UI only supports a [specific set 
of 
tags|https://github.com/apache/ozone/blob/66f394b3b5a257f3ac659568e14de1cbd5e7b9fc/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/conf/HddsConfServlet.java#L159-L162],
 defined by 
[{{ozone.tags.system}}|https://github.com/apache/ozone/blob/66f394b3b5a257f3ac659568e14de1cbd5e7b9fc/hadoop-hdds/common/src/main/resources/ozone-default.xml#L1347-L1350].
  To hook into Hadoop config tagging, the same value needs to be set as 
[{{hadoop.tags.custom}}|https://github.com/apache/ozone/blob/66f394b3b5a257f3ac659568e14de1cbd5e7b9fc/hadoop-hdds/common/src/main/resources/ozone-default.xml#L1342-L1345].
  {{ozone-default.xml}} also [lists config tags in a header comment as a 
hint|https://github.com/apache/ozone/blob/66f394b3b5a257f3ac659568e14de1cbd5e7b9fc/hadoop-hdds/common/src/main/resources/ozone-default.xml#L23-L25].

Ozone also supports type-safe configuration annotated with {{@Config}}, which 
results in generated XML fragments.  The annotation supports tags defined in 
the enum 
[{{ConfigTag}}|https://github.com/apache/ozone/blob/66f394b3b5a257f3ac659568e14de1cbd5e7b9fc/hadoop-hdds/config/src/main/java/org/apache/hadoop/hdds/conf/ConfigTag.java#L20-L25].

All these result in [duplication and 
discrepancies|https://github.com/apache/ozone/pull/4332#pullrequestreview-1319578907]
 between the various lists of tags.

I propose to:

# use {{ConfigTag}} as the definitive source
# remove {{ozone.tags.system}} and {{hadoop.tags.custom}} from 
{{ozone-default.xml}}
# replace the header comment in {{ozone-default.xml}} with a reference to 
{{ConfigTag}}

  was:
Configuration properties can be tagged as a way of grouping (HADOOP-15005).  
Tags can be used as a filter when browsing config on the web UI.

While any string can be used as tag, the web UI only supports a [specific set 
of 
tags|https://github.com/apache/ozone/blob/66f394b3b5a257f3ac659568e14de1cbd5e7b9fc/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/conf/HddsConfServlet.java#L159-L162],
 defined by 
[{{ozone.tags.system}}|https://github.com/apache/ozone/blob/66f394b3b5a257f3ac659568e14de1cbd5e7b9fc/hadoop-hdds/common/src/main/resources/ozone-default.xml#L1347-L1350].
  To hook into Hadoop config tagging, the same value needs to be set as 
[{{hadoop.tags.custom}}|https://github.com/apache/ozone/blob/66f394b3b5a257f3ac659568e14de1cbd5e7b9fc/hadoop-hdds/common/src/main/resources/ozone-default.xml#L1342-L1345].
  {{ozone-default.xml}} also [lists config tags in a header comment as a 
hint|https://github.com/apache/ozone/blob/66f394b3b5a257f3ac659568e14de1cbd5e7b9fc/hadoop-hdds/common/src/main/resources/ozone-default.xml#L23-L25].

Ozone also supports type-safe configuration annotated with {{@Config}}, which 
results in generated XML fragments.  The annotation supports tags defined in 
the enum 
[{{ConfigTag}}|https://github.com/apache/ozone/blob/66f394b3b5a257f3ac659568e14de1cbd5e7b9fc/hadoop-hdds/config/src/main/java/org/apache/hadoop/hdds/conf/ConfigTag.java#L20-L25].

All these result in duplication and discrepancies between the various lists of 
tags.

I propose to:

# use {{ConfigTag}} as the definitive source
# remove {{ozone.tags.system}} and {{hadoop.tags.custom}} from 
{{ozone-default.xml}}
# replace the header comment in {{ozone-default.xml}} with a reference to 
{{ConfigTag}}


> Generate list of config tags from ConfigTag enum
> ------------------------------------------------
>
>                 Key: HDDS-8091
>                 URL: https://issues.apache.org/jira/browse/HDDS-8091
>             Project: Apache Ozone
>          Issue Type: Improvement
>            Reporter: Attila Doroszlai
>            Assignee: Attila Doroszlai
>            Priority: Major
>
> Configuration properties can be tagged as a way of grouping (HADOOP-15005).  
> Tags can be used as a filter when browsing config on the web UI.
> While any string can be used as tag, the web UI only supports a [specific set 
> of 
> tags|https://github.com/apache/ozone/blob/66f394b3b5a257f3ac659568e14de1cbd5e7b9fc/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/conf/HddsConfServlet.java#L159-L162],
>  defined by 
> [{{ozone.tags.system}}|https://github.com/apache/ozone/blob/66f394b3b5a257f3ac659568e14de1cbd5e7b9fc/hadoop-hdds/common/src/main/resources/ozone-default.xml#L1347-L1350].
>   To hook into Hadoop config tagging, the same value needs to be set as 
> [{{hadoop.tags.custom}}|https://github.com/apache/ozone/blob/66f394b3b5a257f3ac659568e14de1cbd5e7b9fc/hadoop-hdds/common/src/main/resources/ozone-default.xml#L1342-L1345].
>   {{ozone-default.xml}} also [lists config tags in a header comment as a 
> hint|https://github.com/apache/ozone/blob/66f394b3b5a257f3ac659568e14de1cbd5e7b9fc/hadoop-hdds/common/src/main/resources/ozone-default.xml#L23-L25].
> Ozone also supports type-safe configuration annotated with {{@Config}}, which 
> results in generated XML fragments.  The annotation supports tags defined in 
> the enum 
> [{{ConfigTag}}|https://github.com/apache/ozone/blob/66f394b3b5a257f3ac659568e14de1cbd5e7b9fc/hadoop-hdds/config/src/main/java/org/apache/hadoop/hdds/conf/ConfigTag.java#L20-L25].
> All these result in [duplication and 
> discrepancies|https://github.com/apache/ozone/pull/4332#pullrequestreview-1319578907]
>  between the various lists of tags.
> I propose to:
> # use {{ConfigTag}} as the definitive source
> # remove {{ozone.tags.system}} and {{hadoop.tags.custom}} from 
> {{ozone-default.xml}}
> # replace the header comment in {{ozone-default.xml}} with a reference to 
> {{ConfigTag}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to