[
https://issues.apache.org/jira/browse/HBASE-12267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14172693#comment-14172693
]
Ted Yu commented on HBASE-12267:
--------------------------------
{code}
public void close(TaskAttemptContext context) throws IOException {
- for (HTable table : tables.values()) {
+ for (Pair<Connection, Table> pair : tables.values()) {
+ Table table = pair.getSecond();
table.flushCommits();
+ table.close();
+ pair.getFirst().close();
{code}
Why do we need to close the Connection ?
> Replace HTable constructor in mapreduce.* classes with ConnectionFactory
> -------------------------------------------------------------------------
>
> Key: HBASE-12267
> URL: https://issues.apache.org/jira/browse/HBASE-12267
> Project: HBase
> Issue Type: Bug
> Reporter: Solomon Duskis
> Assignee: Solomon Duskis
> Fix For: 2.0.0, 0.99.2
>
> Attachments: HBASE-12267.patch, HBASE-12267_v2.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)