[
https://issues.apache.org/jira/browse/HBASE-13936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14603641#comment-14603641
]
Apekshit Sharma commented on HBASE-13936:
-----------------------------------------
While we are at it, I'd like to throw some other big questions/doubts/ideas
here. Starting with this one,
I feel like having set*() function for configurations isn't a good idea. It
essentially makes the Configuration object a big container of 100s of variables
being changed and passed around.
In our code, 'conf' is copied around, values are overwritten, then passed
around again. Scary. Makes it quite easy to screw up.
I believe that a better design would be having a single immutable Configuration
object. Any case which requires overwriting a configuration property inside the
code should be refactor-able into a better design.
What do others think? Is there any case where overwriting a property inside
code is the only or the best way? (unit-tests aside)
> 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)