public void stop() {
      if (--usageCount == 0) {
        try {
          cluster.stop();
          cluster = null;
        } finally {
          System.out.println("Trying to cleanup: " + testDir);
          try {
            FileSystem fs = FileSystem.get(jobConf);
            fs.delete(new Path(testDir), true);
          } catch (IOException e) {
            throw new IllegalStateException("Failed to cleanup test dir", e);
          }

        }
      }
    }
class used to encapsulate a context which is normally used by
a single TestSuite or across TestSuites when multi-threaded testing is turned on
itests/hcatalog-unit/src/test/java/org/apache/hive/hcatalog/hbase/SkeletonHBaseTest.java