Bläddra i källkod

HADOOP-11868. Invalid user logins trigger large backtraces in server log. Contributed by Chang Li
(cherry picked from commit 0ebe84d30af2046775884c9fb1e054da31582657)

Jason Lowe 10 år sedan
förälder
incheckning
feb995fc50

+ 5 - 1
hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/AuthenticationFilter.java

@@ -560,7 +560,11 @@ public class AuthenticationFilter implements Filter {
       // exception from the filter itself is fatal
       errCode = HttpServletResponse.SC_FORBIDDEN;
       authenticationEx = ex;
-      LOG.warn("Authentication exception: " + ex.getMessage(), ex);
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("Authentication exception: " + ex.getMessage(), ex);
+      } else {
+        LOG.warn("Authentication exception: " + ex.getMessage());
+      }
     }
     if (unauthorizedResponse) {
       if (!httpResponse.isCommitted()) {

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -110,6 +110,9 @@ Release 2.7.1 - UNRELEASED
 
   BUG FIXES
 
+    HADOOP-11868. Invalid user logins trigger large backtraces in server log
+    (Chang Li via jlowe)
+
 Release 2.7.0 - 2015-04-20
 
   INCOMPATIBLE CHANGES