HADOOP-15717. TGT renewal thread does not log IOException (snemeth via rkanter)

This commit is contained in:
Robert Kanter 2018-10-11 15:34:41 -07:00
parent 64f2b32d57
commit d91d47bc73
1 changed files with 10 additions and 8 deletions

View File

@ -920,8 +920,8 @@ public class UserGroupInformation {
final long now = Time.now();
if (tgt.isDestroyed()) {
LOG.error("TGT is destroyed. Aborting renew thread for {}.",
getUserName());
LOG.error(String.format("TGT is destroyed. " +
"Aborting renew thread for %s.", getUserName()), ie);
return;
}
@ -933,16 +933,18 @@ public class UserGroupInformation {
try {
tgtEndTime = tgt.getEndTime().getTime();
} catch (NullPointerException npe) {
LOG.error("NPE thrown while getting KerberosTicket endTime. "
+ "Aborting renew thread for {}.", getUserName());
LOG.error(String.format("NPE thrown while getting " +
"KerberosTicket endTime. Aborting renew thread for %s.",
getUserName()), ie);
return;
}
LOG.warn("Exception encountered while running the renewal "
+ "command for {}. (TGT end time:{}, renewalFailures: {},"
+ "renewalFailuresTotal: {})", getUserName(), tgtEndTime,
LOG.warn(String.format("Exception encountered while running the " +
"renewal command for %s. " +
"(TGT end time:%d, renewalFailures: %d, " +
"renewalFailuresTotal: %d)", getUserName(), tgtEndTime,
metrics.renewalFailures.value(),
metrics.renewalFailuresTotal.value(), ie);
metrics.renewalFailuresTotal.value()), ie);
if (rp == null) {
// Use a dummy maxRetries to create the policy. The policy will
// only be used to get next retry time with exponential back-off.