ashutoshc commented on a change in pull request #1279:
URL: https://github.com/apache/hive/pull/1279#discussion_r457659517
##########
File path:
shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java
##########
@@ -1223,11 +1223,31 @@ public static boolean isHdfsEncryptionSupported() {
private final Configuration conf;
public HdfsEncryptionShim(URI uri, Configuration conf) throws IOException {
- DistributedFileSystem dfs = (DistributedFileSystem)FileSystem.get(uri,
conf);
-
this.conf = conf;
- this.keyProvider = dfs.getClient().getKeyProvider();
this.hdfsAdmin = new HdfsAdmin(uri, conf);
+ this.keyProvider = getKeyProvider();
+ }
+
+ private KeyProvider getKeyProvider() throws IOException {
+ if (isMethodExist(HdfsAdmin.class, "getKeyProvider")) {
Review comment:
this is not needed. Hive's minimum version required for Hadoop is 3.0
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]