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

Gregory Chanan commented on HBASE-6904:
---------------------------------------

There is such a call but it doesn't really make things any better.

Let's say you used that call...you'd do something like this:
{code}
if(!zk.exists(znode)) {
  zk.create(znode);
}
{code}

But what if another client does the same thing at the same time? (remember, we 
just want the znode to exist, don't care who creates it).  Well, one of the 
create calls will get a NodeExistsException, so you need the try/catch anyway 
and calling exists hasn't saved you anything.
                
> In the HBase shell, an error is thrown that states replication-related znodes 
> already exist
> -------------------------------------------------------------------------------------------
>
>                 Key: HBASE-6904
>                 URL: https://issues.apache.org/jira/browse/HBASE-6904
>             Project: HBase
>          Issue Type: Bug
>          Components: Replication, Zookeeper
>    Affects Versions: 0.92.0, 0.92.1, 0.96.0
>            Reporter: Aleksandr Shulman
>            Assignee: Gregory Chanan
>            Priority: Minor
>             Fix For: 0.94.3, 0.96.0
>
>         Attachments: HBASE-6904-94.patch, HBASE-6904.patch
>
>
> On a replication-enabled cluster, querying the list_peers produces the error 
> lines shown below. It doesn't appear that anything is broken in terms of 
> functionality.
> Stack trace:
> hbase(main):001:0> list_peers
> 12/09/29 14:41:03 ERROR zookeeper.RecoverableZooKeeper: Node 
> /hbase/replication/peers already exists and this is not a retry
> 12/09/29 14:41:03 ERROR zookeeper.RecoverableZooKeeper: Node 
> /hbase/replication/rs already exists and this is not a retry
> PEER ID CLUSTER KEY
> 0 row(s) in 0.4650 seconds

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to