Author: stack
Date: Mon Sep 20 22:25:54 2010
New Revision: 999143

URL: http://svn.apache.org/viewvc?rev=999143&view=rev
Log:
HBASE-3017  More log pruning

Modified:
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
    
hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java

Modified: 
hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: 
http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=999143&r1=999142&r2=999143&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java 
(original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java 
Mon Sep 20 22:25:54 2010
@@ -283,10 +283,6 @@ public class HRegion implements HeapSize
         10 * 1000);
     String encodedNameStr = this.regionInfo.getEncodedName();
     this.regiondir = getRegionDir(this.tableDir, encodedNameStr);
-    if (LOG.isDebugEnabled()) {
-      // Write out region name as string and its encoded name.
-      LOG.debug("Creating region " + this);
-    }
     long flushSize = regionInfo.getTableDesc().getMemStoreFlushSize();
     if (flushSize == HTableDescriptor.DEFAULT_MEMSTORE_FLUSH_SIZE) {
       flushSize = conf.getLong("hbase.hregion.memstore.flush.size",
@@ -295,6 +291,10 @@ public class HRegion implements HeapSize
     this.memstoreFlushSize = flushSize;
     this.blockingMemStoreSize = this.memstoreFlushSize *
       conf.getLong("hbase.hregion.memstore.block.multiplier", 2);
+    if (LOG.isDebugEnabled()) {
+      // Write out region name as string and its encoded name.
+      LOG.debug("Instantiated " + this);
+    }
   }
 
   /**
@@ -854,7 +854,7 @@ public class HRegion implements HeapSize
     }
     if (LOG.isDebugEnabled()) {
       LOG.debug("Started memstore flush for region " + this +
-        ". Current region memstore size " +
+        "; current region memstore size " +
         StringUtils.humanReadableInt(this.memstoreSize.get()) +
         ((wal != null)? "": "; wal is null, using passed sequenceid=" + 
myseqid));
     }

Modified: 
hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: 
http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=999143&r1=999142&r2=999143&view=diff
==============================================================================
--- 
hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
 (original)
+++ 
hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
 Mon Sep 20 22:25:54 2010
@@ -47,6 +47,7 @@ import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.locks.ReentrantReadWriteLock;
+import org.apache.commons.lang.StringUtils;
 
 import com.google.common.base.Function;
 import org.apache.commons.logging.Log;
@@ -431,7 +432,7 @@ public class HRegionServer implements HR
 
   private void initializeZooKeeper() throws IOException, InterruptedException {
     // open connection to zookeeper and set primary watcher
-    zooKeeper = new ZooKeeperWatcher(conf, REGIONSERVER + ":" +
+    zooKeeper = new ZooKeeperWatcher(conf, REGIONSERVER +
       serverInfo.getServerAddress().getPort(), this);
 
     this.clusterStatusTracker = new ClusterStatusTracker(this.zooKeeper, this);
@@ -2314,11 +2315,9 @@ public class HRegionServer implements HR
           }
         }
       } catch (IOException ioe) {
-        if (multi.size() == 1) {
-          throw ioe;
-        } else {
-          LOG.error("Exception found while attempting " + action.toString() +
-            " " + StringUtils.stringifyException(ioe));
+        if (multi.size() == 1) throw ioe;
+        LOG.debug("Exception processing " + 
StringUtils.abbreviate(action.toString(), 64) +
+            "; " + ioe.getMessage());
           response.add(regionName,null);
           // stop processing on this region, continue to the next.
         }


Reply via email to