code: public static void cancelHadoopTokens(HadoopSecurityManager hadoopSecurityManager,
        String userToProxy, File tokenFile, Logger log) {
      if (tokenFile == null) {
        return;
      }
      try {
        hadoopSecurityManager.cancelTokens(tokenFile, userToProxy, log);
      } catch (HadoopSecurityManagerException e) {
        log.error(e.getCause() + e.getMessage());
      } catch (Exception e) {
        log.error(e.getCause() + e.getMessage());
      }
      if (tokenFile.exists()) {
        tokenFile.delete();
      }
    }
docs: Invalidates a Hadoop authentication token file