You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ha...@apache.org on 2013/04/24 22:19:33 UTC

svn commit: r1471636 - /hive/branches/branch-0.11/ql/src/java/org/apache/hadoop/hive/ql/profiler/HiveProfilerStatsAggregator.java

Author: hashutosh
Date: Wed Apr 24 20:19:32 2013
New Revision: 1471636

URL: http://svn.apache.org/r1471636
Log:
HIVE-4308 : Newly added test TestCliDriver.hiveprofiler_union0 is failing on trunk (Navis via Namit Jain)

Modified:
    hive/branches/branch-0.11/ql/src/java/org/apache/hadoop/hive/ql/profiler/HiveProfilerStatsAggregator.java

Modified: hive/branches/branch-0.11/ql/src/java/org/apache/hadoop/hive/ql/profiler/HiveProfilerStatsAggregator.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.11/ql/src/java/org/apache/hadoop/hive/ql/profiler/HiveProfilerStatsAggregator.java?rev=1471636&r1=1471635&r2=1471636&view=diff
==============================================================================
--- hive/branches/branch-0.11/ql/src/java/org/apache/hadoop/hive/ql/profiler/HiveProfilerStatsAggregator.java (original)
+++ hive/branches/branch-0.11/ql/src/java/org/apache/hadoop/hive/ql/profiler/HiveProfilerStatsAggregator.java Wed Apr 24 20:19:32 2013
@@ -21,7 +21,6 @@ package org.apache.hadoop.hive.ql.profil
 import java.util.HashMap;
 import java.util.Map;
 import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
 import java.sql.PreparedStatement;
 import java.sql.SQLException;
 
@@ -58,7 +57,7 @@ public class HiveProfilerStatsAggregator
   }
 
 
-  private void populateAggregateStats(HiveConf conf) {
+  private void populateAggregateStats(HiveConf conf) throws SQLException {
     int waitWindow = rawProfileConnInfo.getWaitWindow();
     int maxRetries = rawProfileConnInfo.getMaxRetries();
 
@@ -83,9 +82,10 @@ public class HiveProfilerStatsAggregator
 
       populateAggregateStats(result);
       getProfileStatsStmt.close();
-      rawProfileConnInfo.getConnection().close();
     } catch(Exception e) {
       LOG.error("executing error: ", e);
+    } finally {
+      HiveProfilerUtils.closeConnection(rawProfileConnInfo);
     }
   }