From 5cae3a6b668be415c9ad0daf6b0e8c936a55cd3f Mon Sep 17 00:00:00 2001 From: Zhihong Yu Date: Wed, 24 Aug 2011 14:53:26 +0000 Subject: [PATCH] HBASE-4138 Change debug log in ZKUtil.watchAndCheckExists() git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1161136 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java b/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java index f237d3c4c5e..699a5f559ec 100644 --- a/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java +++ b/src/main/java/org/apache/hadoop/hbase/zookeeper/ZKUtil.java @@ -219,8 +219,13 @@ public class ZKUtil { throws KeeperException { try { Stat s = zkw.getRecoverableZooKeeper().exists(znode, zkw); - LOG.debug(zkw.prefix("Set watcher on existing znode " + znode)); - return s != null ? true : false; + boolean exists = s != null ? true : false; + if (exists) { + LOG.debug(zkw.prefix("Set watcher on existing znode " + znode)); + } else { + LOG.debug(zkw.prefix(znode+" does not exist. Watcher is set.")); + } + return exists; } catch (KeeperException e) { LOG.warn(zkw.prefix("Unable to set watcher on znode " + znode), e); zkw.keeperException(e);