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

Ted Yu commented on HBASE-8372:
-------------------------------

{code}
+    if (mutableConf != null) {
+      // convert mutableConf to a immutable one and reset to allow a new 
mutable conf
+      this.configs.add(0, new ImmutableConfWrapper(mutableConf));
+      mutableConf = null;
+    }
{code}
Can we extract the above into a method ? It is called multiple times.
'to a immutable': typo

When set() and addXXX() are called alternately, we would create multiple 
ImmutableConfWrapper's.
This seems suboptimal.
                
> Provide mutability to CompoundConfiguration
> -------------------------------------------
>
>                 Key: HBASE-8372
>                 URL: https://issues.apache.org/jira/browse/HBASE-8372
>             Project: HBase
>          Issue Type: New Feature
>            Reporter: Ted Yu
>            Assignee: Jonathan Hsieh
>         Attachments: hbase-8372.patch, hbase-8372.v2.patch, 
> hbase-8372.v3.patch, hbase-8372.v4.patch
>
>
> In discussion of HBASE-8347, it was proposed that CompoundConfiguration 
> should support mutability.
> This can be done by consolidating ImmutableConfigMap's on first modification 
> to CompoundConfiguration.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to