phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anoopsamj...@apache.org
Subject git commit: PHOENIX-1079 ConnectionQueryServicesImpl : Close HTable after use.(Samarth)
Date Thu, 10 Jul 2014 10:48:02 GMT
Repository: phoenix
Updated Branches:
  refs/heads/4.0 0b5b14654 -> 185eae7a5


PHOENIX-1079 ConnectionQueryServicesImpl : Close HTable after use.(Samarth)


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/185eae7a
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/185eae7a
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/185eae7a

Branch: refs/heads/4.0
Commit: 185eae7a55f4de14b6121857e862aa32c5e51792
Parents: 0b5b146
Author: anoopsjohn <anoopsamjohn@gmail.com>
Authored: Thu Jul 10 16:17:36 2014 +0530
Committer: anoopsjohn <anoopsamjohn@gmail.com>
Committed: Thu Jul 10 16:17:36 2014 +0530

----------------------------------------------------------------------
 .../org/apache/phoenix/query/ConnectionQueryServicesImpl.java   | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/185eae7a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
index a83a0c9..aa6fe17 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
@@ -17,6 +17,7 @@
  */
 package org.apache.phoenix.query;
 
+import static com.google.common.io.Closeables.closeQuietly;
 import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.COLUMN_COUNT;
 import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.COLUMN_FAMILY;
 import static org.apache.phoenix.jdbc.PhoenixDatabaseMetaData.COLUMN_NAME;
@@ -1642,6 +1643,8 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices
implement
                 return sequence.createSequence(result);
             } catch (IOException e) {
                 throw ServerUtil.parseServerException(e);
+            } finally {
+                closeQuietly(htable);
             }
         } finally {
             sequence.getLock().unlock();
@@ -1666,6 +1669,8 @@ public class ConnectionQueryServicesImpl extends DelegateQueryServices
implement
                 return sequence.dropSequence(result);
             } catch (IOException e) {
                 throw ServerUtil.parseServerException(e);
+            } finally {
+                closeQuietly(htable);
             }
         } finally {
             sequence.getLock().unlock();


Mime
View raw message