hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r730018 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/master/RegionManager.java
Date Mon, 29 Dec 2008 23:57:29 GMT
Author: stack
Date: Mon Dec 29 15:57:29 2008
New Revision: 730018

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

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

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=730018&r1=730017&r2=730018&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Mon Dec 29 15:57:29 2008
@@ -118,6 +118,8 @@
    HBASE-543,  HBASE-1046, HBase-1051 A region's state is kept in several places
                in the master opening the possibility for race conditions
    HBASE-1072  Change Thread.join on exit to a timed Thread.join
+   HBASE-1098  IllegalStateException: Cannot set a region to be closed it it
+               was not already marked as closing
 
   IMPROVEMENTS
    HBASE-901   Add a limit to key length, check key and value length on client side

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=730018&r1=730017&r2=730018&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 Mon Dec
29 15:57:29 2008
@@ -801,8 +801,8 @@
         return;
       }
       s = new RegionState(regionInfo);
-      regionsInTransition.put(regionInfo.getRegionName(), s);
       s.setClosing(serverName, setOffline);
+      regionsInTransition.put(regionInfo.getRegionName(), s);
     }
   }
   
@@ -1004,18 +1004,23 @@
     }
   }
   
+  /*
+   * State of a Region.
+   * Used while regions are making transitions from unassigned to assigned to
+   * opened, etc.
+   */
   private static class RegionState implements Comparable<RegionState> {
-    private final byte[] regionName;
+    private final byte [] regionName;
     private HRegionInfo regionInfo = null;
-    private boolean unassigned = false;
-    private boolean assigned = false;
-    private boolean pending = false;
-    private boolean closing = false;
-    private boolean closed = false;
-    private boolean offlined = false;
+    private volatile boolean unassigned = false;
+    private volatile boolean assigned = false;
+    private volatile boolean pending = false;
+    private volatile boolean closing = false;
+    private volatile boolean closed = false;
+    private volatile boolean offlined = false;
     private String serverName = null;
     
-    RegionState(byte[] regionName) {
+    RegionState(byte [] regionName) {
       this.regionName = regionName;
     }
     



Mime
View raw message