@Override
  public String getDelegationToken(SessionHandle sessionHandle, HiveAuthFactory authFactory,
      String owner, String renewer) throws HiveSQLException {
    String delegationToken = sessionManager.getSession(sessionHandle).
        getDelegationToken(authFactory, owner, renewer);
    LOG.info(sessionHandle  + ": getDelegationToken()" + " owner: " + owner + ", renewer: " + renewer);
    return delegationToken;
  }
If this is a background operation run asynchronously,
we block for a duration determined by a step function, before we return
However, if the background operation is complete, we return immediately.
service/src/java/org/apache/hive/service/cli/CLIService.java