You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by na...@apache.org on 2013/04/16 11:15:23 UTC

svn commit: r1468329 - /hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/profiler/HiveProfilerStatsAggregator.java

Author: namit
Date: Tue Apr 16 09:15:23 2013
New Revision: 1468329

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


Modified:
    hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/profiler/HiveProfilerStatsAggregator.java

Modified: hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/profiler/HiveProfilerStatsAggregator.java
URL: http://svn.apache.org/viewvc/hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/profiler/HiveProfilerStatsAggregator.java?rev=1468329&r1=1468328&r2=1468329&view=diff
==============================================================================
--- hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/profiler/HiveProfilerStatsAggregator.java (original)
+++ hive/trunk/ql/src/java/org/apache/hadoop/hive/ql/profiler/HiveProfilerStatsAggregator.java Tue Apr 16 09:15:23 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);
     }
   }