public void endOpen() throws InterruptedException, CancellationException {
    if (this.session != null || this.sessionFuture == null) {
      return;
    }
    try {
      TezClient session = this.sessionFuture.get();
      if (session == null) {
        throw new RuntimeException("Initialization was interrupted");
      }
      this.session = session;
    } catch (ExecutionException e) {
      throw new RuntimeException(e);
    }
  }
Check if Kerberos authentication is enabled.
This is used by:
- HS2 (upon Tez session creation)
In secure scenarios HS2 might either be logged on (by Kerberos) by itself or by a launcher
script it was forked from. In the latter case UGI.getLoginUser().isFromKeytab() returns false,
hence UGI.getLoginUser().hasKerberosCredentials() is a tightest setting we can check against.
ql/src/java/org/apache/hadoop/hive/ql/exec/tez/TezSessionState.java