[jira] [Commented] (HBASE-14425) In Secure Zookeeper cluster superuser will not have sufficient permission if multiple values are configured in "hbase.superuser"

2015-09-17 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-14425:
--

ZooKeeper's authentication framework is pluggable. It provides set of built in 
schemes. ZooKeeper's built in ACL schemes are set on a per-user basis rather 
than based on user group. If there are 'n' users in the group, we need to 
manually add each authenticated user one by one. Please refer 
[ZooKeeperAccessControl 
|http://zookeeper.apache.org/doc/r3.4.6/zookeeperProgrammers.html#sc_ZooKeeperAccessControl]
 section to understand more.

For example,
ZK auth scheme allows us to have multiple authorized users to access a single 
znode say "/path" with the different username and password combination. Say we 
have 3 users:
{code}
username : password
user_123 : pwd_123
user_456 : pwd_456
user_789 : pwd_789
{code}
It needs to explicitly set all these users to the "/path" as list of ACL 
entries. 

Does this answer your question?

> In Secure Zookeeper cluster superuser will not have sufficient permission if 
> multiple values are configured in "hbase.superuser"
> 
>
> Key: HBASE-14425
> URL: https://issues.apache.org/jira/browse/HBASE-14425
> Project: HBase
>  Issue Type: Bug
>Reporter: Pankaj Kumar
>Assignee: Pankaj Kumar
> Fix For: 2.0.0
>
> Attachments: HBASE-14425.patch
>
>
> During master intialization we are setting ACLs for the znodes.
> In ZKUtil.createACL(ZooKeeperWatcher zkw, String node, boolean 
> isSecureZooKeeper),
> {code}
>   String superUser = zkw.getConfiguration().get("hbase.superuser");
>   ArrayList acls = new ArrayList();
>   // add permission to hbase supper user
>   if (superUser != null) {
> acls.add(new ACL(Perms.ALL, new Id("auth", superUser)));
>   }
> {code}
> Here we are directly setting "hbase.superuser" value to Znode which will 
> cause an issue when multiple values are configured. In "hbase.superuser" 
> multiple superusers and supergroups can be configured separated by comma. We 
> need to iterate them and set ACL.



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


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2015-01-26 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-7847:
-

Thanks a lot [~saint@gmail.com], [~tedyu], [~rajeshbabu] for the great 
support!

 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
Assignee: Rakesh R
 Fix For: 2.0.0, 1.1.0

 Attachments: 7847-v1.txt, 7847_v6.patch, 7847_v6.patch, 
 HBASE-7847.patch, HBASE-7847.patch, HBASE-7847.patch, HBASE-7847_v4.patch, 
 HBASE-7847_v5.patch, HBASE-7847_v6.patch, HBASE-7847_v7.1.patch, 
 HBASE-7847_v7.patch, HBASE-7847_v9.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.3.4#6332)


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2015-01-23 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-7847:
-

Thanks [~tedyu]. Attached new patch addressing the comments. Also, I've added 
{{@Test (timeout=6)}} for the other existing testcases in that test class.

 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
Assignee: Rakesh R
 Attachments: 7847-v1.txt, 7847_v6.patch, 7847_v6.patch, 
 HBASE-7847.patch, HBASE-7847.patch, HBASE-7847.patch, HBASE-7847_v4.patch, 
 HBASE-7847_v5.patch, HBASE-7847_v6.patch, HBASE-7847_v7.1.patch, 
 HBASE-7847_v7.patch, HBASE-7847_v9.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.3.4#6332)


[jira] [Updated] (HBASE-7847) Use zookeeper multi to clear znodes

2015-01-23 Thread Rakesh R (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-7847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rakesh R updated HBASE-7847:

Attachment: HBASE-7847_v9.patch

 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
Assignee: Rakesh R
 Attachments: 7847-v1.txt, 7847_v6.patch, 7847_v6.patch, 
 HBASE-7847.patch, HBASE-7847.patch, HBASE-7847.patch, HBASE-7847_v4.patch, 
 HBASE-7847_v5.patch, HBASE-7847_v6.patch, HBASE-7847_v7.1.patch, 
 HBASE-7847_v7.patch, HBASE-7847_v9.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.3.4#6332)


[jira] [Updated] (HBASE-7847) Use zookeeper multi to clear znodes

2015-01-23 Thread Rakesh R (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-7847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rakesh R updated HBASE-7847:

Status: Patch Available  (was: Open)

 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
Assignee: Rakesh R
 Attachments: 7847-v1.txt, 7847_v6.patch, 7847_v6.patch, 
 HBASE-7847.patch, HBASE-7847.patch, HBASE-7847.patch, HBASE-7847_v4.patch, 
 HBASE-7847_v5.patch, HBASE-7847_v6.patch, HBASE-7847_v7.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.3.4#6332)


[jira] [Updated] (HBASE-7847) Use zookeeper multi to clear znodes

2015-01-23 Thread Rakesh R (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-7847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rakesh R updated HBASE-7847:

Status: Open  (was: Patch Available)

 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
Assignee: Rakesh R
 Attachments: 7847-v1.txt, 7847_v6.patch, 7847_v6.patch, 
 HBASE-7847.patch, HBASE-7847.patch, HBASE-7847.patch, HBASE-7847_v4.patch, 
 HBASE-7847_v5.patch, HBASE-7847_v6.patch, HBASE-7847_v7.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.3.4#6332)


[jira] [Updated] (HBASE-7847) Use zookeeper multi to clear znodes

2015-01-23 Thread Rakesh R (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-7847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rakesh R updated HBASE-7847:

Attachment: HBASE-7847_v7.1.patch

Re-attaching the same patch to trigger the build.

 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
Assignee: Rakesh R
 Attachments: 7847-v1.txt, 7847_v6.patch, 7847_v6.patch, 
 HBASE-7847.patch, HBASE-7847.patch, HBASE-7847.patch, HBASE-7847_v4.patch, 
 HBASE-7847_v5.patch, HBASE-7847_v6.patch, HBASE-7847_v7.1.patch, 
 HBASE-7847_v7.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.3.4#6332)


[jira] [Updated] (HBASE-7847) Use zookeeper multi to clear znodes

2015-01-22 Thread Rakesh R (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-7847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rakesh R updated HBASE-7847:

Attachment: HBASE-7847_v7.patch

 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
Assignee: Rakesh R
 Attachments: 7847-v1.txt, 7847_v6.patch, 7847_v6.patch, 
 HBASE-7847.patch, HBASE-7847.patch, HBASE-7847.patch, HBASE-7847_v4.patch, 
 HBASE-7847_v5.patch, HBASE-7847_v6.patch, HBASE-7847_v7.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.3.4#6332)


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2015-01-22 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-7847:
-

Attached latest patch. Could you please have a look and let me know any 
comments. Thank you!

 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
Assignee: Rakesh R
 Attachments: 7847-v1.txt, 7847_v6.patch, 7847_v6.patch, 
 HBASE-7847.patch, HBASE-7847.patch, HBASE-7847.patch, HBASE-7847_v4.patch, 
 HBASE-7847_v5.patch, HBASE-7847_v6.patch, HBASE-7847_v7.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.3.4#6332)


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2015-01-22 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-7847:
-

I've made the following changes compare to the previous one:

# Added {{IllegalArgumentException - if an invalid path is specified}} in 
javadoc
# Changed this call {{deleteChildrenRecursivelyMultiOrSequential(zkw, false, 
node);}} to {{deleteChildrenRecursivelyMultiOrSequential(zkw, true, node);}}
# Removed unused variable {{ListOp opList = new ArrayListOp();}}

Thanks,
Rakesh

 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
Assignee: Rakesh R
 Attachments: 7847-v1.txt, 7847_v6.patch, 7847_v6.patch, 
 HBASE-7847.patch, HBASE-7847.patch, HBASE-7847.patch, HBASE-7847_v4.patch, 
 HBASE-7847_v5.patch, HBASE-7847_v6.patch, HBASE-7847_v7.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.3.4#6332)


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2015-01-22 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-7847:
-

Ah. I failed to find the reason for the failure. Appreciate any help. Thanks!

{code}
[INFO] HBase - Common  FAILURE [01:04 min]

[INFO] 
[INFO] BUILD FAILURE
[INFO] 
[INFO] Total time: 01:24 min
[INFO] Finished at: 2015-01-23T05:50:30+00:00
[INFO] Final Memory: 59M/1439M
[INFO] 
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-surefire-plugin:2.18:test (default-test) on 
project hbase-common: ExecutionException: java.lang.RuntimeException: The 
forked VM terminated without properly saying goodbye. VM crash or System.exit 
called?
[ERROR] Command was /bin/sh -c cd 
/home/jenkins/jenkins-slave/workspace/PreCommit-HBASE-Build@2/hbase-common  
/home/jenkins/jenkins-slave/tools/hudson.model.JDK/jdk-1.7u51/jre/bin/java 
-enableassertions -XX:MaxDirectMemorySize=1G -Xmx1900m -XX:MaxPermSize=256m 
-Djava.security.egd=file:/dev/./urandom -Djava.net.preferIPv4Stack=true 
-Djava.awt.headless=true -jar 
/home/jenkins/jenkins-slave/workspace/PreCommit-HBASE-Build@2/hbase-common/target/surefire/surefirebooter5072257009364750704.jar
 
/home/jenkins/jenkins-slave/workspace/PreCommit-HBASE-Build@2/hbase-common/target/surefire/surefire5287510543774723648tmp
 
/home/jenkins/jenkins-slave/workspace/PreCommit-HBASE-Build@2/hbase-common/target/surefire/surefire_94684592704014843371tmp
[ERROR] - [Help 1]
{code}

 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
Assignee: Rakesh R
 Attachments: 7847-v1.txt, 7847_v6.patch, 7847_v6.patch, 
 HBASE-7847.patch, HBASE-7847.patch, HBASE-7847.patch, HBASE-7847_v4.patch, 
 HBASE-7847_v5.patch, HBASE-7847_v6.patch, HBASE-7847_v7.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.3.4#6332)


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2014-09-16 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-7847:
-

ping [~stack]

 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
Assignee: Rakesh R
 Attachments: 7847-v1.txt, 7847_v6.patch, 7847_v6.patch, 
 HBASE-7847.patch, HBASE-7847.patch, HBASE-7847.patch, HBASE-7847_v4.patch, 
 HBASE-7847_v5.patch, HBASE-7847_v6.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.3.4#6332)


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2014-04-07 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-7847:
-

Thanks [~stack] for the reply. Kindly see my thoughts :

bq. we should require a zk 3.4.x for hbase?
Yes

bq. The hang will happen on any zk before 3.4.6? When was multi added? Do you 
know?
Multi feature is added by ZOOKEEPER-965 and 3.4.0 onwards. So for multi 
support, atleast we need 3.4.x version and we can recommended to set multi if 
zk version is 3.4.x or higher version. AFAIK, client would get hang if exec 
multi before 3.4.x. Presently this is a limitation in zk older versions.

bq. Is it possible to ask zk what version it is? It was not possible in the 
past but may be fixed in 3.4.6? If so, that'd be cool. Then we could ask and 
then do multi going forward (Though if I remember, the issue here is that only 
one member of the ensemble, the one we are talking too, could report itself 
3.4.6 but all others could be at an earlier version).
We have a JIRA ZOOKEEPER-1381 to discuss the feasibility. But like you 
mentioned, if the connected server(follower/observer) is of higher version and 
the Leader is with lower version, I also feel it may not work out as per the 
client's expectations.

Also, I could see there are similar discussion happened earlier in HBASE-6058. 
Please follow link : [ZK multi api usage 
HBASE|https://issues.apache.org/jira/i#browse/HBASE-6058?page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanelissueKey=HBASE-6058serverRenderedViewIssue=truefocusedCommentId=13398282]

\\
If you agree with all these, I would be happy to prepare a new patch by fixing 
your comments (except the execution of multi irerspective of zk versions)

Thanks,
Rakesh R

 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
Assignee: Rakesh R
 Attachments: 7847-v1.txt, 7847_v6.patch, 7847_v6.patch, 
 HBASE-7847.patch, HBASE-7847.patch, HBASE-7847.patch, HBASE-7847_v4.patch, 
 HBASE-7847_v5.patch, HBASE-7847_v6.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)


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-27 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-7847:
-

Hi [~stack]

{quote}
Any chance of your trying multi ON against a zk ensemble that does not support 
multi (after changing it so the default is that we fall back to one-by-one if 
multi is not availble) to make sure all still works and you don't get an 
exception you were not expecting? 
{quote}
Say, if user tries to perform multi api 'hbase.zookeeper.useMulti=true' with 
older ZK version 3.3, looks like zkclient will get hanged. Kindly look at the 
issue ZOOKEEPER-1495 for more information, this issue is resolved only on 3.4 
branch.

Secondly, the new proposed api internally uses the existing 
ZKUtil#multiOrSequential() api to perform the delete operation. Here in 
ZKUtil#multiOrSequential() I could see, it would retry with sequential 
execution if any of the following exception occured. Other than these it will 
throw out the exception to the user.
- NODEEXISTS
- NONODE
- BADVERSION
- NOAUTH

In javadoc, I had mentioned the following exceptions:
{code}
   * @throws KeeperException.NotEmptyException if node has children while 
deleting
   * @throws KeeperException if unexpected ZooKeeper exception
{code}

Ah, I missed one case, IllegalArgumentException - if an invalid path is 
specified. I'll include this too in javadoc section.

Does this sound good to you ?

 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
Assignee: Rakesh R
 Attachments: 7847-v1.txt, 7847_v6.patch, 7847_v6.patch, 
 HBASE-7847.patch, HBASE-7847.patch, HBASE-7847.patch, HBASE-7847_v4.patch, 
 HBASE-7847_v5.patch, HBASE-7847_v6.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)


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-26 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-7847:
-

Thanks [~stack] for pointing me to these cases. I'll tests and will update you 
tomorrow.

 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
Assignee: Rakesh R
 Attachments: 7847-v1.txt, 7847_v6.patch, 7847_v6.patch, 
 HBASE-7847.patch, HBASE-7847.patch, HBASE-7847.patch, HBASE-7847_v4.patch, 
 HBASE-7847_v5.patch, HBASE-7847_v6.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)


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-25 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-7847:
-

Thanks again [~saint@gmail.com] for the comments. I'll prepare a new patch 
addressing these. 
{quote} 
Should this be true by default?
+ deleteChildrenRecursivelyMultiOrSequential(zkw, false, node);
i.e. retry with the sequential if the multi fails?
{quote}
Yeah, if true will retry sequentially on multi failures. I'll make this as true.

For the below one, could you help to understand more.
bq. Call out BFS for what it is.

BFS I meant Breadth-First-Search traversal strategy. Whether you are asking to 
avoid abbreviation/short forms ?

 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
Assignee: Rakesh R
 Attachments: 7847-v1.txt, 7847_v6.patch, 7847_v6.patch, 
 HBASE-7847.patch, HBASE-7847.patch, HBASE-7847.patch, HBASE-7847_v4.patch, 
 HBASE-7847_v5.patch, HBASE-7847_v6.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)


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-20 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-7847:
-

Thanks again [~yuzhih...@gmail.com] for +1. 

Hi [~stack], kindly look at the patch when you get sometime. Thanks!

 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
Assignee: Rakesh R
 Attachments: 7847-v1.txt, 7847_v6.patch, HBASE-7847.patch, 
 HBASE-7847.patch, HBASE-7847.patch, HBASE-7847_v4.patch, HBASE-7847_v5.patch, 
 HBASE-7847_v6.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)


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-17 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-7847:
-

Ping [~saint@gmail.com], [~yuzhih...@gmail.com]

 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, HBASE-7847_v4.patch, HBASE-7847_v5.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)


[jira] [Updated] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-17 Thread Rakesh R (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-7847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rakesh R updated HBASE-7847:


Attachment: HBASE-7847_v6.patch

 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, HBASE-7847_v4.patch, HBASE-7847_v5.patch, 
 HBASE-7847_v6.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)


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-17 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-7847:
-

Attached new patch addressing the comments. Please have a look. Thanks!

 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, HBASE-7847_v4.patch, HBASE-7847_v5.patch, 
 HBASE-7847_v6.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)


[jira] [Updated] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-16 Thread Rakesh R (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-7847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rakesh R updated HBASE-7847:


Attachment: HBASE-7847_v5.patch

 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, HBASE-7847_v4.patch, HBASE-7847_v5.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)


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-16 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-7847:
-

Thank you Ted for the review. Attached latest patch addressing the comments.

 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, HBASE-7847_v4.patch, HBASE-7847_v5.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)


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-16 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-7847:
-

Thank you Ted for the review. Attached latest patch addressing the comments.

 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, HBASE-7847_v4.patch, HBASE-7847_v5.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)


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-16 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-7847:
-

Thank you Ted for the review. Attached latest patch addressing the comments.

 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, HBASE-7847_v4.patch, HBASE-7847_v5.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)


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-14 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-7847:
-

Thank you again Stack, Rajeshbabu for the reviews. I've reworked and now I have 
used our own logic of traversal and preparing the nodes to be deleted.

 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, HBASE-7847_v4.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)


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-14 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-7847:
-

These test cases are passing locally in my environment, I doubt whether these 
are due to my patch ?

 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, HBASE-7847_v4.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)


[jira] [Updated] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-13 Thread Rakesh R (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-7847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rakesh R updated HBASE-7847:


Attachment: HBASE-7847.patch

 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


 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)


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-13 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-7847:
-

Thank you Ted, Stack for the comments. Could you please have a look at the new 
patch.

Have made the following changes:
- Handled InterruptedException 
- Implemented the deleteChildrenRecursively api similar to the existing 
multiOrSequential api structure. Also, IMHO we can expose new util api 
ZKUtil#deleteChildrenRecursivelyMultiOrSequential to everyone.

-Rakesh

 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


 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)


[jira] [Updated] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-13 Thread Rakesh R (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-7847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rakesh R updated HBASE-7847:


Attachment: HBASE-7847.patch

 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)


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-13 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-7847:
-

Attached one more patch where I have,
- included few tests 
- corrected '-1 lineLengths'

I failed to get the javadocs  test failure problems, is that related to my 
patch ?

 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)


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-13 Thread Rakesh R (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-7847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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)


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-13 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-7847:
-

bq.Has it always been there?
Yes Stack, you are right. This is not an exposed api from ZK and I feel its not 
safe to use directly. How about bringing the same traversal logic to HBase 
instead of depending on ZKUtil#listSubTreeBFS , I'll have a try.


 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)


[jira] [Updated] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-13 Thread Rakesh R (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-7847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rakesh R updated HBASE-7847:


Attachment: HBASE-7847_v4.patch

 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, HBASE-7847_v4.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)


[jira] [Updated] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-12 Thread Rakesh R (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-7847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rakesh R updated HBASE-7847:


Attachment: HBASE-7847.patch

 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


 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)


[jira] [Updated] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-12 Thread Rakesh R (JIRA)

 [ 
https://issues.apache.org/jira/browse/HBASE-7847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rakesh R updated HBASE-7847:


Status: Patch Available  (was: Open)

 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


 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)


[jira] [Commented] (HBASE-7847) Use zookeeper multi to clear znodes

2014-03-12 Thread Rakesh R (JIRA)

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

Rakesh R commented on HBASE-7847:
-

Just added initial draft patch, would like to know the feedback and will try to 
add few tests also.

 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


 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)