[jira] [Commented] (HBASE-10448) ZKUtil create and watch methods don't set watch in some cases
[ https://issues.apache.org/jira/browse/HBASE-10448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13889295#comment-13889295 ] Hudson commented on HBASE-10448: FAILURE: Integrated in HBase-0.94 #1269 (See [https://builds.apache.org/job/HBase-0.94/1269/]) HBASE-10448 ZKUtil create and watch methods don't set watch in some cases. (Jerry He) (larsh: rev 1563783) * /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java ZKUtil create and watch methods don't set watch in some cases - Key: HBASE-10448 URL: https://issues.apache.org/jira/browse/HBASE-10448 Project: HBase Issue Type: Bug Components: Zookeeper Affects Versions: 0.96.0, 0.96.1.1 Reporter: Jerry He Assignee: Jerry He Fix For: 0.98.0, 0.96.2, 0.99.0, 0.94.17 Attachments: HBASE-10448-trunk.patch While using the ZKUtil methods during testing, I found that watch was not set when it should be set based on the methods and method comments: createNodeIfNotExistsAndWatch createEphemeralNodeAndWatch For example, in createNodeIfNotExistsAndWatch(): {code} public static boolean createNodeIfNotExistsAndWatch( ZooKeeperWatcher zkw, String znode, byte [] data) throws KeeperException { try { zkw.getRecoverableZooKeeper().create(znode, data, createACL(zkw, znode), CreateMode.PERSISTENT); } catch (KeeperException.NodeExistsException nee) { try { zkw.getRecoverableZooKeeper().exists(znode, zkw); } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return false; } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return true; } {code} The watch is only set via exists() call when the node already exists. Similarly in createEphemeralNodeAndWatch(): {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)
[jira] [Commented] (HBASE-10448) ZKUtil create and watch methods don't set watch in some cases
[ https://issues.apache.org/jira/browse/HBASE-10448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13889779#comment-13889779 ] Andrew Purtell commented on HBASE-10448: bq. (I hope we are not relying anywhere in the current behavior). I doubt it, but if we are that would be a bug that needs fixing anyhow. ZKUtil create and watch methods don't set watch in some cases - Key: HBASE-10448 URL: https://issues.apache.org/jira/browse/HBASE-10448 Project: HBase Issue Type: Bug Components: Zookeeper Affects Versions: 0.96.0, 0.96.1.1 Reporter: Jerry He Assignee: Jerry He Fix For: 0.98.0, 0.96.2, 0.99.0, 0.94.17 Attachments: HBASE-10448-trunk.patch While using the ZKUtil methods during testing, I found that watch was not set when it should be set based on the methods and method comments: createNodeIfNotExistsAndWatch createEphemeralNodeAndWatch For example, in createNodeIfNotExistsAndWatch(): {code} public static boolean createNodeIfNotExistsAndWatch( ZooKeeperWatcher zkw, String znode, byte [] data) throws KeeperException { try { zkw.getRecoverableZooKeeper().create(znode, data, createACL(zkw, znode), CreateMode.PERSISTENT); } catch (KeeperException.NodeExistsException nee) { try { zkw.getRecoverableZooKeeper().exists(znode, zkw); } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return false; } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return true; } {code} The watch is only set via exists() call when the node already exists. Similarly in createEphemeralNodeAndWatch(): {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)
[jira] [Commented] (HBASE-10448) ZKUtil create and watch methods don't set watch in some cases
[ https://issues.apache.org/jira/browse/HBASE-10448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=1376#comment-1376 ] Hudson commented on HBASE-10448: SUCCESS: Integrated in hbase-0.96 #276 (See [https://builds.apache.org/job/hbase-0.96/276/]) HBASE-10448 ZKUtil create and watch methods don't set watch in some cases (stack: rev 1563567) * /hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java ZKUtil create and watch methods don't set watch in some cases - Key: HBASE-10448 URL: https://issues.apache.org/jira/browse/HBASE-10448 Project: HBase Issue Type: Bug Components: Zookeeper Affects Versions: 0.96.0, 0.96.1.1 Reporter: Jerry He Assignee: Jerry He Fix For: 0.98.0, 0.96.2, 0.99.0 Attachments: HBASE-10448-trunk.patch While using the ZKUtil methods during testing, I found that watch was not set when it should be set based on the methods and method comments: createNodeIfNotExistsAndWatch createEphemeralNodeAndWatch For example, in createNodeIfNotExistsAndWatch(): {code} public static boolean createNodeIfNotExistsAndWatch( ZooKeeperWatcher zkw, String znode, byte [] data) throws KeeperException { try { zkw.getRecoverableZooKeeper().create(znode, data, createACL(zkw, znode), CreateMode.PERSISTENT); } catch (KeeperException.NodeExistsException nee) { try { zkw.getRecoverableZooKeeper().exists(znode, zkw); } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return false; } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return true; } {code} The watch is only set via exists() call when the node already exists. Similarly in createEphemeralNodeAndWatch(): {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)
[jira] [Commented] (HBASE-10448) ZKUtil create and watch methods don't set watch in some cases
[ https://issues.apache.org/jira/browse/HBASE-10448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13888917#comment-13888917 ] Hudson commented on HBASE-10448: FAILURE: Integrated in hbase-0.96-hadoop2 #190 (See [https://builds.apache.org/job/hbase-0.96-hadoop2/190/]) HBASE-10448 ZKUtil create and watch methods don't set watch in some cases (stack: rev 1563567) * /hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java ZKUtil create and watch methods don't set watch in some cases - Key: HBASE-10448 URL: https://issues.apache.org/jira/browse/HBASE-10448 Project: HBase Issue Type: Bug Components: Zookeeper Affects Versions: 0.96.0, 0.96.1.1 Reporter: Jerry He Assignee: Jerry He Fix For: 0.98.0, 0.96.2, 0.99.0 Attachments: HBASE-10448-trunk.patch While using the ZKUtil methods during testing, I found that watch was not set when it should be set based on the methods and method comments: createNodeIfNotExistsAndWatch createEphemeralNodeAndWatch For example, in createNodeIfNotExistsAndWatch(): {code} public static boolean createNodeIfNotExistsAndWatch( ZooKeeperWatcher zkw, String znode, byte [] data) throws KeeperException { try { zkw.getRecoverableZooKeeper().create(znode, data, createACL(zkw, znode), CreateMode.PERSISTENT); } catch (KeeperException.NodeExistsException nee) { try { zkw.getRecoverableZooKeeper().exists(znode, zkw); } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return false; } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return true; } {code} The watch is only set via exists() call when the node already exists. Similarly in createEphemeralNodeAndWatch(): {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)
[jira] [Commented] (HBASE-10448) ZKUtil create and watch methods don't set watch in some cases
[ https://issues.apache.org/jira/browse/HBASE-10448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13888961#comment-13888961 ] Lars Hofhansl commented on HBASE-10448: --- Lemme check if this is an issue in 0.94 as well. ZKUtil create and watch methods don't set watch in some cases - Key: HBASE-10448 URL: https://issues.apache.org/jira/browse/HBASE-10448 Project: HBase Issue Type: Bug Components: Zookeeper Affects Versions: 0.96.0, 0.96.1.1 Reporter: Jerry He Assignee: Jerry He Fix For: 0.98.0, 0.96.2, 0.99.0 Attachments: HBASE-10448-trunk.patch While using the ZKUtil methods during testing, I found that watch was not set when it should be set based on the methods and method comments: createNodeIfNotExistsAndWatch createEphemeralNodeAndWatch For example, in createNodeIfNotExistsAndWatch(): {code} public static boolean createNodeIfNotExistsAndWatch( ZooKeeperWatcher zkw, String znode, byte [] data) throws KeeperException { try { zkw.getRecoverableZooKeeper().create(znode, data, createACL(zkw, znode), CreateMode.PERSISTENT); } catch (KeeperException.NodeExistsException nee) { try { zkw.getRecoverableZooKeeper().exists(znode, zkw); } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return false; } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return true; } {code} The watch is only set via exists() call when the node already exists. Similarly in createEphemeralNodeAndWatch(): {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)
[jira] [Commented] (HBASE-10448) ZKUtil create and watch methods don't set watch in some cases
[ https://issues.apache.org/jira/browse/HBASE-10448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13889142#comment-13889142 ] Hudson commented on HBASE-10448: FAILURE: Integrated in HBase-TRUNK-on-Hadoop-1.1 #75 (See [https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-1.1/75/]) HBASE-10448 ZKUtil create and watch methods don't set watch in some cases (Jerry He) (tedyu: rev 1563507) * /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java ZKUtil create and watch methods don't set watch in some cases - Key: HBASE-10448 URL: https://issues.apache.org/jira/browse/HBASE-10448 Project: HBase Issue Type: Bug Components: Zookeeper Affects Versions: 0.96.0, 0.96.1.1 Reporter: Jerry He Assignee: Jerry He Fix For: 0.98.0, 0.96.2, 0.99.0 Attachments: HBASE-10448-trunk.patch While using the ZKUtil methods during testing, I found that watch was not set when it should be set based on the methods and method comments: createNodeIfNotExistsAndWatch createEphemeralNodeAndWatch For example, in createNodeIfNotExistsAndWatch(): {code} public static boolean createNodeIfNotExistsAndWatch( ZooKeeperWatcher zkw, String znode, byte [] data) throws KeeperException { try { zkw.getRecoverableZooKeeper().create(znode, data, createACL(zkw, znode), CreateMode.PERSISTENT); } catch (KeeperException.NodeExistsException nee) { try { zkw.getRecoverableZooKeeper().exists(znode, zkw); } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return false; } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return true; } {code} The watch is only set via exists() call when the node already exists. Similarly in createEphemeralNodeAndWatch(): {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)
[jira] [Commented] (HBASE-10448) ZKUtil create and watch methods don't set watch in some cases
[ https://issues.apache.org/jira/browse/HBASE-10448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13889240#comment-13889240 ] Lars Hofhansl commented on HBASE-10448: --- Committed to 0.94 as well. (I hope we are not relying anywhere in the current behavior). ZKUtil create and watch methods don't set watch in some cases - Key: HBASE-10448 URL: https://issues.apache.org/jira/browse/HBASE-10448 Project: HBase Issue Type: Bug Components: Zookeeper Affects Versions: 0.96.0, 0.96.1.1 Reporter: Jerry He Assignee: Jerry He Fix For: 0.98.0, 0.96.2, 0.99.0, 0.94.17 Attachments: HBASE-10448-trunk.patch While using the ZKUtil methods during testing, I found that watch was not set when it should be set based on the methods and method comments: createNodeIfNotExistsAndWatch createEphemeralNodeAndWatch For example, in createNodeIfNotExistsAndWatch(): {code} public static boolean createNodeIfNotExistsAndWatch( ZooKeeperWatcher zkw, String znode, byte [] data) throws KeeperException { try { zkw.getRecoverableZooKeeper().create(znode, data, createACL(zkw, znode), CreateMode.PERSISTENT); } catch (KeeperException.NodeExistsException nee) { try { zkw.getRecoverableZooKeeper().exists(znode, zkw); } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return false; } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return true; } {code} The watch is only set via exists() call when the node already exists. Similarly in createEphemeralNodeAndWatch(): {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)
[jira] [Commented] (HBASE-10448) ZKUtil create and watch methods don't set watch in some cases
[ https://issues.apache.org/jira/browse/HBASE-10448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13889255#comment-13889255 ] Hudson commented on HBASE-10448: FAILURE: Integrated in HBase-0.94-on-Hadoop-2 #6 (See [https://builds.apache.org/job/HBase-0.94-on-Hadoop-2/6/]) HBASE-10448 ZKUtil create and watch methods don't set watch in some cases. (Jerry He) (larsh: rev 1563783) * /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java ZKUtil create and watch methods don't set watch in some cases - Key: HBASE-10448 URL: https://issues.apache.org/jira/browse/HBASE-10448 Project: HBase Issue Type: Bug Components: Zookeeper Affects Versions: 0.96.0, 0.96.1.1 Reporter: Jerry He Assignee: Jerry He Fix For: 0.98.0, 0.96.2, 0.99.0, 0.94.17 Attachments: HBASE-10448-trunk.patch While using the ZKUtil methods during testing, I found that watch was not set when it should be set based on the methods and method comments: createNodeIfNotExistsAndWatch createEphemeralNodeAndWatch For example, in createNodeIfNotExistsAndWatch(): {code} public static boolean createNodeIfNotExistsAndWatch( ZooKeeperWatcher zkw, String znode, byte [] data) throws KeeperException { try { zkw.getRecoverableZooKeeper().create(znode, data, createACL(zkw, znode), CreateMode.PERSISTENT); } catch (KeeperException.NodeExistsException nee) { try { zkw.getRecoverableZooKeeper().exists(znode, zkw); } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return false; } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return true; } {code} The watch is only set via exists() call when the node already exists. Similarly in createEphemeralNodeAndWatch(): {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)
[jira] [Commented] (HBASE-10448) ZKUtil create and watch methods don't set watch in some cases
[ https://issues.apache.org/jira/browse/HBASE-10448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13889272#comment-13889272 ] Hudson commented on HBASE-10448: SUCCESS: Integrated in HBase-0.94-security #396 (See [https://builds.apache.org/job/HBase-0.94-security/396/]) HBASE-10448 ZKUtil create and watch methods don't set watch in some cases. (Jerry He) (larsh: rev 1563783) * /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java ZKUtil create and watch methods don't set watch in some cases - Key: HBASE-10448 URL: https://issues.apache.org/jira/browse/HBASE-10448 Project: HBase Issue Type: Bug Components: Zookeeper Affects Versions: 0.96.0, 0.96.1.1 Reporter: Jerry He Assignee: Jerry He Fix For: 0.98.0, 0.96.2, 0.99.0, 0.94.17 Attachments: HBASE-10448-trunk.patch While using the ZKUtil methods during testing, I found that watch was not set when it should be set based on the methods and method comments: createNodeIfNotExistsAndWatch createEphemeralNodeAndWatch For example, in createNodeIfNotExistsAndWatch(): {code} public static boolean createNodeIfNotExistsAndWatch( ZooKeeperWatcher zkw, String znode, byte [] data) throws KeeperException { try { zkw.getRecoverableZooKeeper().create(znode, data, createACL(zkw, znode), CreateMode.PERSISTENT); } catch (KeeperException.NodeExistsException nee) { try { zkw.getRecoverableZooKeeper().exists(znode, zkw); } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return false; } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return true; } {code} The watch is only set via exists() call when the node already exists. Similarly in createEphemeralNodeAndWatch(): {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)
[jira] [Commented] (HBASE-10448) ZKUtil create and watch methods don't set watch in some cases
[ https://issues.apache.org/jira/browse/HBASE-10448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13889283#comment-13889283 ] Hudson commented on HBASE-10448: SUCCESS: Integrated in HBase-0.94-JDK7 #35 (See [https://builds.apache.org/job/HBase-0.94-JDK7/35/]) HBASE-10448 ZKUtil create and watch methods don't set watch in some cases. (Jerry He) (larsh: rev 1563783) * /hbase/branches/0.94/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java ZKUtil create and watch methods don't set watch in some cases - Key: HBASE-10448 URL: https://issues.apache.org/jira/browse/HBASE-10448 Project: HBase Issue Type: Bug Components: Zookeeper Affects Versions: 0.96.0, 0.96.1.1 Reporter: Jerry He Assignee: Jerry He Fix For: 0.98.0, 0.96.2, 0.99.0, 0.94.17 Attachments: HBASE-10448-trunk.patch While using the ZKUtil methods during testing, I found that watch was not set when it should be set based on the methods and method comments: createNodeIfNotExistsAndWatch createEphemeralNodeAndWatch For example, in createNodeIfNotExistsAndWatch(): {code} public static boolean createNodeIfNotExistsAndWatch( ZooKeeperWatcher zkw, String znode, byte [] data) throws KeeperException { try { zkw.getRecoverableZooKeeper().create(znode, data, createACL(zkw, znode), CreateMode.PERSISTENT); } catch (KeeperException.NodeExistsException nee) { try { zkw.getRecoverableZooKeeper().exists(znode, zkw); } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return false; } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return true; } {code} The watch is only set via exists() call when the node already exists. Similarly in createEphemeralNodeAndWatch(): {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)
[jira] [Commented] (HBASE-10448) ZKUtil create and watch methods don't set watch in some cases
[ https://issues.apache.org/jira/browse/HBASE-10448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13888710#comment-13888710 ] Ted Yu commented on HBASE-10448: I tried to apply patch on 0.98 but there was conflict in hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java.rej Also, please trim the trailing ^M at line end. Thanks ZKUtil create and watch methods don't set watch in some cases - Key: HBASE-10448 URL: https://issues.apache.org/jira/browse/HBASE-10448 Project: HBase Issue Type: Bug Components: Zookeeper Affects Versions: 0.96.0, 0.96.1.1 Reporter: Jerry He Fix For: 0.98.0, 0.99.0 Attachments: HBASE-10448-trunk.patch While using the ZKUtil methods during testing, I found that watch was not set when it should be set based on the methods and method comments: createNodeIfNotExistsAndWatch createEphemeralNodeAndWatch For example, in createNodeIfNotExistsAndWatch(): {code} public static boolean createNodeIfNotExistsAndWatch( ZooKeeperWatcher zkw, String znode, byte [] data) throws KeeperException { try { zkw.getRecoverableZooKeeper().create(znode, data, createACL(zkw, znode), CreateMode.PERSISTENT); } catch (KeeperException.NodeExistsException nee) { try { zkw.getRecoverableZooKeeper().exists(znode, zkw); } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return false; } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return true; } {code} The watch is only set via exists() call when the node already exists. Similarly in createEphemeralNodeAndWatch(): {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)
[jira] [Commented] (HBASE-10448) ZKUtil create and watch methods don't set watch in some cases
[ https://issues.apache.org/jira/browse/HBASE-10448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13888790#comment-13888790 ] Hudson commented on HBASE-10448: SUCCESS: Integrated in HBase-TRUNK #4873 (See [https://builds.apache.org/job/HBase-TRUNK/4873/]) HBASE-10448 ZKUtil create and watch methods don't set watch in some cases (Jerry He) (tedyu: rev 1563507) * /hbase/trunk/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java ZKUtil create and watch methods don't set watch in some cases - Key: HBASE-10448 URL: https://issues.apache.org/jira/browse/HBASE-10448 Project: HBase Issue Type: Bug Components: Zookeeper Affects Versions: 0.96.0, 0.96.1.1 Reporter: Jerry He Assignee: Jerry He Fix For: 0.98.0, 0.99.0 Attachments: HBASE-10448-trunk.patch While using the ZKUtil methods during testing, I found that watch was not set when it should be set based on the methods and method comments: createNodeIfNotExistsAndWatch createEphemeralNodeAndWatch For example, in createNodeIfNotExistsAndWatch(): {code} public static boolean createNodeIfNotExistsAndWatch( ZooKeeperWatcher zkw, String znode, byte [] data) throws KeeperException { try { zkw.getRecoverableZooKeeper().create(znode, data, createACL(zkw, znode), CreateMode.PERSISTENT); } catch (KeeperException.NodeExistsException nee) { try { zkw.getRecoverableZooKeeper().exists(znode, zkw); } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return false; } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return true; } {code} The watch is only set via exists() call when the node already exists. Similarly in createEphemeralNodeAndWatch(): {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)
[jira] [Commented] (HBASE-10448) ZKUtil create and watch methods don't set watch in some cases
[ https://issues.apache.org/jira/browse/HBASE-10448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13888792#comment-13888792 ] Jerry He commented on HBASE-10448: -- Thanks, Ted, Andrew. Could you also mark HBASE-8937 as resolved as dup so that we have closure on that one too? ZKUtil create and watch methods don't set watch in some cases - Key: HBASE-10448 URL: https://issues.apache.org/jira/browse/HBASE-10448 Project: HBase Issue Type: Bug Components: Zookeeper Affects Versions: 0.96.0, 0.96.1.1 Reporter: Jerry He Assignee: Jerry He Fix For: 0.98.0, 0.99.0 Attachments: HBASE-10448-trunk.patch While using the ZKUtil methods during testing, I found that watch was not set when it should be set based on the methods and method comments: createNodeIfNotExistsAndWatch createEphemeralNodeAndWatch For example, in createNodeIfNotExistsAndWatch(): {code} public static boolean createNodeIfNotExistsAndWatch( ZooKeeperWatcher zkw, String znode, byte [] data) throws KeeperException { try { zkw.getRecoverableZooKeeper().create(znode, data, createACL(zkw, znode), CreateMode.PERSISTENT); } catch (KeeperException.NodeExistsException nee) { try { zkw.getRecoverableZooKeeper().exists(znode, zkw); } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return false; } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return true; } {code} The watch is only set via exists() call when the node already exists. Similarly in createEphemeralNodeAndWatch(): {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)
[jira] [Commented] (HBASE-10448) ZKUtil create and watch methods don't set watch in some cases
[ https://issues.apache.org/jira/browse/HBASE-10448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13888797#comment-13888797 ] Hudson commented on HBASE-10448: FAILURE: Integrated in HBase-0.98 #119 (See [https://builds.apache.org/job/HBase-0.98/119/]) HBASE-10448 ZKUtil create and watch methods don't set watch in some cases (Jerry He) (tedyu: rev 1563506) * /hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java ZKUtil create and watch methods don't set watch in some cases - Key: HBASE-10448 URL: https://issues.apache.org/jira/browse/HBASE-10448 Project: HBase Issue Type: Bug Components: Zookeeper Affects Versions: 0.96.0, 0.96.1.1 Reporter: Jerry He Assignee: Jerry He Fix For: 0.98.0, 0.99.0 Attachments: HBASE-10448-trunk.patch While using the ZKUtil methods during testing, I found that watch was not set when it should be set based on the methods and method comments: createNodeIfNotExistsAndWatch createEphemeralNodeAndWatch For example, in createNodeIfNotExistsAndWatch(): {code} public static boolean createNodeIfNotExistsAndWatch( ZooKeeperWatcher zkw, String znode, byte [] data) throws KeeperException { try { zkw.getRecoverableZooKeeper().create(znode, data, createACL(zkw, znode), CreateMode.PERSISTENT); } catch (KeeperException.NodeExistsException nee) { try { zkw.getRecoverableZooKeeper().exists(znode, zkw); } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return false; } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return true; } {code} The watch is only set via exists() call when the node already exists. Similarly in createEphemeralNodeAndWatch(): {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)
[jira] [Commented] (HBASE-10448) ZKUtil create and watch methods don't set watch in some cases
[ https://issues.apache.org/jira/browse/HBASE-10448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=1300#comment-1300 ] Hudson commented on HBASE-10448: FAILURE: Integrated in HBase-0.98-on-Hadoop-1.1 #111 (See [https://builds.apache.org/job/HBase-0.98-on-Hadoop-1.1/111/]) HBASE-10448 ZKUtil create and watch methods don't set watch in some cases (Jerry He) (tedyu: rev 1563506) * /hbase/branches/0.98/hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java ZKUtil create and watch methods don't set watch in some cases - Key: HBASE-10448 URL: https://issues.apache.org/jira/browse/HBASE-10448 Project: HBase Issue Type: Bug Components: Zookeeper Affects Versions: 0.96.0, 0.96.1.1 Reporter: Jerry He Assignee: Jerry He Fix For: 0.98.0, 0.99.0 Attachments: HBASE-10448-trunk.patch While using the ZKUtil methods during testing, I found that watch was not set when it should be set based on the methods and method comments: createNodeIfNotExistsAndWatch createEphemeralNodeAndWatch For example, in createNodeIfNotExistsAndWatch(): {code} public static boolean createNodeIfNotExistsAndWatch( ZooKeeperWatcher zkw, String znode, byte [] data) throws KeeperException { try { zkw.getRecoverableZooKeeper().create(znode, data, createACL(zkw, znode), CreateMode.PERSISTENT); } catch (KeeperException.NodeExistsException nee) { try { zkw.getRecoverableZooKeeper().exists(znode, zkw); } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return false; } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return true; } {code} The watch is only set via exists() call when the node already exists. Similarly in createEphemeralNodeAndWatch(): {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)
[jira] [Commented] (HBASE-10448) ZKUtil create and watch methods don't set watch in some cases
[ https://issues.apache.org/jira/browse/HBASE-10448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13888016#comment-13888016 ] Jerry He commented on HBASE-10448: -- I wonder how the callers/users of these 2 methods actually worked. A guess is that they don't really depend on the watches being set in the cases that the watches are not set. ZKUtil create and watch methods don't set watch in some cases - Key: HBASE-10448 URL: https://issues.apache.org/jira/browse/HBASE-10448 Project: HBase Issue Type: Bug Components: Zookeeper Affects Versions: 0.96.0, 0.96.1.1 Reporter: Jerry He Fix For: 0.98.1 While using the ZKUtil methods during testing, I found that watch was not set when it should be set based on the methods and method comments: createNodeIfNotExistsAndWatch createEphemeralNodeAndWatch For example, in createNodeIfNotExistsAndWatch(): {code} public static boolean createNodeIfNotExistsAndWatch( ZooKeeperWatcher zkw, String znode, byte [] data) throws KeeperException { try { zkw.getRecoverableZooKeeper().create(znode, data, createACL(zkw, znode), CreateMode.PERSISTENT); } catch (KeeperException.NodeExistsException nee) { try { zkw.getRecoverableZooKeeper().exists(znode, zkw); } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return false; } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return true; } {code} The watch is only set via exists() call when the node already exists. Similarly in createEphemeralNodeAndWatch(): {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)
[jira] [Commented] (HBASE-10448) ZKUtil create and watch methods don't set watch in some cases
[ https://issues.apache.org/jira/browse/HBASE-10448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13888441#comment-13888441 ] Jerry He commented on HBASE-10448: -- Found this HBASE-8937 that reported similar problem. ZKUtil create and watch methods don't set watch in some cases - Key: HBASE-10448 URL: https://issues.apache.org/jira/browse/HBASE-10448 Project: HBase Issue Type: Bug Components: Zookeeper Affects Versions: 0.96.0, 0.96.1.1 Reporter: Jerry He Fix For: 0.98.1 While using the ZKUtil methods during testing, I found that watch was not set when it should be set based on the methods and method comments: createNodeIfNotExistsAndWatch createEphemeralNodeAndWatch For example, in createNodeIfNotExistsAndWatch(): {code} public static boolean createNodeIfNotExistsAndWatch( ZooKeeperWatcher zkw, String znode, byte [] data) throws KeeperException { try { zkw.getRecoverableZooKeeper().create(znode, data, createACL(zkw, znode), CreateMode.PERSISTENT); } catch (KeeperException.NodeExistsException nee) { try { zkw.getRecoverableZooKeeper().exists(znode, zkw); } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return false; } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return true; } {code} The watch is only set via exists() call when the node already exists. Similarly in createEphemeralNodeAndWatch(): {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)
[jira] [Commented] (HBASE-10448) ZKUtil create and watch methods don't set watch in some cases
[ https://issues.apache.org/jira/browse/HBASE-10448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13888455#comment-13888455 ] Jerry He commented on HBASE-10448: -- Attached a patch that set the watch whether or not we get NodeExistsException. I tried to avoid any other change in behavior of these two methods. ZKUtil create and watch methods don't set watch in some cases - Key: HBASE-10448 URL: https://issues.apache.org/jira/browse/HBASE-10448 Project: HBase Issue Type: Bug Components: Zookeeper Affects Versions: 0.96.0, 0.96.1.1 Reporter: Jerry He Fix For: 0.98.1 Attachments: HBASE-10448-trunk.patch While using the ZKUtil methods during testing, I found that watch was not set when it should be set based on the methods and method comments: createNodeIfNotExistsAndWatch createEphemeralNodeAndWatch For example, in createNodeIfNotExistsAndWatch(): {code} public static boolean createNodeIfNotExistsAndWatch( ZooKeeperWatcher zkw, String znode, byte [] data) throws KeeperException { try { zkw.getRecoverableZooKeeper().create(znode, data, createACL(zkw, znode), CreateMode.PERSISTENT); } catch (KeeperException.NodeExistsException nee) { try { zkw.getRecoverableZooKeeper().exists(znode, zkw); } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return false; } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return true; } {code} The watch is only set via exists() call when the node already exists. Similarly in createEphemeralNodeAndWatch(): {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)
[jira] [Commented] (HBASE-10448) ZKUtil create and watch methods don't set watch in some cases
[ https://issues.apache.org/jira/browse/HBASE-10448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13888471#comment-13888471 ] Hadoop QA commented on HBASE-10448: --- {color:red}-1 overall{color}. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12626450/HBASE-10448-trunk.patch against trunk revision . ATTACHMENT ID: 12626450 {color:green}+1 @author{color}. The patch does not contain any @author tags. {color:red}-1 tests included{color}. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. {color:green}+1 hadoop1.0{color}. The patch compiles against the hadoop 1.0 profile. {color:green}+1 hadoop1.1{color}. The patch compiles against the hadoop 1.1 profile. {color:green}+1 javadoc{color}. The javadoc tool did not generate any warning messages. {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 findbugs{color}. The patch does not introduce any new Findbugs (version 1.3.9) warnings. {color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings. {color:green}+1 lineLengths{color}. The patch does not introduce lines longer than 100 {color:green}+1 site{color}. The mvn site goal succeeds with this patch. {color:red}-1 core tests{color}. The patch failed these unit tests: {color:red}-1 core zombie tests{color}. There are 1 zombie test(s): at org.apache.hadoop.hbase.io.encoding.TestEncodedSeekers.testEncodedSeeker(TestEncodedSeekers.java:125) Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/8570//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8570//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8570//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8570//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-client.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8570//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8570//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-protocol.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8570//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8570//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-examples.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8570//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-thrift.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/8570//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/8570//console This message is automatically generated. ZKUtil create and watch methods don't set watch in some cases - Key: HBASE-10448 URL: https://issues.apache.org/jira/browse/HBASE-10448 Project: HBase Issue Type: Bug Components: Zookeeper Affects Versions: 0.96.0, 0.96.1.1 Reporter: Jerry He Fix For: 0.98.1 Attachments: HBASE-10448-trunk.patch While using the ZKUtil methods during testing, I found that watch was not set when it should be set based on the methods and method comments: createNodeIfNotExistsAndWatch createEphemeralNodeAndWatch For example, in createNodeIfNotExistsAndWatch(): {code} public static boolean createNodeIfNotExistsAndWatch( ZooKeeperWatcher zkw, String znode, byte [] data) throws KeeperException { try { zkw.getRecoverableZooKeeper().create(znode, data, createACL(zkw, znode), CreateMode.PERSISTENT); } catch (KeeperException.NodeExistsException nee) { try { zkw.getRecoverableZooKeeper().exists(znode, zkw); } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return false; } catch (InterruptedException e) { zkw.interruptedException(e); return false; } return true; } {code} The watch is only set via exists() call when the node already exists. Similarly in createEphemeralNodeAndWatch():