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
This commit is contained in:
Zhihong Yu 2011-08-24 14:53:26 +00:00
parent 1c5e23f215
commit 5cae3a6b66
1 changed files with 7 additions and 2 deletions

View File

@ -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);