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

Jesse Yates commented on HBASE-4448:
------------------------------------

Initial thoughts: in general, I'm digging the idea (but I'd +1ed it before).

Concerns: 
Major:
The timeout removal could be a pretty dangerous thing to do. In the general 
case, it might not be too bad since it seems like a node should request a 
cluster and use it in a timeframe. But what about long running tests? It would 
be nice to modify the mini cluster (or maybe subclass it into a 
TestingUtilMiniCluster) that actually tracks recent usage (last access time?) 
and then use that as the 'timeout' number for cleanup.

Minor:
Going to need to make sure we tie back requests for a certain size cluster with 
the type (right now hard coding 1)

Besides those, I'm liking the patch Doug!



> HBaseTestingUtilityFactory - pattern for re-using HBaseTestingUtility 
> instances across unit tests
> -------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-4448
>                 URL: https://issues.apache.org/jira/browse/HBASE-4448
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: Doug Meil
>            Assignee: Doug Meil
>            Priority: Minor
>         Attachments: HBaseTestingUtilityFactory.java
>
>
> Setting up and tearing down HBaseTestingUtility instances in unit tests is 
> very expensive.  On my MacBook it takes about 10 seconds to set up a 
> MiniCluster, and 7 seconds to tear it down.  When multiplied by the number of 
> test classes that use this facility, that's a lot of time in the build.
> This factory assumes that the JVM is being re-used across test classes in the 
> build, otherwise this pattern won't work. 
> I don't think this is appropriate for every use, but I think it can be 
> applicable in a great many cases - especially where developers just want a 
> simple MiniCluster with 1 slave.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to