use of org.apache.hive.service.rpc.thrift.TCancelDelegationTokenReq in project hive by apache.
the class ThriftCLIServiceClient method cancelDelegationToken.
@Override
public void cancelDelegationToken(SessionHandle sessionHandle, HiveAuthFactory authFactory, String tokenStr) throws HiveSQLException {
TCancelDelegationTokenReq cancelReq = new TCancelDelegationTokenReq(sessionHandle.toTSessionHandle(), tokenStr);
try {
TCancelDelegationTokenResp cancelResp = cliService.CancelDelegationToken(cancelReq);
checkStatus(cancelResp.getStatus());
return;
} catch (TException e) {
throw new HiveSQLException(e);
}
}
use of org.apache.hive.service.rpc.thrift.TCancelDelegationTokenReq in project hive by apache.
the class HiveConnection method cancelDelegationToken.
public void cancelDelegationToken(String tokenStr) throws SQLException {
TCancelDelegationTokenReq cancelReq = new TCancelDelegationTokenReq(sessHandle, tokenStr);
try {
TCancelDelegationTokenResp cancelResp = client.CancelDelegationToken(cancelReq);
Utils.verifySuccess(cancelResp.getStatus());
return;
} catch (TException e) {
throw new SQLException("Could not cancel token: " + e.getMessage(), " 08S01", e);
}
}
Aggregations