ramitg254 commented on code in PR #5776:
URL: https://github.com/apache/hive/pull/5776#discussion_r2051962350


##########
shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java:
##########
@@ -1334,10 +1335,23 @@ public static class HdfsEncryptionShim implements 
HadoopShims.HdfsEncryptionShim
 
     private final Configuration conf;
 
-    public HdfsEncryptionShim(URI uri, Configuration conf) throws IOException {
+    public static HdfsEncryptionShim createInstance(URI uri, Configuration 
conf) throws IOException {
+      HdfsAdmin hadmin = null;
+      KeyProvider keyP = null;
+      try {
+        hadmin = new HdfsAdmin(uri, conf);
+        keyP = hadmin.getKeyProvider();
+      } catch (IOException e) {

Review Comment:
   done removed 



##########
shims/0.23/src/main/java/org/apache/hadoop/hive/shims/Hadoop23Shims.java:
##########
@@ -774,26 +772,28 @@ public FutureDataInputStreamBuilder openFile(Path path) 
throws IOException, Unsu
     }
 
     @Override
-    public RemoteIterator<LocatedFileStatus> listLocatedStatus(final Path f)
-      throws FileNotFoundException, IOException {
-      return new RemoteIterator<LocatedFileStatus>() {
-        private final RemoteIterator<LocatedFileStatus> stats =
-            ProxyFileSystem23.super.listLocatedStatus(
-                ProxyFileSystem23.super.swizzleParamPath(f));
-
-        @Override
-        public boolean hasNext() throws IOException {
-          return stats.hasNext();
-        }
+    public RemoteIterator<LocatedFileStatus> listLocatedStatus(final Path f) 
throws FileNotFoundException, IOException {
+      try {
+        final RemoteIterator<LocatedFileStatus> remoteIterator =
+            
ProxyFileSystem23.super.listLocatedStatus(ProxyFileSystem23.super.swizzleParamPath(f));
+        return new RemoteIterator<LocatedFileStatus>() {
+          private final RemoteIterator<LocatedFileStatus> stats = 
remoteIterator;
+
+          @Override
+          public boolean hasNext() throws IOException {
+            return stats.hasNext();
+          }
 
-        @Override
-        public LocatedFileStatus next() throws IOException {
-          LocatedFileStatus result = stats.next();
-          return new LocatedFileStatus(
-              ProxyFileSystem23.super.swizzleFileStatus(result, false),
-              result.getBlockLocations());
-        }
-      };
+          @Override
+          public LocatedFileStatus next() throws IOException {
+            LocatedFileStatus result = stats.next();
+            return new 
LocatedFileStatus(ProxyFileSystem23.super.swizzleFileStatus(result, false),
+                result.getBlockLocations());
+          }
+        };
+      } catch (IOException e) {

Review Comment:
   done removed



-- 
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.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to