phoenix-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [phoenix] karanmehta93 commented on a change in pull request #453: [PHOENIX-5172] Harden the PQS canary synth test tool with retry mechanism and more logging
Date Wed, 06 Mar 2019 20:12:39 GMT
karanmehta93 commented on a change in pull request #453: [PHOENIX-5172] Harden the PQS canary
synth test tool with retry mechanism and more logging
URL: https://github.com/apache/phoenix/pull/453#discussion_r263115317
 
 

 ##########
 File path: phoenix-core/src/main/java/org/apache/phoenix/tool/PhoenixCanaryTool.java
 ##########
 @@ -396,16 +324,7 @@ public int run(String[] args) throws Exception {
             Properties connProps = new Properties();
             connProps.setProperty("phoenix.schema.mapSystemTablesToNamespace", "true");
             connProps.setProperty("phoenix.schema.isNamespaceMappingEnabled", "true");
-
-            try {
-                connection = DriverManager.getConnection(connectionURL, connProps);
-            } catch (Exception e) {
-                LOG.info("Namespace mapping cannot be set. Using default schema");
-                USE_NAMESPACE = false;
-                connection = DriverManager.getConnection(connectionURL);
-                TEST_SCHEMA_NAME = null;
-                FQ_TABLE_NAME = TEST_TABLE_NAME;
-            }
+            connection = getConnectionWithRetry(connectionURL, connProps);
 
 Review comment:
   Also good to have a null check here or throw the exception from method in case of failure.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message