phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gjac...@apache.org
Subject phoenix git commit: PHOENIX-4635 HBase Connection leak in org.apache.phoenix.hive.mapreduce.PhoenixInputFormat
Date Fri, 02 Mar 2018 18:48:04 GMT
Repository: phoenix
Updated Branches:
  refs/heads/4.x-HBase-0.98 1f484245a -> f9cc29989


PHOENIX-4635 HBase Connection leak in org.apache.phoenix.hive.mapreduce.PhoenixInputFormat

Signed-off-by: Geoffrey Jacoby <gjacoby@apache.org>


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

Branch: refs/heads/4.x-HBase-0.98
Commit: f9cc29989b11c47f6b79b0c802d72456c924472e
Parents: 1f48424
Author: Yechao Chen <chenyechao@gmail.com>
Authored: Fri Mar 2 10:03:11 2018 +0800
Committer: Geoffrey Jacoby <gjacoby@apache.org>
Committed: Fri Mar 2 10:44:04 2018 -0800

----------------------------------------------------------------------
 .../org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/f9cc2998/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
----------------------------------------------------------------------
diff --git a/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
b/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
index b70c00f..794fcc4 100644
--- a/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
+++ b/phoenix-hive/src/main/java/org/apache/phoenix/hive/mapreduce/PhoenixInputFormat.java
@@ -154,7 +154,7 @@ public class PhoenixInputFormat<T extends DBWritable> implements
InputFormat<Wri
 
         // Adding Localization
 
-        HConnection connection = HConnectionManager.createConnection(PhoenixConnectionUtil.getConfiguration(jobConf));
+        try (HConnection connection = HConnectionManager.createConnection(PhoenixConnectionUtil.getConfiguration(jobConf)))
{
         RegionSizeCalculator sizeCalculator = new RegionSizeCalculator(table);
 
         for (List<Scan> scans : qplan.getScans()) {
@@ -205,6 +205,7 @@ public class PhoenixInputFormat<T extends DBWritable> implements
InputFormat<Wri
                 psplits.add(inputSplit);
             }
         }
+		}
 
         return psplits;
     }


Mime
View raw message