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


##########
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:
   I am removing this because we moved the FIleSystem.get() call outside the 
recursive call, and hence i thought we can just close once for every 
FileSystem.get() call



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