You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by GitBox <gi...@apache.org> on 2021/08/12 06:01:34 UTC

[GitHub] [phoenix] ramatronics commented on a change in pull request #1280: PHOENIX-6523: Support for HRpc connection protocol through JDBC URL

ramatronics commented on a change in pull request #1280:
URL: https://github.com/apache/phoenix/pull/1280#discussion_r687411337



##########
File path: phoenix-core/src/test/java/org/apache/phoenix/jdbc/PhoenixEmbeddedDriverTest.java
##########
@@ -153,7 +152,56 @@ public void testNegativeGetConnectionInfo() throws SQLException {
             }
         }
     }
-    
+
+    @Test
+    public void testConnectorBootstrap() throws SQLException {
+        // HRPC
+        ConnectionInfo c1 = ConnectionInfo.create("jdbc:phoenix+hrpc:hostname1,hostname2,hostname3:90210:user/principal:/user.keytab;test=false");
+        ReadOnlyProps rop1 = c1.asProps();
+        assertEquals("hostname1:90210,hostname2:90210,hostname3:90210", rop1.get("hbase.masters"));
+        assertTrue(c1.isHRPCBootstrap());
+        assertFalse(c1.isZkBootstrap());
+
+
+        ConnectionInfo c2 = ConnectionInfo.create("jdbc:phoenix+hrpc:hostname1,hostname2,hostname3:user/principal:/user.keytab;test=false");
+        ReadOnlyProps rop2 = c2.asProps();
+        assertEquals("hostname1:60010,hostname2:60010,hostname3:60010", rop2.get("hbase.masters"));
+        assertTrue(c2.isHRPCBootstrap());
+        assertFalse(c2.isZkBootstrap());
+
+
+        // ZK
+        String[] jdbcUrls = new String[]{
+                "jdbc:phoenix+zk:hostname1,hostname2,hostname3:2181:user/principal:/user.keytab;test=false",

Review comment:
       Doesn't look like there's current support for ZK quorums with mismatched ports... also probably because in the example string you provided, the same delimiter to tokenize (`:`) is the same one used to distinguish hostname from the port in each pair.
   
   If we do want to support it, would something like this work?
   ```
   jdbc:phoenix+zk:hostname1,hostname2,hostname3:2181,2182,2183:user/principal:/user.keytab;test=false
   ```




-- 
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-unsubscribe@phoenix.apache.org

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