use of org.apache.hadoop.security.proto.SecurityProtos.GetDelegationTokenResponseProto in project hadoop by apache.
the class ClientNamenodeProtocolServerSideTranslatorPB method getDelegationToken.
@Override
public GetDelegationTokenResponseProto getDelegationToken(RpcController controller, GetDelegationTokenRequestProto req) throws ServiceException {
try {
Token<DelegationTokenIdentifier> token = server.getDelegationToken(new Text(req.getRenewer()));
GetDelegationTokenResponseProto.Builder rspBuilder = GetDelegationTokenResponseProto.newBuilder();
if (token != null) {
rspBuilder.setToken(PBHelperClient.convert(token));
}
return rspBuilder.build();
} catch (IOException e) {
throw new ServiceException(e);
}
}
Aggregations