use of org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.CancelDelegationTokenResponseProto in project ozone by apache.
the class OzoneManagerProtocolClientSideTranslatorPB method cancelDelegationToken.
/**
* Cancel an existing delegation token.
*
* @param token delegation token
*/
@Override
public void cancelDelegationToken(Token<OzoneTokenIdentifier> token) throws OMException {
CancelDelegationTokenRequestProto req = CancelDelegationTokenRequestProto.newBuilder().setToken(OMPBHelper.convertToTokenProto(token)).build();
OMRequest omRequest = createOMRequest(Type.CancelDelegationToken).setCancelDelegationTokenRequest(req).build();
final CancelDelegationTokenResponseProto resp;
try {
handleError(submitRequest(omRequest));
} catch (IOException e) {
if (e instanceof OMException) {
throw (OMException) e;
}
throw new OMException("Cancel delegation token failed.", e, TOKEN_ERROR_OTHER);
}
}
Aggregations