/// <exception cref="Com.Google.Protobuf.ServiceException"/> public virtual SecurityProtos.RenewDelegationTokenResponseProto RenewDelegationToken (RpcController controller, SecurityProtos.RenewDelegationTokenRequestProto proto ) { RenewDelegationTokenRequestPBImpl request = new RenewDelegationTokenRequestPBImpl (proto); try { RenewDelegationTokenResponse response = real.RenewDelegationToken(request); return(((RenewDelegationTokenResponsePBImpl)response).GetProto()); } catch (IOException e) { throw new ServiceException(e); } }
/// <exception cref="System.IO.IOException"/> /// <exception cref="System.Exception"/> public override long Renew <_T0>(Org.Apache.Hadoop.Security.Token.Token <_T0> token , Configuration conf) { Org.Apache.Hadoop.Yarn.Api.Records.Token dToken = Org.Apache.Hadoop.Yarn.Api.Records.Token .NewInstance(token.GetIdentifier(), token.GetKind().ToString(), token.GetPassword (), token.GetService().ToString()); MRClientProtocol histProxy = InstantiateHistoryProxy(conf, SecurityUtil.GetTokenServiceAddr (token)); try { RenewDelegationTokenRequest request = Org.Apache.Hadoop.Yarn.Util.Records.NewRecord <RenewDelegationTokenRequest>(); request.SetDelegationToken(dToken); return(histProxy.RenewDelegationToken(request).GetNextExpirationTime()); } finally { StopHistoryProxy(histProxy); } }