Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-4326

Tests that use HBaseTestingUtility.startMiniCluster(n) should shutdown with HBaseTestingUtility.shutdownMiniCluster.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.90.4
    • Fix Version/s: 0.94.0
    • Component/s: None
    • Labels:
      None

      Description

      Most tests that use mini clusters use this pattern

       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();
        }
      

      Some tests (like hbase-4269)

        @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.
        }
      

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                nkeywal Nicolas Liochon
                Reporter:
                jmhsieh Jonathan Hsieh
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: