From aea35d93e3b2349098134f285c00d9d529d3496b Mon Sep 17 00:00:00 2001 From: Tsz-wo Sze Date: Mon, 7 Apr 2014 18:07:13 +0000 Subject: [PATCH] HADOOP-10466. Lower the log level in UserGroupInformation. Contributed by Nicolas Liochon git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1585538 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../hadoop/security/UserGroupInformation.java | 16 ++++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 805d485b38..a285ffef15 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -355,6 +355,9 @@ Release 2.4.1 - UNRELEASED IMPROVEMENTS + HADOOP-10466. Lower the log level in UserGroupInformation. (Nicolas + Liochon via szetszwo) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java index 1b62a0c488..cd553decfc 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/UserGroupInformation.java @@ -990,7 +990,9 @@ public synchronized void reloginFromKeytab() // register most recent relogin attempt user.setLastLogin(now); try { - LOG.info("Initiating logout for " + getUserName()); + if (LOG.isDebugEnabled()) { + LOG.debug("Initiating logout for " + getUserName()); + } synchronized (UserGroupInformation.class) { // clear up the kerberos state. But the tokens are not cleared! As per // the Java kerberos login module code, only the kerberos credentials @@ -1001,7 +1003,9 @@ public synchronized void reloginFromKeytab() login = newLoginContext( HadoopConfiguration.KEYTAB_KERBEROS_CONFIG_NAME, getSubject(), new HadoopConfiguration()); - LOG.info("Initiating re-login for " + keytabPrincipal); + if (LOG.isDebugEnabled()) { + LOG.debug("Initiating re-login for " + keytabPrincipal); + } start = Time.now(); login.login(); metrics.loginSuccess.add(Time.now() - start); @@ -1042,7 +1046,9 @@ public synchronized void reloginFromTicketCache() // register most recent relogin attempt user.setLastLogin(now); try { - LOG.info("Initiating logout for " + getUserName()); + if (LOG.isDebugEnabled()) { + LOG.debug("Initiating logout for " + getUserName()); + } //clear up the kerberos state. But the tokens are not cleared! As per //the Java kerberos login module code, only the kerberos credentials //are cleared @@ -1052,7 +1058,9 @@ public synchronized void reloginFromTicketCache() login = newLoginContext(HadoopConfiguration.USER_KERBEROS_CONFIG_NAME, getSubject(), new HadoopConfiguration()); - LOG.info("Initiating re-login for " + getUserName()); + if (LOG.isDebugEnabled()) { + LOG.debug("Initiating re-login for " + getUserName()); + } login.login(); setLogin(login); } catch (LoginException le) {