[
https://issues.apache.org/jira/browse/HBASE-15474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15202341#comment-15202341
]
Ted Yu commented on HBASE-15474:
--------------------------------
You can name your patch HBASE-15474-branch-1.v2.patch
> Exception in HConnectionImplementation's constructor cause Zookeeper
> connnections leak
> ---------------------------------------------------------------------------------------
>
> Key: HBASE-15474
> URL: https://issues.apache.org/jira/browse/HBASE-15474
> Project: HBase
> Issue Type: Bug
> Affects Versions: 1.1.0
> Reporter: Allan Yang
> Assignee: Allan Yang
> Labels: patch
> Fix For: 1.1.0
>
> Attachments: HBASE-15474v2.patch
>
>
> HConnectionImplementation creates a ZooKeeperKeepAliveConnection during
> construction, but if the constructor throw a exception, the zookeeper
> connection is not properly closed.
> {code}
> HConnectionImplementation(Configuration conf, boolean managed,
> ExecutorService pool, User user) throws IOException {
> this(conf);
> this.user = user;
> this.batchPool = pool;
> this.managed = managed;
> this.registry = setupRegistry();
> retrieveClusterId(); //here is the zookeeper connection created
> this.rpcClient = RpcClientFactory.createClient(this.conf,
> this.clusterId);// In our case, the exception happens here, so the zookeeper
> connection never closes
> this.rpcControllerFactory = RpcControllerFactory.instantiate(conf);
> ......
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)