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

 ##########
 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:
   The connection.close() in the finally block could throw NPE if you exhaust 
your retries?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to