[ 
https://issues.apache.org/jira/browse/HBASE-16117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15357047#comment-15357047
 ] 

Sean Busbey commented on HBASE-16117:
-------------------------------------

{code}
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableOutputFormat.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableOutputFormat.java
index 08af0d3..c73acd0 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableOutputFormat.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapred/TableOutputFormat.java
@@ -53,27 +53,31 @@ public class TableOutputFormat extends 
FileOutputFormat<ImmutableBytesWritable,
    */
   protected static class TableRecordWriter implements 
RecordWriter<ImmutableBytesWritable, Put> {
     private BufferedMutator m_mutator;
-    private Connection connection;
+    private Connection conn;
+
     /**
-     * Instantiate a TableRecordWriter with the HBase HClient for writing. 
Assumes control over the
-     * lifecycle of {@code conn}.
+     * Instantiate a TableRecordWriter with a BufferedMutator for batch 
writing.
      */
-    public TableRecordWriter(final BufferedMutator mutator) throws IOException 
{
-      this.m_mutator = mutator;
-    }
-
     public TableRecordWriter(JobConf job) throws IOException {
{code}

This change breaks IA.Public API. If we can avoid this part, then I'm +1 on 
bringing this back to maintenance releases (presuming [~mantonov] is fine with 
branch-1.3).

> Fix Connection leak in mapred.TableOutputFormat 
> ------------------------------------------------
>
>                 Key: HBASE-16117
>                 URL: https://issues.apache.org/jira/browse/HBASE-16117
>             Project: HBase
>          Issue Type: Bug
>          Components: mapreduce
>    Affects Versions: 2.0.0, 1.3.0, 1.2.2, 1.1.6
>            Reporter: Jonathan Hsieh
>            Assignee: Jonathan Hsieh
>             Fix For: 2.0.0, 1.3.0, 1.2.2, 1.1.6
>
>         Attachments: hbase-16117.branch-1.patch, hbase-16117.patch, 
> hbase-16117.v2.branch-1.patch, hbase-16117.v2.patch, hbase-16117.v3.patch, 
> hbase-16117.v4.patch
>
>
> Spark seems to instantiate multiple instances of output formats within a 
> single process.  When mapred.TableOutputFormat (not 
> mapreduce.TableOutputFormat) is used, this may cause connection leaks that 
> slowly exhaust the cluster's zk connections.  
> This patch fixes that.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to