From df4dcd3e75f1f935bd9a537e63758fee71cf4e02 Mon Sep 17 00:00:00 2001 From: Uma Maheswara Rao G Date: Wed, 10 Feb 2016 14:54:45 -0800 Subject: [PATCH] HADOOP-12788. OpensslAesCtrCryptoCodec should log which random number generator is used. Contributed by Wei-Chiu Chuang. --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../org/apache/hadoop/crypto/OpensslAesCtrCryptoCodec.java | 3 +++ 2 files changed, 6 insertions(+) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index c3f817bc7b..634baede4f 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -1114,6 +1114,9 @@ Release 2.8.0 - UNRELEASED HADOOP-12764. Increase default value of KMX maxHttpHeaderSize and make it configurable. (zhz) + HADOOP-12788. OpensslAesCtrCryptoCodec should log which random number generator is used. + (Wei-Chiu Chuang via umamahesh) + OPTIMIZATIONS HADOOP-11785. Reduce the number of listStatus operation in distcp diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/OpensslAesCtrCryptoCodec.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/OpensslAesCtrCryptoCodec.java index 4ca79b307d..63c382c16e 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/OpensslAesCtrCryptoCodec.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/crypto/OpensslAesCtrCryptoCodec.java @@ -61,6 +61,9 @@ public void setConf(Configuration conf) { Random.class); try { random = ReflectionUtils.newInstance(klass, conf); + if (LOG.isDebugEnabled()) { + LOG.debug("Using " + klass.getName() + " as random number generator."); + } } catch (Exception e) { LOG.info("Unable to use " + klass.getName() + ". Falling back to " + "Java SecureRandom.", e);