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