Configuration Naming Guidelines - derekm/pravega GitHub Wiki
Related Issues: Issue 4712
Table of Contents:
The new naming scheme has a hierarchical structure of the following form:
<Namespace>.<Configuration-Item>.<Measurement/Unit>*.<Qualifier>*
where * represent "optional"/"situation-dependent" parts.
The table below describes the parts.
| Part No | Part | Description | Highlighted part from the sample configuration |
|---|---|---|---|
| 1. | Namespace | The context in which the config item applies | controller.transaction.lease.count.max |
| 2. | Configuration Item | The answers "what is being configured?" | controller.transaction.lease.count.max |
| 3. | Measurement/Unit | Represents one of these:
|
controller.transaction.lease.count.max |
| 4. | Qualifier | Qualifies the configuration, like the following:
|
controller.transaction.lease.count.max |
-
Structure your namespaces hierarchically from left to right, from a highest-level concept to the lowest-level.
The first word of the namespace typically represents the high-level component to which the item like
controller,pravegaservice(for Segment Store),autoscale(forAuto Scaler), HDFS, and so on. The configuration files where you define these configurations, define the first word implicitly to all configurations defined therein. For example, all configurations starting withpravegaserviceare defined inServiceConfig.java, where you'll find definitions of configurations likedataLog.impl.name(representingpravegaservice.dataLog.impl.name).The subsequent terms in the namespace represent areas and sub-areas. Consider
controller.transaction.lease.count.maxfor an example. In this configuration,controller.transaction.leasenamespace containstransaction, which represents that the specific configuration partleaseapplies to the areatransactions. -
When using units, use their plural form. Use
secondsandbytes, instead ofsecondorbyte. -
Use camel cases for compound names. For example,
readOnlyinpravegaservice.readOnly.enable. -
Name of all boolean-valued configurations must end with
.enable. For example:-
controller.hostMonitor.enable=false -
#controller.request.tracing.enable=true
-
-
There is no need for using the term
valuein the names, as it is implicit in the absence of any unit or qualifier. For examplecontroller.service.rpc.listener.port, which does not contain any unit or qualifier, configures a port value implicitly. -
Use
locationas a qualifier for configurations specifying file paths. One example iscontroller.security.tls.server.certificate.location, which represents the TLS Server certificate file path for Controller. Similarly, one'd use...trustStore.pwd.locationif the password is specified by a file, but...truststore.pwdis the password is directly specified as a configuration value such as "super-secret-password". -
Network service's endpoint configuration must have
servicein the namespace. A few examples:-
controller.service.rpc.listener.port=9090 -
controller.service.rest.listener.port=9091 pravegaservice.service.published.host.nameOrIp
-
-
For configurations representing connection params for connections to other components, use
connectin the namespace like inzk.connect.uri. Doing so makes it explicit that these are connection parameters for another component/system.