[
https://issues.apache.org/jira/browse/BOOKKEEPER-704?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14048735#comment-14048735
]
Ivan Kelly commented on BOOKKEEPER-704:
---------------------------------------
In the zookeeper client, you first use the parent instance and then move to a
reconnected instance after expiry. This leads to a lot of code like:
{code}
ZooKeeper zkHandle = zk.get();
if (null == zkHandle) {
return ZooKeeperClient.super.getData(path, watch, stat);
}
return zkHandle.getData(path, watch, stat);
{code}
I think it would be better to go through a single path for the zkHandle each
time.
I also wonder if it wouldn't be worth while just using a preexisting wrapper,
like curator for this. This is complex code, and curator is already well
maintained.
> reconnectable zookeeper client wrapper
> --------------------------------------
>
> Key: BOOKKEEPER-704
> URL: https://issues.apache.org/jira/browse/BOOKKEEPER-704
> Project: Bookkeeper
> Issue Type: Sub-task
> Components: bookkeeper-client, bookkeeper-server
> Reporter: Sijie Guo
> Assignee: Sijie Guo
> Fix For: 4.4.0
>
> Attachments: BOOKKEEPER-704.diff
>
>
> create a reconnectable zookkeeper client wrapper to handle session expire
> event.
--
This message was sent by Atlassian JIRA
(v6.2#6252)