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


##########
llap-server/src/java/org/apache/hadoop/hive/llap/security/LlapUgiFactoryFactory.java:
##########
@@ -15,42 +15,115 @@
 package org.apache.hadoop.hive.llap.security;
 
 import java.io.IOException;
+import java.util.Map;
+import java.util.HashMap;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.hive.common.UgiFactory;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.conf.HiveConf.ConfVars;
 import org.apache.hadoop.hive.llap.LlapUtil;
 import org.apache.hadoop.hive.shims.HadoopShims;
 import org.apache.hadoop.hive.shims.ShimLoader;
+import org.apache.hadoop.security.Credentials;
 import org.apache.hadoop.security.UserGroupInformation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /** No Java application is complete until it has a FactoryFactory. */
 public class LlapUgiFactoryFactory {
+  private static final Logger LOG = 
LoggerFactory.getLogger(LlapUgiFactoryFactory.class);
+
   private static final HadoopShims SHIMS = ShimLoader.getHadoopShims();
 
-  private static class KerberosUgiFactory implements UgiFactory {
+  /**
+   * This class implements abstract logic for maintaining a single ugi for a 
specific user in a query.
+   * Subclasses implement createNewUgiInternal for creating a new ugi object 
when needed.
+   */
+  private static abstract class AbstractLlapUgiFactory implements UgiFactory {
+    Map<String, UserGroupInformation> ugis = new HashMap<>();

Review Comment:
   right, the problem was that UgiFactory is in hive-common, which should not 
depend on hive-llap-server...however, now I double-checked, nothing else uses 
UgiFactory in hive repo, it's an llap specific thing, so I'm moving it and it 
should work



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