hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hashut...@apache.org
Subject svn commit: r1329913 - in /hive/branches/branch-0.9: ./ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
Date Tue, 24 Apr 2012 18:24:47 GMT
Author: hashutosh
Date: Tue Apr 24 18:24:46 2012
New Revision: 1329913

URL: http://svn.apache.org/viewvc?rev=1329913&view=rev
Log:
Merged in HIVE-2883 : Metastore client doesnt close connection properly (hashutosh)

Modified:
    hive/branches/branch-0.9/   (props changed)
    hive/branches/branch-0.9/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java

Propchange: hive/branches/branch-0.9/
------------------------------------------------------------------------------
  Merged /hive/trunk:r1329461

Modified: hive/branches/branch-0.9/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
URL: http://svn.apache.org/viewvc/hive/branches/branch-0.9/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java?rev=1329913&r1=1329912&r2=1329913&view=diff
==============================================================================
--- hive/branches/branch-0.9/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
(original)
+++ hive/branches/branch-0.9/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
Tue Apr 24 18:24:46 2012
@@ -302,9 +302,6 @@ public class HiveMetaStoreClient impleme
 
   public void close() {
     isConnected = false;
-    if ((transport != null) && transport.isOpen()) {
-      transport.close();
-    }
     try {
       if (null != client) {
         client.shutdown();
@@ -312,6 +309,11 @@ public class HiveMetaStoreClient impleme
     } catch (TException e) {
       LOG.error("Unable to shutdown local metastore client", e);
     }
+    // Transport would have got closed via client.shutdown(), so we dont need this, but
+    // just in case, we make this call.
+    if ((transport != null) && transport.isOpen()) {
+      transport.close();
+    }
   }
 
   /**



Mime
View raw message