From a1f6564d31c16582ea949e4448091f1cc56c7dfe Mon Sep 17 00:00:00 2001 From: Wei-Chiu Chuang Date: Wed, 3 Aug 2016 14:19:08 -0700 Subject: [PATCH] HADOOP-13458. LoadBalancingKMSClientProvider#doOp should log IOException stacktrace. Contributed by Chen Liang. --- .../crypto/key/kms/LoadBalancingKMSClientProvider.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/LoadBalancingKMSClientProvider.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/LoadBalancingKMSClientProvider.java index 6a9bd621ab..e6ff079821 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/LoadBalancingKMSClientProvider.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/key/kms/LoadBalancingKMSClientProvider.java @@ -33,6 +33,7 @@ import org.apache.hadoop.crypto.key.KeyProviderDelegationTokenExtension; import org.apache.hadoop.security.Credentials; import org.apache.hadoop.security.token.Token; +import org.apache.hadoop.util.StringUtils; import org.apache.hadoop.util.Time; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -93,8 +94,8 @@ private T doOp(ProviderCallable op, int currPos) try { return op.call(provider); } catch (IOException ioe) { - LOG.warn("KMS provider at [{}] threw an IOException [{}]!!", - provider.getKMSUrl(), ioe.getMessage()); + LOG.warn("KMS provider at [{}] threw an IOException!! {}", + provider.getKMSUrl(), StringUtils.stringifyException(ioe)); ex = ioe; } catch (Exception e) { if (e instanceof RuntimeException) {