[ https://issues.apache.org/jira/browse/HBASE-6969?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13473181#comment-13473181 ]
Micah Whitacre commented on HBASE-6969: --------------------------------------- I documented it on the method but the assumption was that the injected zkCluster is not started. {quote} As written, at end of tests, won't your passed in zkcluster be shutdown? That is probably not what you want? Should there be a getMiniZookeeperCluster to answer your added setMiniZookeeperCluster? Is baseZKCluster necessary? {quote} Since the patch truthfully just swaps out the call to "new MiniZookeeperCluster(...)", the code which currently manages the startup and shutdown should manage the injected value. Also when startup is called, the member variable "zkCluster" is initialized to the baseZKCluster and the existing calls to getZKCluster() should return it without needing a new "get". The "don't start" flag idea could work. The assumption in that case would be the ZK Quorum would have to be started and relevant configuration set in the injected Configuration object I assume? > Allow for injecting MiniZookeeperCluster instance > ------------------------------------------------- > > Key: HBASE-6969 > URL: https://issues.apache.org/jira/browse/HBASE-6969 > Project: HBase > Issue Type: Bug > Components: test > Affects Versions: 0.92.1 > Reporter: Micah Whitacre > Attachments: hbase-6969.patch > > > While not an official part of the HBase API, it'd be nice if > HBaseTestingUtility allowed for consumer to inject their own instance of the > MiniZookeeperCluster when executing tests. > Currently there is no way to control how the ZK instance is started which > we've had to hack around when there were ZK version conflicts (3.3 vs 3.4). > Or if you want to control which specific port it starts on vs random. > Allowing consumers to inject an instance (unstarted) gives them the freedom > to implement their own without having to fork the entire HBaseTestingUtility > class -- 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