public static void threadDumpingIsAlive(final Thread t) throws InterruptedException {
    if (t == null) {
      return;
    }

    while (t.isAlive()) {
      t.join(60 * 1000);
      if (t.isAlive()) {
        printThreadInfo(System.out,
          "Automatic Stack Trace every 60 seconds waiting on " + t.getName());
      }
    }
  }
Waits on the passed thread to die dumping a threaddump every minute while its up.
hbase-common/src/main/java/org/apache/hadoop/hbase/util/Threads.java