qwang6 commented on a change in pull request #506: add hive metadata jdbc 
retrieval
URL: https://github.com/apache/griffin/pull/506#discussion_r305191834
 
 

 ##########
 File path: 
service/src/main/java/org/apache/griffin/core/metastore/hive/HiveMetaStoreServiceJdbcImpl.java
 ##########
 @@ -160,6 +143,22 @@ public void evictHiveCache() {
         LOGGER.info("Evict hive cache");
     }
 
+    private void closeConnection(Connection conn, Statement stmt, ResultSet 
rs) {
+        try {
+            if (rs != null) {
 
 Review comment:
   In current version I used the DriverManager to get Hive Connection, if 
changed to try-with-resource, I cannot do the unit test with Mockito. So we 
keep try-catch-finally for now, and if we will change to use Hive Connection 
Pool, we may change to try-with-resource method.

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