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

Duo Zhang commented on HBASE-16835:
-----------------------------------

As I said in HBASE-15921, I always use watcher together with zookeeper. And why 
I say it makes the code simpler is that, usually we will cache the data in 
memory if we use watcher, so we can just expose a synchronous interface for 
getting the data to the upper layer since an in memory get is very fast and 
will not block anything. And the upper layer does not need to care about the 
update of the value, it will be updated by watcher automatically. Of course the 
value maybe stale but I think it is acceptable as we have retrying in the upper 
layer.

And yes watcher will slow down the cluster, especially that it will cause a 
network storm if we update a node that watched by every client. So I think at 
least we should not use watcher for everything we want at client side, for 
example, the current alive RS count.

> Revisit the zookeeper usage at client side
> ------------------------------------------
>
>                 Key: HBASE-16835
>                 URL: https://issues.apache.org/jira/browse/HBASE-16835
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Duo Zhang
>
> Watcher or not.
> Curator or not.
> Keep connection or not.
> ...



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

Reply via email to