hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HBASE-8937) createEphemeralNodeAndWatch don't set watcher if the node is created successfully
Date Sun, 02 Feb 2014 05:44:10 GMT

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

stack resolved HBASE-8937.
--------------------------

    Resolution: Duplicate

Resolving as dup of HBASE-10448  Reopen please if I have it wrong (At suggestion of our [~jerryhe])

> createEphemeralNodeAndWatch don't set watcher if the node is created successfully
> ---------------------------------------------------------------------------------
>
>                 Key: HBASE-8937
>                 URL: https://issues.apache.org/jira/browse/HBASE-8937
>             Project: HBase
>          Issue Type: Bug
>          Components: master
>            Reporter: Liu Shaohui
>            Priority: Minor
>              Labels: master, wacter
>
> CreateEphemeralNodeAndWatch in zkUtil don't set watcher if the node is created successfully.
This is not consistent with the comment and may causes the ActiveMasterManager cannot get
events that master node is deleted or changed.
> {code}
>   public static boolean createEphemeralNodeAndWatch(ZooKeeperWatcher zkw,
>       String znode, byte [] data)
>   throws KeeperException {
>     try {
>       zkw.getRecoverableZooKeeper().create(znode, data, createACL(zkw, znode),
>           CreateMode.EPHEMERAL);
>     } catch (KeeperException.NodeExistsException nee) {
>       if(!watchAndCheckExists(zkw, znode)) {
>         // It did exist but now it doesn't, try again
>         return createEphemeralNodeAndWatch(zkw, znode, data);
>       }
>       return false;
>     } catch (InterruptedException e) {
>       LOG.info("Interrupted", e);
>       Thread.currentThread().interrupt();
>     }
>     return true;
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message