public static void cancelDeleteOnExit(File file) {
    if (MGR.isShutdownInProgress()) {
      LOG.warn("Shutdown in progress, cannot cancel a deleteOnExit");
    }
    DELETE_ON_EXIT_HOOK.deleteTargets.remove(file);
  }
deregister file from delete-on-exit hook
common/src/java/org/apache/hive/common/util/ShutdownHookManager.java