ACCUMULO-2334 Use the ZooReaderWriter exists() and make a slightly better comment.
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/fafa4296 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/fafa4296 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/fafa4296 Branch: refs/heads/1.6.0-SNAPSHOT Commit: fafa42961be8c6f457c5519852b398c488654980 Parents: fd31595 Author: Josh Elser <els...@apache.org> Authored: Tue Feb 11 12:05:01 2014 -0500 Committer: Josh Elser <els...@apache.org> Committed: Tue Feb 11 12:05:01 2014 -0500 ---------------------------------------------------------------------- .../org/apache/accumulo/server/watcher/MonitorLog4jWatcher.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/fafa4296/server/src/main/java/org/apache/accumulo/server/watcher/MonitorLog4jWatcher.java ---------------------------------------------------------------------- diff --git a/server/src/main/java/org/apache/accumulo/server/watcher/MonitorLog4jWatcher.java b/server/src/main/java/org/apache/accumulo/server/watcher/MonitorLog4jWatcher.java index c0cef08..d0ca27f 100644 --- a/server/src/main/java/org/apache/accumulo/server/watcher/MonitorLog4jWatcher.java +++ b/server/src/main/java/org/apache/accumulo/server/watcher/MonitorLog4jWatcher.java @@ -60,7 +60,7 @@ public class MonitorLog4jWatcher extends FileWatchdog implements Watcher { public void run() { try { // Initially set the logger if the Monitor's log4j advertisement node exists - if (ZooReaderWriter.getInstance().getZooKeeper().exists(path, this) != null) + if (ZooReaderWriter.getInstance().exists(path, this)) updateMonitorLog4jLocation(); log.info("Set watch for Monitor Log4j watcher"); } catch (Exception e) { @@ -73,7 +73,7 @@ public class MonitorLog4jWatcher extends FileWatchdog implements Watcher { @Override protected void doOnChange() { // this method gets called in the parent class' constructor - // I'm not sure of a better way to get around this. final helps though. + // I'm not sure of a better way to get around this. The final modifier helps though. if (null == lock) { resetLogger(); return;