You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by 康凯森 <ka...@qq.com> on 2016/11/18 09:42:30 UTC

回复:[DISCUSS] Naming convention for config files and properties

+1. the consistent convention is important.




------------------ 原始邮件 ------------------
发件人: "Li Yang";<li...@apache.org>;
发送时间: 2016年11月18日(星期五) 下午4:18
收件人: "dev"<de...@kylin.apache.org>; 

主题: [DISCUSS] Naming convention for config files and properties



Hi

The kylin config files and properties lack of a naming convention at the
moment. The result is messy. I want to establish a convention, start by
throwing out a proposal and getting your feedback.

There is no right or wrong convention. People's preference varies and that
is fine. However to work as a team, consistency is required. So let's
compromise where possible.

*File Name Convention*

Proposal: *words-separated-by-dash.ext*  (all chars in lower case)

Rationale: Be consistent with hadoop config file names, i.e. hdfs-site.xml

Good example: kylin-server-log4j.properties
Bad example: kylin_hive_conf.xml   (should be kylin-hive-conf.xml)

*Property Name Convention*

Proposal: *dot.separated.namespace.config-name-separated-by-dash*  (all
chars in lower case)

Rationale: The dot separated prefix is for namespace, like java packages.
The last level is like class name, but in lower case and separated by dash.
The result is consistent with common hadoop config names, i.e.
dfs.namenode.servicerpc-bind-host

Good example: kylin.metadata.url, kylin.storage.url
Bad example: kylin.job.mapreduce.mapper.input.rows  (should be
kyiln.job.mapreduce.mapper-input-rows)
Bad example: kylin.cube.dimension.customEncodingFactories  (should be
kylin.cube.dimension.custom-encoding-factories)

Please share your thoughts. Want to have a consensus with the majority
first, then comes to implementation.


Cheers
Yang