hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Liu Shaohui (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-8937) createEphemeralNodeAndWatch don't set watcher if the node is created successfully
Date Fri, 12 Jul 2013 04:25:49 GMT
Liu Shaohui created HBASE-8937:
----------------------------------

             Summary: 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
            Reporter: Liu Shaohui
            Priority: Minor


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.

{quote}
  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;
  }
{quote}




--
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

Mime
View raw message