Search in sources :

Example 1 with TCloseSessionReq

use of org.apache.hive.service.rpc.thrift.TCloseSessionReq in project hive by apache.

the class ThriftCLIServiceClient method closeSession.

/* (non-Javadoc)
   * @see org.apache.hive.service.cli.ICLIService#closeSession(org.apache.hive.service.cli.SessionHandle)
   */
@Override
public void closeSession(SessionHandle sessionHandle) throws HiveSQLException {
    try {
        TCloseSessionReq req = new TCloseSessionReq(sessionHandle.toTSessionHandle());
        TCloseSessionResp resp = cliService.CloseSession(req);
        checkStatus(resp.getStatus());
    } catch (HiveSQLException e) {
        throw e;
    } catch (Exception e) {
        throw new HiveSQLException(e);
    }
}
Also used : HiveSQLException(org.apache.hive.service.cli.HiveSQLException) TCloseSessionResp(org.apache.hive.service.rpc.thrift.TCloseSessionResp) TCloseSessionReq(org.apache.hive.service.rpc.thrift.TCloseSessionReq) HiveSQLException(org.apache.hive.service.cli.HiveSQLException) TException(org.apache.thrift.TException)

Aggregations

HiveSQLException (org.apache.hive.service.cli.HiveSQLException)1 TCloseSessionReq (org.apache.hive.service.rpc.thrift.TCloseSessionReq)1 TCloseSessionResp (org.apache.hive.service.rpc.thrift.TCloseSessionResp)1 TException (org.apache.thrift.TException)1