[ https://issues.apache.org/jira/browse/HBASE-4448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13114619#comment-13114619 ]
Doug Meil commented on HBASE-4448: ---------------------------------- This is not applied on trunk. No apology required! Feedback is expected/necessary for something like this. re: #1 Per the spreadsheet, I'm not sure that customized MiniClusters can be re-used. I left those out on purpose at least for this pass to focus on the generic "Mini 1, 2, 3" ones. Also, a review of anything that isn't "Mini 1" is required - I don't think all those REST tests need "Mini 3" - I think they can be "Mini 1". re: #2 Re-using DFS and ZK Clusters is something that I thought could come later. I named the existing "getMiniCluster" (i.e., as opposed to 'get()') so that the DFS and ZK clusters could be obtained later. Probably just a follow-on ticket rather than a sub-ticket. I'd rather get the kinks out of this round first. re: #3 In terms of the waiting logic, I was trying not to over-complicate this and track last-usage-by-specific MiniCluster config. > 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, > hbase_hbaseTestingUtility_uses_2011_09_22.xlsx, java_HBASE_4448.patch > > > 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