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

Rakesh R commented on HBASE-7847:
---------------------------------

bq.When does ZKUtil.listSubTreeBFS show up in zk? Is it a recent version of zk? 
I could see ZKUtil.listSubTreeBFS api is available from 3.4.0 onwards. 
Reference JIRA ZOOKEEPER-839, ZKUtil added as part of this.

bq.Has it always been there?
AFAIK, ZKUtil apis are already being used extensively in many apache projects 
(including HADOOP, BOOKKEEPER etc). Anyway I'll have a word with Flavio and 
come back.

bq.Is this the only 'new' zk call this patch introduces?
Yes, actually list sub tree is using getChildren() api for traversing and will 
be called multiple times. ZKUtil#deleteRecursive() internally uses the 
ZKUtil.listSubTreeBFS() api to prepare the hierarchy, then it wll call 
zk#delete api for each path.

Existing:-
zk#getChildren() calls + zk#delete calls for each path

New approach:-
zk#getChildren() calls + one multi() api call

> Use zookeeper multi to clear znodes
> -----------------------------------
>
>                 Key: HBASE-7847
>                 URL: https://issues.apache.org/jira/browse/HBASE-7847
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Ted Yu
>         Attachments: 7847-v1.txt, HBASE-7847.patch, HBASE-7847.patch, 
> HBASE-7847.patch
>
>
> In ZKProcedureUtil, clearChildZNodes() and clearZNodes(String procedureName) 
> should utilize zookeeper multi so that they're atomic



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to