deniskuzZ commented on code in PR #4882:
URL: https://github.com/apache/hive/pull/4882#discussion_r1759258344


##########
common/src/java/org/apache/hadoop/hive/common/UgiFactory.java:
##########
@@ -15,8 +15,20 @@
 package org.apache.hadoop.hive.common;
 
 import java.io.IOException;
+
+import org.apache.hadoop.security.Credentials;
 import org.apache.hadoop.security.UserGroupInformation;
 
 public interface UgiFactory {
-  UserGroupInformation createUgi() throws IOException;
+  /*
+   * Creates a UserGroupInformation instance for a user with credentials in a 
scope of a specific query.
+   * Subclasses might implement a cache for taking care of reusing an existing 
ugi for the same query if possible.
+   */
+  UserGroupInformation createUgi(String queryIdentifier, String user, 
Credentials credentials) throws IOException;
+
+  /*
+   * Closes all filesystems for a specific query.
+   * In LLAP daemons for the same dag user and credentials, this call 
typically closes a single FileSystem instance.
+   */
+  void closeFileSystemsForQuery(String queryIdentifier);

Review Comment:
   question, could we keep the factories and use them in UgiManager that would 
maintain the state?



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