@Override
  public TGetQueryIdResp GetQueryId(TGetQueryIdReq req) throws TException {
    try {
      return new TGetQueryIdResp(cliService.getQueryId(req.getOperationHandle()));
    } catch (HiveSQLException e) {
      LOG.error("Failed to get query ID [request: {}]", req, e);
      throw new TException(e);
    } catch (Exception e) {
      // If concurrently the query is closed before we fetch queryID.
      return new TGetQueryIdResp("");
    }
  }
Create a session handle
@param req
@param res
@return
@throws HiveSQLException
@throws LoginException
@throws IOException
service/src/java/org/apache/hive/service/cli/thrift/ThriftCLIService.java