[
https://issues.apache.org/jira/browse/HBASE-4993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13169186#comment-13169186
]
nkeywal commented on HBASE-4993:
--------------------------------
HBase#Configuration is expensive by nature, see the comment in @return.
As well the two comments are not saying the same thing: "Creates a clone" is
not "reloading the xml file and adding the given conf".
{noformat}
/**
* Creates a clone of passed configuration.
* @param that Configuration to clone.
* @return a Configuration created with the hbase-*.xml files plus
* the given configuration.
*/
public static Configuration create(final Configuration that) {
Configuration conf = create(); // this loads the xml files
merge(conf, that); // for every entry in 'that', replace the content of
'conf' by the content of 'that'
return conf;
}
{noformat}
To be compared with a call to clone as implemented in Configuration
{noformat}
public static Configuration create(final Configuration that) {
new Configuration(that);
return conf;
{noformat}
When I replace the former by the later, the tests is 3 times faster.
We can either:
- remove the function
- replace the former implementation with the one mentioned above
- keep the function, add a performance warning, and replace the calls to this
function by a call to the Configuration constructor.
I'm going to check the tests results on option 2.
> Performance regression in minicluster creation
> ----------------------------------------------
>
> Key: HBASE-4993
> URL: https://issues.apache.org/jira/browse/HBASE-4993
> Project: HBase
> Issue Type: Bug
> Components: master
> Affects Versions: 0.94.0
> Environment: all
> Reporter: nkeywal
> Assignee: nkeywal
> Attachments: 4993.patch, 4993.v3.patch
>
>
> Side effect of 4610: the mini cluster needs 4,5 seconds to start
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira