hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject svn commit: r1553324 - /hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java
Date Tue, 24 Dec 2013 20:00:19 GMT
Author: apurtell
Date: Tue Dec 24 20:00:19 2013
New Revision: 1553324

URL: http://svn.apache.org/r1553324
Log:
HBASE-10233. VisibilityController is too chatty at DEBUG level

Modified:
    hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java

Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java?rev=1553324&r1=1553323&r2=1553324&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java
(original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/security/visibility/VisibilityController.java
Tue Dec 24 20:00:19 2013
@@ -826,7 +826,9 @@ public class VisibilityController extend
       if (node instanceof LeafExpressionNode) {
         identifier = ((LeafExpressionNode) node)
             .getIdentifier();
-        LOG.debug("The identifier is "+identifier);
+        if (LOG.isTraceEnabled()) {
+          LOG.trace("The identifier is "+identifier);
+        }
         labelOrdinal = this.visibilityManager.getLabelOrdinal(identifier);
       } else {
         // This is a NOT node.
@@ -977,7 +979,9 @@ public class VisibilityController extend
       // for non-rpc handling, fallback to system user
       user = User.getCurrent();
     }
-    LOG.debug("Current active user name is "+user.getShortName());
+    if (LOG.isTraceEnabled()) {
+      LOG.trace("Current active user name is "+user.getShortName());
+    }
     return user;
   }
 
@@ -987,7 +991,9 @@ public class VisibilityController extend
       throw new IOException("Unable to obtain the current user, "
           + "authorization checks for internal operations will not work correctly!");
     }
-    LOG.debug("Current user name is "+user.getShortName());
+    if (LOG.isTraceEnabled()) {
+      LOG.trace("Current user name is "+user.getShortName());
+    }
     String currentUser = user.getShortName();
     List<String> superUsers = Lists.asList(currentUser,
         this.conf.getStrings(AccessControlLists.SUPERUSER_CONF_KEY, new String[0]));
@@ -1074,7 +1080,9 @@ public class VisibilityController extend
             Put p = new Put(Bytes.toBytes(ordinalCounter));
             p.addImmutable(
                 LABELS_TABLE_FAMILY, LABEL_QUALIFIER, label, LABELS_TABLE_TAGS);
-            LOG.debug("Adding the label "+labelStr);
+            if (LOG.isDebugEnabled()) {
+              LOG.debug("Adding the label "+labelStr);
+            }
             puts.add(p);
             ordinalCounter++;
             response.addResult(successResult);
@@ -1302,7 +1310,9 @@ public class VisibilityController extend
         throw new IOException("Unable to retrieve calling user");
       }
       List<String> auths = this.visibilityManager.getAuths(user.getShortName());
-      LOG.debug("The list of auths are "+auths);
+      if (LOG.isTraceEnabled()) {
+        LOG.trace("The list of auths are "+auths);
+      }
       if (!auths.contains(SYSTEM_LABEL)) {
         throw new AccessDeniedException("User '" + user.getShortName()
             + "' is not authorized to perform this action.");



Mime
View raw message