@Override
    public boolean removeShutdownHook(Runnable shutdownHook) {
      try {
        return (Boolean) Methods.call(shutdownHookManagerClass,
          Methods.call(shutdownHookManagerClass, null, "get", null, null), "removeShutdownHook",
          new Class[] { Runnable.class }, new Object[] { shutdownHook });
      } catch (Exception ex) {
        throw new RuntimeException("we could not use ShutdownHookManager", ex);
      }
    }
This class provides ShutdownHookManager shims for HBase to interact with the Hadoop 1.0.x and the
Hadoop 2.0+ series. NOTE: No testing done against 0.22.x, or 0.21.x.
hbase-server/src/main/java/org/apache/hadoop/hbase/util/ShutdownHookManager.java