hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From x...@apache.org
Subject hadoop git commit: HADOOP-13854. KMS should log error details in KMSExceptionsProvider.
Date Fri, 09 Jun 2017 05:39:03 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 ffaf24e30 -> aaf533e8a


HADOOP-13854. KMS should log error details in KMSExceptionsProvider.

(cherry picked from commit c4b5c32669423b9a792f33f9f8333d95528f2515)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/aaf533e8
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/aaf533e8
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/aaf533e8

Branch: refs/heads/branch-2
Commit: aaf533e8a06b0f5b9825c90eeb1cb3844580a690
Parents: ffaf24e
Author: Xiao Chen <xiao@apache.org>
Authored: Thu Jun 8 22:35:31 2017 -0700
Committer: Xiao Chen <xiao@apache.org>
Committed: Thu Jun 8 22:38:31 2017 -0700

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/crypto/key/kms/server/KMS.java   | 2 +-
 .../hadoop/crypto/key/kms/server/KMSExceptionsProvider.java      | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/aaf533e8/hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMS.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMS.java
b/hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMS.java
index d8755ec..e9d6a7a 100644
--- a/hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMS.java
+++ b/hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMS.java
@@ -70,7 +70,7 @@ public class KMS {
   private KeyProviderCryptoExtension provider;
   private KMSAudit kmsAudit;
 
-  private static final Logger LOG = LoggerFactory.getLogger(KMS.class);
+  static final Logger LOG = LoggerFactory.getLogger(KMS.class);
 
   public KMS() throws Exception {
     provider = KMSWebApp.getKeyProvider();

http://git-wip-us.apache.org/repos/asf/hadoop/blob/aaf533e8/hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSExceptionsProvider.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSExceptionsProvider.java
b/hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSExceptionsProvider.java
index aa9d299..3d97753 100644
--- a/hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSExceptionsProvider.java
+++ b/hadoop-common-project/hadoop-kms/src/main/java/org/apache/hadoop/crypto/key/kms/server/KMSExceptionsProvider.java
@@ -43,6 +43,7 @@ import java.io.IOException;
 public class KMSExceptionsProvider implements ExceptionMapper<Exception> {
   private static Logger LOG =
       LoggerFactory.getLogger(KMSExceptionsProvider.class);
+  private final static Logger EXCEPTION_LOG = KMS.LOG;
 
   private static final String ENTER = System.getProperty("line.separator");
 
@@ -100,6 +101,9 @@ public class KMSExceptionsProvider implements ExceptionMapper<Exception>
{
           KMSMDCFilter.getMethod(),
           KMSMDCFilter.getURL(), getOneLineMessage(exception));
     }
+    EXCEPTION_LOG.warn("User {} request {} {} caused exception.",
+        KMSMDCFilter.getUgi(), KMSMDCFilter.getMethod(),
+        KMSMDCFilter.getURL(), exception);
     return createResponse(status, throwable);
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message