You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by we...@apache.org on 2019/04/03 21:30:14 UTC

[hadoop] branch trunk updated: HADOOP-16011. OsSecureRandom very slow compared to other SecureRandom implementations. Contributed by Siyao Meng.

This is an automated email from the ASF dual-hosted git repository.

weichiu pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new e62cbcb  HADOOP-16011. OsSecureRandom very slow compared to other SecureRandom implementations. Contributed by Siyao Meng.
e62cbcb is described below

commit e62cbcbc83026a7af43eac6223fe53f9de963d91
Author: Siyao Meng <sm...@cloudera.com>
AuthorDate: Wed Apr 3 14:28:43 2019 -0700

    HADOOP-16011. OsSecureRandom very slow compared to other SecureRandom implementations. Contributed by Siyao Meng.
    
    Signed-off-by: Wei-Chiu Chuang <we...@apache.org>
---
 .../main/java/org/apache/hadoop/crypto/OpensslAesCtrCryptoCodec.java  | 4 ++--
 .../hadoop-common/src/main/resources/core-default.xml                 | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

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 8d01f42..a127925 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
@@ -30,7 +30,7 @@ import org.apache.hadoop.classification.InterfaceAudience;
 import org.apache.hadoop.conf.Configuration;
 
 import com.google.common.base.Preconditions;
-import org.apache.hadoop.crypto.random.OsSecureRandom;
+import org.apache.hadoop.crypto.random.OpensslSecureRandom;
 import org.apache.hadoop.util.ReflectionUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -57,7 +57,7 @@ public class OpensslAesCtrCryptoCodec extends AesCtrCryptoCodec {
   public void setConf(Configuration conf) {
     this.conf = conf;
     final Class<? extends Random> klass = conf.getClass(
-        HADOOP_SECURITY_SECURE_RANDOM_IMPL_KEY, OsSecureRandom.class, 
+        HADOOP_SECURITY_SECURE_RANDOM_IMPL_KEY, OpensslSecureRandom.class,
         Random.class);
     try {
       random = ReflectionUtils.newInstance(klass, conf);
diff --git a/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml b/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
index 5cb37f0..e77d35d 100644
--- a/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
+++ b/hadoop-common-project/hadoop-common/src/main/resources/core-default.xml
@@ -2889,7 +2889,7 @@
 
 <property>
   <name>hadoop.security.secure.random.impl</name>
-  <value></value>
+  <value>org.apache.hadoop.crypto.random.OpensslSecureRandom</value>
   <description>
     Implementation of secure random.
   </description>


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