dbwong commented on a change in pull request #567: PHOENIX-5134 Phoenix 
Connection Driver #normalize does not distinguis…
URL: https://github.com/apache/phoenix/pull/567#discussion_r314533124
 
 

 ##########
 File path: 
phoenix-core/src/main/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriver.java
 ##########
 @@ -505,8 +519,21 @@ public ConnectionInfo(String zookeeperQuorum, Integer 
port, String rootNode, Str
             if (null == this.user) {
                 throw new RuntimeException("Acquired null user which should 
never happen");
             }
+            this.tenantID = tenantID;
         }
-        
+
+        public static String getTenantID(String url) {
+            if (url != null && url.contains(PhoenixRuntime.TENANT_ID_ATTRIB)) {
+                for (String param : url.split(";")) {
+                    if (param.startsWith(PhoenixRuntime.TENANT_ID_ATTRIB) &&
 
 Review comment:
   I think this code may have some errors for a string like "TenantIdXY", is 
there protection against these type of non-matching?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to