[ https://issues.apache.org/jira/browse/HBASE-11354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14033521#comment-14033521 ]
Nicolas Liochon commented on HBASE-11354: ----------------------------------------- This is used to have a keep alive. There are two goals: - don't keep a connection to zookeeper from the client. This is useful only on large cluster with a lot of clients (map reduce...). - when the client starts to use ZK, there are usually multiple calls. So we keep the connection opened for a while. This was 3 years ago. It may not be true anymore. bq. closeMasterProtocol(hci.masterServiceState); This looks like a replace all or a merge that failed :-). A bug for sure. bq. if it has not been used up to this and no one seems to have noticed it missing? Not keeping the connection is useful only on large clusters with a lot of clients, so it's a specific case. May be we can remove this. I do remember a real performance impact if we close/open/close the connection to ZK however, but, again may be it's not true anymore... > HConnectionImplementation#DelayedClosing does not start > ------------------------------------------------------- > > Key: HBASE-11354 > URL: https://issues.apache.org/jira/browse/HBASE-11354 > Project: HBase > Issue Type: Bug > Components: Client > Affects Versions: 0.99.0, 0.98.3 > Reporter: Qianxi Zhang > Assignee: Qianxi Zhang > Priority: Minor > Attachments: HBASE_11354.patch > > > The method "createAndStart" in class DelayedClosing only creates a instance, > but forgets to start it. So thread delayedClosing is not running all the time. > ConnectionManager#1623 > {code} > static DelayedClosing createAndStart(HConnectionImplementation hci){ > Stoppable stoppable = new Stoppable() { > private volatile boolean isStopped = false; > @Override public void stop(String why) { isStopped = true;} > @Override public boolean isStopped() {return isStopped;} > }; > return new DelayedClosing(hci, stoppable); > } > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)