stoty commented on code in PR #2027:
URL: https://github.com/apache/phoenix/pull/2027#discussion_r1847931382


##########
phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/ConnectionInfo.java:
##########
@@ -59,6 +59,19 @@ public abstract class ConnectionInfo {
     protected static final boolean HAS_MASTER_REGISTRY;
     protected static final boolean HAS_RPC_REGISTRY;
 
+    private static volatile Configuration configuration;

Review Comment:
   Also if we leave this alone, then volatile shouldn't be needed.



##########
phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/ConnectionInfo.java:
##########
@@ -510,6 +516,30 @@ protected void handleKerberosAndLogin() throws 
SQLException {
             }
         }
 
+        private Configuration getConfiguration( String principal, String 
keytab) {

Review Comment:
   We don't need a full HBaseConfiguration here.
   
   We could return an (anonymous?) subclass where the getter(s) are overriden 
to return these values for the principal and keytab, but delegate everything 
else to cached instance.
   
   We don't need a fully fledged implmentation, handling the methods that the 
UGI actually calls is enough.
   
   That would solve the slowness, while keeping the cached instance unchanged.



##########
phoenix-core-client/src/main/java/org/apache/phoenix/jdbc/ConnectionInfo.java:
##########
@@ -59,6 +59,19 @@ public abstract class ConnectionInfo {
     protected static final boolean HAS_MASTER_REGISTRY;
     protected static final boolean HAS_RPC_REGISTRY;
 
+    private static volatile Configuration configuration;

Review Comment:
   This could be in the Builder.



-- 
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: issues-unsubscr...@phoenix.apache.org

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

Reply via email to