From 44eab92141c9e984da26bbad393a5ae03f149a7f Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Fri, 5 Nov 2010 20:12:00 +0000 Subject: [PATCH] HBASE-3200 Make is so can disable DEBUG logging on HConnectionImplemenation without losing important messages git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1031767 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 2 ++ conf/log4j.properties | 3 +++ .../org/apache/hadoop/hbase/client/HConnectionManager.java | 6 +++--- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 16b2cc895f2..8e7070093ec 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1103,6 +1103,8 @@ Release 0.21.0 - Unreleased HBASE-3189 Stagger Major Compactions (Nicolas Spiegelberg via Stack) HBASE-2564 [rest] Tests use deprecated foundation HBASE-2819 hbck should have the ability to repair basic problems + HBASE-3200 Make is so can disable DEBUG logging on HConnectionImplemenation + without losing important messages NEW FEATURES HBASE-1961 HBase EC2 scripts diff --git a/conf/log4j.properties b/conf/log4j.properties index 62b55211383..8d8ef8279cb 100644 --- a/conf/log4j.properties +++ b/conf/log4j.properties @@ -48,3 +48,6 @@ log4j.logger.org.apache.hadoop.hbase.zookeeper.ZKUtil=INFO log4j.logger.org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher=INFO #log4j.logger.org.apache.hadoop.dfs=DEBUG # Set this class to log INFO only otherwise its OTT + +# Uncomment this if you want to remove logging of client region caching' messages +# log4j.logger.org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation=INFO diff --git a/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java b/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java index 630770d34a4..1748a4f3ffe 100644 --- a/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java +++ b/src/main/java/org/apache/hadoop/hbase/client/HConnectionManager.java @@ -876,8 +876,8 @@ public class HConnectionManager { HRegionLocation rl = getCachedLocation(tableName, row); if (rl != null) { tableLocations.remove(rl.getRegionInfo().getStartKey()); - if (LOG.isDebugEnabled()) { - LOG.debug("Removed " + + if (LOG.isInfoEnabled()) { + LOG.info("Removed " + rl.getRegionInfo().getRegionNameAsString() + " for tableName=" + Bytes.toString(tableName) + " from cache " + "because of " + Bytes.toStringBinary(row)); @@ -1075,7 +1075,7 @@ public class HConnectionManager { } } if (this.zooKeeper != null) { - LOG.debug("Closed zookeeper sessionid=0x" + + LOG.info("Closed zookeeper sessionid=0x" + Long.toHexString(this.zooKeeper.getZooKeeper().getSessionId())); this.zooKeeper.close(); this.zooKeeper = null;