/** * Find the DelegationTokenInformation for the given token id, and verify that * if the token is expired. Note that this method should be called with * acquiring the secret manager's monitor. */ protected DelegationTokenInformation checkToken(TokenIdent identifier) throws InvalidToken { assert Thread.holdsLock(this); DelegationTokenInformation info = getTokenInfo(identifier); if (info == null) { throw new InvalidToken("token " + formatTokenId(identifier) + " can't be found in cache"); } long now = Time.now(); if (info.getRenewDate() < now) { throw new InvalidToken("token " + formatTokenId(identifier) + " is " + "expired, current time: " + Time.formatTime(now) + " expected renewal time: " + Time.formatTime(info.getRenewDate())); } return info; }
throw new InvalidToken(renewer + " tried to renew an expired token " + formatTokenId(id) + " max expiration date: " + Time.formatTime(id.getMaxDate()) + " currentTime: " + Time.formatTime(now));
private void updateInternalLeaseHolder() { this.lastHolderUpdateTime = Time.monotonicNow(); this.internalLeaseHolder = HdfsServerConstants.NAMENODE_LEASE_HOLDER + "-" + Time.formatTime(Time.now()); }
final long completion = zs.getCompletionTime(); listing.addRow(zs.getZoneName(), zs.getState().toString(), zs.getEzKeyVersionName(), Time.formatTime(zs.getSubmissionTime()), Boolean.toString(zs.isCanceled()), completion == 0 ? "N/A" : Time.formatTime(completion), Long.toString(zs.getFilesReencrypted()), Long.toString(zs.getNumReencryptionFailures()),
/** * Find the DelegationTokenInformation for the given token id, and verify that * if the token is expired. Note that this method should be called with * acquiring the secret manager's monitor. */ protected DelegationTokenInformation checkToken(TokenIdent identifier) throws InvalidToken { assert Thread.holdsLock(this); DelegationTokenInformation info = getTokenInfo(identifier); if (info == null) { throw new InvalidToken("token " + formatTokenId(identifier) + " can't be found in cache"); } long now = Time.now(); if (info.getRenewDate() < now) { throw new InvalidToken("token " + formatTokenId(identifier) + " is " + "expired, current time: " + Time.formatTime(now) + " expected renewal time: " + Time.formatTime(info.getRenewDate())); } return info; }
throw new InvalidToken(renewer + " tried to renew an expired token " + formatTokenId(id) + " max expiration date: " + Time.formatTime(id.getMaxDate()) + " currentTime: " + Time.formatTime(now));