hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r730232 - in /hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master: HMaster.java RegionManager.java
Date Tue, 30 Dec 2008 20:35:20 GMT
Author: stack
Date: Tue Dec 30 12:35:20 2008
New Revision: 730232

URL: http://svn.apache.org/viewvc?rev=730232&view=rev
Log:
HBASE-1098  IllegalStateException: Cannot set a region to be closed it it was not already
marked as closing; debugging patch

Modified:
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/HMaster.java
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/RegionManager.java

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/HMaster.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/HMaster.java?rev=730232&r1=730231&r2=730232&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/HMaster.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/HMaster.java Tue Dec 30 12:35:20
2008
@@ -420,7 +420,7 @@
     
     try {
       if (LOG.isDebugEnabled()) {
-        LOG.debug("Main processing loop: " + op.toString());
+        LOG.debug("Processing todo: " + op.toString());
       }
       
       // perform the operation. 

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/RegionManager.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/RegionManager.java?rev=730232&r1=730231&r2=730232&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/RegionManager.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/RegionManager.java Tue Dec
30 12:35:20 2008
@@ -1073,8 +1073,8 @@
     synchronized void setAssigned(String serverName) {
       if (!this.unassigned) {
         throw new IllegalStateException(
-            "Cannot assign a region that is not currently unassigned. Region: " +
-            Bytes.toString(regionName));
+            "Cannot assign a region that is not currently unassigned. " +
+            "State: " + toString());
       }
       this.unassigned = false;
       this.assigned = true;
@@ -1090,8 +1090,8 @@
     synchronized void setPending() {
       if (!assigned) {
         throw new IllegalStateException(
-            "Cannot set a region as pending if it has not been assigned. Region: " +
-            Bytes.toString(regionName));
+            "Cannot set a region as pending if it has not been assigned. " +
+            "State: " + toString());
       }
       this.unassigned = false;
       this.assigned = false;
@@ -1120,8 +1120,9 @@
       if (!closing) {
         throw new IllegalStateException(
             "Cannot set a region to be closed if it was not already marked as" +
-            " closing. Region: " + Bytes.toString(regionName));
+            " closing. State: " + toString());
       }
+      this.closing = false;
       this.closed = true;
     }
     
@@ -1131,10 +1132,10 @@
 
     @Override
     public synchronized String toString() {
-      return "region name: " + Bytes.toString(this.regionName) +
-          ", isUnassigned: " + this.unassigned + ", isAssigned: " +
-          this.assigned + ", isPending: " + this.pending + ", isClosing: " +
-          this.closing + ", isClosed: " + this.closed + ", isOfflined: " +
+      return "name=" + Bytes.toString(this.regionName) +
+          ", isUnassigned=" + this.unassigned + ", isAssigned=" +
+          this.assigned + ", isPending=" + this.pending + ", isClosing=" +
+          this.closing + ", isClosed=" + this.closed + ", isOfflined=" +
           this.offlined;
     }
     
@@ -1156,4 +1157,4 @@
       return Bytes.compareTo(this.regionName, o.getRegionName());
     }
   }
-}
+}
\ No newline at end of file



Mime
View raw message