You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "nkeywal (Commented) (JIRA)" <ji...@apache.org> on 2011/11/15 15:31:51 UTC
[jira] [Commented] (HBASE-4326) Tests that use
HBaseTestingUtility.startMiniCluster(n) should shutdown with
HBaseTestingUtility.shutdownMiniCluster.
[ https://issues.apache.org/jira/browse/HBASE-4326?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13150518#comment-13150518 ]
nkeywal commented on HBASE-4326:
--------------------------------
I checked the status for the tests mentionned:
TestMultiParallel (UTIL.getMiniHBaseCluster().shutdown() ==> ok
TestRestartCluster (starts but doesn't close on some tests) ==> shutdown in tearDown ==> ok
TestHLog (starts but doesn't cleanup) ==> shutdown the minidfs cluster, should be ok, I will anyway shutdown the whole cluster (will do that as a part of a bigger jira in progress)
TestMasterRestartAfterDisablingTable (start but no cleanup) ==> ok
TestHBaseTestingUtility.testMiniCluster() (doesn't cleanup after itself) ==> ok
TestImportTsv ==> ok
Note that the cleanup is not done if the directory is not empty. I think it makes sense to add a shutdown hook to do a full cleanup.
> Tests that use HBaseTestingUtility.startMiniCluster(n) should shutdown with HBaseTestingUtility.shutdownMiniCluster.
> --------------------------------------------------------------------------------------------------------------------
>
> Key: HBASE-4326
> URL: https://issues.apache.org/jira/browse/HBASE-4326
> Project: HBase
> Issue Type: Bug
> Affects Versions: 0.90.4
> Reporter: Jonathan Hsieh
> Fix For: 0.94.0
>
>
> Most tests that use mini clusters use this pattern
> {code}
> private final static HBaseTestingUtility UTIL = new HBaseTestingUtility();
> @BeforeClass
> public static void beforeClass() throws Exception {
> UTIL.startMiniCluster(1);
> }
> @AfterClass
> public static void afterClass() throws IOException {
> UTIL.shutdownMiniCluster();
> }
> {code}
> Some tests (like hbase-4269)
> {code}
> @BeforeClass
> public static void beforeClass() throws Exception {
> UTIL.startMiniCluster(1);
> }
> @AfterClass
> public static void afterClass() throws IOException {
> UTIL.getMiniCluster().shutdown();
> // or UTIL.shutdownMiniHBaseCluster();
> // and likely others.
> }
> {code}
> There is a difference between the two shutdown -- the former deletes files created during the tests while the latter does not. This funny state persisting (zk or hbase/mr data) may be the cause of strange inter-testcase problems when full suites are run.
--
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