[
https://issues.apache.org/jira/browse/HDDS-12303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Attila Doroszlai reassigned HDDS-12303:
---------------------------------------
Assignee: Roland Elek (was: Attila Doroszlai)
> Move ozone.om.user.max.volume into OmConfig
> -------------------------------------------
>
> Key: HDDS-12303
> URL: https://issues.apache.org/jira/browse/HDDS-12303
> Project: Apache Ozone
> Issue Type: Sub-task
> Components: Ozone Manager
> Reporter: Attila Doroszlai
> Assignee: Roland Elek
> Priority: Major
>
> The goal of this task is to move the config key {{ozone.om.user.max.volume}}
> from {{OMConfigKeys}} and {{ozone-default.xml}} into
> {{hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/OmConfig.java}}.
> {code:title=https://github.com/apache/ozone/blob/b769a2648177645a3dc9486de2250104ab63831f/hadoop-hdds/common/src/main/resources/ozone-default.xml#L653-L664}
> <property>
> <name>ozone.om.user.max.volume</name>
> <value>1024</value>
> <tag>OM, MANAGEMENT</tag>
> <description>
> The maximum number of volumes a user can have on a cluster.Increasing or
> decreasing this number has no real impact on ozone cluster. This is
> defined only for operational purposes. Only an administrator can create
> a
> volume, once a volume is created there are no restrictions on the number
> of buckets or keys inside each bucket a user can create.
> </description>
> </property>
> {code}
> {code:title=https://github.com/apache/ozone/blob/b769a2648177645a3dc9486de2250104ab63831f/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/OMConfigKeys.java#L115-L117}
> public static final String OZONE_OM_USER_MAX_VOLUME =
> "ozone.om.user.max.volume";
> public static final int OZONE_OM_USER_MAX_VOLUME_DEFAULT = 1024;
> {code}
> {code:title=https://github.com/apache/ozone/blob/b769a2648177645a3dc9486de2250104ab63831f/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java#L553-L556}
> this.maxUserVolumeCount = conf.getInt(OZONE_OM_USER_MAX_VOLUME,
> OZONE_OM_USER_MAX_VOLUME_DEFAULT);
> Preconditions.checkArgument(this.maxUserVolumeCount > 0,
> OZONE_OM_USER_MAX_VOLUME + " value should be greater than zero");
> {code}
> Steps:
> - add member variable {{private int maxUserVolumeCount}} in {{OmConfig}}
> - annotate it with {{@Config}}
> -- set {{key = "ozone.om.user.max.volume"}}
> -- set default value to "1024"
> -- add description and tags from {{ozone-default.xml}}
> - add accessor method {{getMaxUserVolumeCount()}}
> - replace usage in OzoneManager:
> -- move validation to {{OmConfig#validate()}}
> -- remove member variable
> -- change {{getMaxUserVolumeCount()}} to return the value from
> {{config.getMaxUserVolumeCount()}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]