rbalamohan commented on code in PR #3264:
URL: https://github.com/apache/hive/pull/3264#discussion_r868545162


##########
common/src/java/org/apache/hadoop/hive/common/FileUtils.java:
##########
@@ -449,25 +462,18 @@ public static void checkFileAccessWithImpersonation(final 
FileSystem fs,
     }
 
     // Otherwise, try user impersonation. Current user must be configured to 
do user impersonation.
-    UserGroupInformation proxyUser = UserGroupInformation.createProxyUser(
-        user, UserGroupInformation.getLoginUser());
-    try {
-      proxyUser.doAs(new PrivilegedExceptionAction<Object>() {
-        @Override
-        public Object run() throws Exception {
-          FileSystem fsAsUser = FileSystem.get(fs.getUri(), fs.getConf());
-          ShimLoader.getHadoopShims().checkFileAccess(fsAsUser, stat, action);
-          addChildren(fsAsUser, stat.getPath(), children);
-          return null;
-        }
-      });
-    } finally {
-      FileSystem.closeAllForUGI(proxyUser);

Review Comment:
   Just scanned through the code again. Issue isn't the FileSystem.get() call, 
but it is getting invoked recursively and for each of the invocation it could 
be reestablishing a connection, which is a concern.
   
   Thanks for the note @ramesh0201.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to