hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sur...@apache.org
Subject svn commit: r1398883 - in /hadoop/common/trunk/hadoop-common-project/hadoop-common: CHANGES.txt src/main/java/org/apache/hadoop/security/JniBasedUnixGroupsMapping.java src/main/java/org/apache/hadoop/security/JniBasedUnixGroupsNetgroupMapping.java
Date Tue, 16 Oct 2012 16:52:43 GMT
Author: suresh
Date: Tue Oct 16 16:52:42 2012
New Revision: 1398883

URL: http://svn.apache.org/viewvc?rev=1398883&view=rev
Log:
HADOOP-8923. JNI-based user-group mapping modules can be too chatty on lookup failures. Contributed
by Kihwal Lee.

Modified:
    hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
    hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/JniBasedUnixGroupsMapping.java
    hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/JniBasedUnixGroupsNetgroupMapping.java

Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1398883&r1=1398882&r2=1398883&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt (original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/CHANGES.txt Tue Oct 16 16:52:42
2012
@@ -1056,6 +1056,8 @@ Release 0.23.5 - UNRELEASED
   NEW FEATURES
 
   IMPROVEMENTS
+    HADOOP-8923. JNI-based user-group mapping modules can be too chatty on 
+    lookup failures. (Kihwal Lee via suresh)
 
   OPTIMIZATIONS
 

Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/JniBasedUnixGroupsMapping.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/JniBasedUnixGroupsMapping.java?rev=1398883&r1=1398882&r2=1398883&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/JniBasedUnixGroupsMapping.java
(original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/JniBasedUnixGroupsMapping.java
Tue Oct 16 16:52:42 2012
@@ -48,7 +48,7 @@ public class JniBasedUnixGroupsMapping i
       throw new RuntimeException("Bailing out since native library couldn't " +
         "be loaded");
     }
-    LOG.info("Using JniBasedUnixGroupsMapping for Group resolution");
+    LOG.debug("Using JniBasedUnixGroupsMapping for Group resolution");
   }
 
   @Override
@@ -57,7 +57,11 @@ public class JniBasedUnixGroupsMapping i
     try {
       groups = getGroupForUser(user);
     } catch (Exception e) {
-      LOG.warn("Error getting groups for " + user, e);
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Error getting groups for " + user, e);
+      } else {
+        LOG.info("Error getting groups for " + user + ": " + e.getMessage());
+      }
     }
     return Arrays.asList(groups);
   }

Modified: hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/JniBasedUnixGroupsNetgroupMapping.java
URL: http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/JniBasedUnixGroupsNetgroupMapping.java?rev=1398883&r1=1398882&r2=1398883&view=diff
==============================================================================
--- hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/JniBasedUnixGroupsNetgroupMapping.java
(original)
+++ hadoop/common/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/JniBasedUnixGroupsNetgroupMapping.java
Tue Oct 16 16:52:42 2012
@@ -52,7 +52,7 @@ public class JniBasedUnixGroupsNetgroupM
       throw new RuntimeException("Bailing out since native library couldn't " +
         "be loaded");
     }
-    LOG.info("Using JniBasedUnixGroupsNetgroupMapping for Netgroup resolution");
+    LOG.debug("Using JniBasedUnixGroupsNetgroupMapping for Netgroup resolution");
   }
 
   /**
@@ -115,7 +115,12 @@ public class JniBasedUnixGroupsNetgroupM
       // JNI code does not expect '@' at the begining of the group name
       users = getUsersForNetgroupJNI(netgroup.substring(1));
     } catch (Exception e) {
-      LOG.warn("error getting users for netgroup " + netgroup, e);
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Error getting users for netgroup " + netgroup, e);
+      } else {
+        LOG.info("Error getting users for netgroup " + netgroup + 
+            ": " + e.getMessage());
+      }
     }
     if (users != null && users.length != 0) {
       return Arrays.asList(users);



Mime
View raw message