hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sp...@apache.org
Subject hive git commit: Revert "HIVE-16047: Shouldn't try to get KeyProvider unless encryption is enabled (Rui reviewed by Xuefu and Ferdinand)"
Date Wed, 03 May 2017 15:44:34 GMT
Repository: hive
Updated Branches:
  refs/heads/branch-2 a3a0a53c1 -> 828418201


Revert "HIVE-16047: Shouldn't try to get KeyProvider unless encryption is enabled (Rui reviewed
by Xuefu and Ferdinand)"

This reverts commit a9de1cdbb9ffeef43dbee3db1712845f015ac108.


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

Branch: refs/heads/branch-2
Commit: 828418201532607aa6bf4785115dfd9dbb0270f4
Parents: a3a0a53
Author: Sergio Pena <sergio.pena@cloudera.com>
Authored: Wed May 3 10:44:07 2017 -0500
Committer: Sergio Pena <sergio.pena@cloudera.com>
Committed: Wed May 3 10:44:07 2017 -0500

----------------------------------------------------------------------
 .../org/apache/hadoop/hive/shims/Hadoop23Shims.java | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/82841820/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java
----------------------------------------------------------------------
diff --git a/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java b/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java
index 21a18f8..0483e91 100644
--- a/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java
+++ b/shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java
@@ -57,7 +57,6 @@ import org.apache.hadoop.fs.TrashPolicy;
 import org.apache.hadoop.fs.permission.FsAction;
 import org.apache.hadoop.fs.permission.FsPermission;
 import org.apache.hadoop.hdfs.DFSClient;
-import org.apache.hadoop.hdfs.DFSConfigKeys;
 import org.apache.hadoop.hdfs.DistributedFileSystem;
 import org.apache.hadoop.hdfs.MiniDFSCluster;
 import org.apache.hadoop.hdfs.MiniDFSNNTopology;
@@ -1149,23 +1148,10 @@ public class Hadoop23Shims extends HadoopShimsSecure {
       DistributedFileSystem dfs = (DistributedFileSystem)FileSystem.get(uri, conf);
 
       this.conf = conf;
-      this.keyProvider = isEncryptionEnabled(dfs.getClient(), dfs.getConf()) ?
-          dfs.getClient().getKeyProvider() : null;
+      this.keyProvider = dfs.getClient().getKeyProvider();
       this.hdfsAdmin = new HdfsAdmin(uri, conf);
     }
 
-    private boolean isEncryptionEnabled(DFSClient client, Configuration conf) {
-      try {
-        DFSClient.class.getMethod("isHDFSEncryptionEnabled");
-      } catch (NoSuchMethodException e) {
-        // The method is available since Hadoop-2.7.1; if we run with an older Hadoop, check
this
-        // ourselves. Note that this setting is in turn deprected in newer versions of Hadoop,
but
-        // we only care for it in the older versions; so we will hardcode the old name here.
-        return !conf.getTrimmed("dfs.encryption.key.provider.uri", "").isEmpty();
-      }
-      return client.isHDFSEncryptionEnabled();
-    }
-
     @Override
     public boolean isPathEncrypted(Path path) throws IOException {
       Path fullPath;


Mime
View raw message