public static void closeIfNotDefault(
      TezSessionState tezSessionState, boolean keepTmpDir) throws Exception {
    LOG.info("Closing tez session if not default: " + tezSessionState);
    if (!tezSessionState.isDefault()) {
      tezSessionState.close(keepTmpDir);
    }
  }
@param conf HiveConf that is used to initialize the session
@param queueName could be null. Set in the tez session.
@param doOpen
@return
@throws Exception
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionPoolManager.java