hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r1041563 - /hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Date Thu, 02 Dec 2010 20:09:54 GMT
Author: stack
Date: Thu Dec  2 20:09:53 2010
New Revision: 1041563

URL: http://svn.apache.org/viewvc?rev=1041563&view=rev
Log:
Print out regions we're watiing on when going down

Modified:
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1041563&r1=1041562&r2=1041563&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
(original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Thu Dec  2 20:09:53 2010
@@ -549,6 +549,8 @@ public class HRegionServer implements HR
           } else if (!this.stopping) {
             this.stopping = true;
             closeUserRegions(this.abortRequested);
+          } else if (this.stopping && LOG.isDebugEnabled()) {
+            LOG.debug("Waiting on " + getOnlineRegionsAsPrintableString());
           }
         }
         long now = System.currentTimeMillis();
@@ -652,6 +654,17 @@ public class HRegionServer implements HR
     LOG.info(Thread.currentThread().getName() + " exiting");
   }
 
+  String getOnlineRegionsAsPrintableString() {
+    StringBuilder sb = new StringBuilder();
+    synchronized (this.onlineRegions) {
+      for (HRegion r: this.onlineRegions.values()) {
+        if (sb.length() > 0) sb.append(", ");
+        sb.append(r.getRegionInfo().getEncodedName());
+      }
+    }
+    return sb.toString();
+  }
+
   /**
    * Wait on regions close.
    */



Mime
View raw message