You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kylin.apache.org by roger shi <ro...@hotmail.com> on 2016/11/19 07:30:06 UTC

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

Nice proposal, +1.

________________________________
发件人: Li Yang <li...@apache.org>
发送时间: 2016年11月18日 18:00:31
收件人: dev@kylin.apache.org
主题: Re: [DISCUSS] Naming convention for config files and properties

Thank you Yerui & Dayue!

> Just one question, how to decide the package name of property name?
Java package names could be a reference. Which java code uses this config?
Then the config package could be mapped from the java package. Just some
initial thought.

> I suggest making a clear list of all allowed packages
I'll consolidate a list of config package names as a starting point. Later
additions only need to keep consistency.

Yang

On Fri, Nov 18, 2016 at 5:51 PM, Dayue <da...@163.com> wrote:

> Nice proposal, +1.
>
> To enforce property naming convention, I suggest making a clear list of
> all allowed packages. New package should be avoided as much as possible.
>
> Cheers,
> Dayue
>
> > 在 2016年11月18日,下午4:18,Li Yang <li...@apache.org> 写道:
> >
> > 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
>
>
>

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

Posted by ShaoFeng Shi <sh...@apache.org>.
Hi yang, will change the name of existing config files?

2016-11-19 15:30 GMT+08:00 roger shi <ro...@hotmail.com>:

> Nice proposal, +1.
>
> ________________________________
> 发件人: Li Yang <li...@apache.org>
> 发送时间: 2016年11月18日 18:00:31
> 收件人: dev@kylin.apache.org
> 主题: Re: [DISCUSS] Naming convention for config files and properties
>
> Thank you Yerui & Dayue!
>
> > Just one question, how to decide the package name of property name?
> Java package names could be a reference. Which java code uses this config?
> Then the config package could be mapped from the java package. Just some
> initial thought.
>
> > I suggest making a clear list of all allowed packages
> I'll consolidate a list of config package names as a starting point. Later
> additions only need to keep consistency.
>
> Yang
>
> On Fri, Nov 18, 2016 at 5:51 PM, Dayue <da...@163.com> wrote:
>
> > Nice proposal, +1.
> >
> > To enforce property naming convention, I suggest making a clear list of
> > all allowed packages. New package should be avoided as much as possible.
> >
> > Cheers,
> > Dayue
> >
> > > 在 2016年11月18日,下午4:18,Li Yang <li...@apache.org> 写道:
> > >
> > > 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
> >
> >
> >
>



-- 
Best regards,

Shaofeng Shi 史少锋

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

Posted by Li Yang <li...@apache.org>.
Thank you guys for all the support. I'll take this task forward in
KYLIN-2195 <https://issues.apache.org/jira/browse/KYLIN-2195>.

@Shaofeng
> will change the name of existing config files?
Yes, I plan to.

Btw, I prepared a tool to map the old config names to the new ones (ref
BackwardCompatibilityConfig). Check it out if you are interested.


Cheers
Yang

On Sat, Nov 19, 2016 at 7:52 PM, Billy(Yiming) Liu <li...@gmail.com>
wrote:

> +1.
>
> I could help maintain the config list.
>
> 2016-11-19 15:30 GMT+08:00 roger shi <ro...@hotmail.com>:
>
> > Nice proposal, +1.
> >
> > ________________________________
> > 发件人: Li Yang <li...@apache.org>
> > 发送时间: 2016年11月18日 18:00:31
> > 收件人: dev@kylin.apache.org
> > 主题: Re: [DISCUSS] Naming convention for config files and properties
> >
> > Thank you Yerui & Dayue!
> >
> > > Just one question, how to decide the package name of property name?
> > Java package names could be a reference. Which java code uses this
> config?
> > Then the config package could be mapped from the java package. Just some
> > initial thought.
> >
> > > I suggest making a clear list of all allowed packages
> > I'll consolidate a list of config package names as a starting point.
> Later
> > additions only need to keep consistency.
> >
> > Yang
> >
> > On Fri, Nov 18, 2016 at 5:51 PM, Dayue <da...@163.com> wrote:
> >
> > > Nice proposal, +1.
> > >
> > > To enforce property naming convention, I suggest making a clear list of
> > > all allowed packages. New package should be avoided as much as
> possible.
> > >
> > > Cheers,
> > > Dayue
> > >
> > > > 在 2016年11月18日,下午4:18,Li Yang <li...@apache.org> 写道:
> > > >
> > > > 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
> > >
> > >
> > >
> >
>
>
>
> --
> With Warm regards
>
> Yiming Liu (刘一鸣)
>

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

Posted by "Billy(Yiming) Liu" <li...@gmail.com>.
+1.

I could help maintain the config list.

2016-11-19 15:30 GMT+08:00 roger shi <ro...@hotmail.com>:

> Nice proposal, +1.
>
> ________________________________
> 发件人: Li Yang <li...@apache.org>
> 发送时间: 2016年11月18日 18:00:31
> 收件人: dev@kylin.apache.org
> 主题: Re: [DISCUSS] Naming convention for config files and properties
>
> Thank you Yerui & Dayue!
>
> > Just one question, how to decide the package name of property name?
> Java package names could be a reference. Which java code uses this config?
> Then the config package could be mapped from the java package. Just some
> initial thought.
>
> > I suggest making a clear list of all allowed packages
> I'll consolidate a list of config package names as a starting point. Later
> additions only need to keep consistency.
>
> Yang
>
> On Fri, Nov 18, 2016 at 5:51 PM, Dayue <da...@163.com> wrote:
>
> > Nice proposal, +1.
> >
> > To enforce property naming convention, I suggest making a clear list of
> > all allowed packages. New package should be avoided as much as possible.
> >
> > Cheers,
> > Dayue
> >
> > > 在 2016年11月18日,下午4:18,Li Yang <li...@apache.org> 写道:
> > >
> > > 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
> >
> >
> >
>



-- 
With Warm regards

Yiming Liu (刘一鸣)