[ 
https://issues.apache.org/jira/browse/HBASE-13936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14603577#comment-14603577
 ] 

Apekshit Sharma commented on HBASE-13936:
-----------------------------------------

Thanks [~enis].
Comments inlined.

bq. Prefixing 'H' is deprecated. Please refrain from that old pattern.
Will keep in mind.

bq. Showing every possible configuration value to a single class is an 
anti-pattern. HConstants was that, and it went bad. The configurations should 
be defined close to where they are used.

That's right. I didn't realize that until [~mbertozzi] explained it to me 
yesterday. We have decided to change the design in favor of grouping 
configurations at client, server, common, etc level. What do you think?

bq. Please take a look at TableConfiguration, and why it was introduced. In a 
lot of places, the configuration parsing becomes the bottleneck especially in 
the hot code paths. Going forward we should only be passing small parsed POJO 
style objects holding the configuration for that specific sub system. A bad 
example is CacheConfig. It holds the defaults, config names, and actual values 
together with the actual Block cache reference. But the idea should be keeping 
the parsing / deprecation handling / business logic and the actual parsed 
values related to a single system together and use that object to pass it 
around.

I agree with you, I have seen and used this design in other places, and I like 
it most because it is very clean. However, do you think there is something we 
can change in the design of configuration framework i.e. Configuration , 
ConfigurationManager and other core classes (i'll be adding some new classes, 
will add you on review board), to promote or push this design? Because it seems 
to me that it's more about educating the community.

> Improve configuration framework
> -------------------------------
>
>                 Key: HBASE-13936
>                 URL: https://issues.apache.org/jira/browse/HBASE-13936
>             Project: HBase
>          Issue Type: Umbrella
>            Reporter: Apekshit Sharma
>         Attachments: DynamicConfigs.v01.docx, design.png
>
>
> Here's the design doc: 
> https://docs.google.com/document/d/1WiO2bqguR2DaVT-J2SZTCONbQ3pEhpbOI_bbLMaXRjE/edit#
> Main changes:
> get*("foo.bar", default_value)  ---> get*(HConfig.FOO_BAR)  // using enums
> Robust framework and better documentation for dynamic configurations.
> Basic overview of new design:
> !design.png!



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to