hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r640625 - in /hadoop/hbase/trunk: CHANGES.txt src/java/org/apache/hadoop/hbase/master/RegionManager.java src/java/org/apache/hadoop/hbase/master/ServerManager.java src/java/org/apache/hadoop/hbase/regionserver/HStore.java
Date Mon, 24 Mar 2008 22:42:26 GMT
Author: stack
Date: Mon Mar 24 15:42:14 2008
New Revision: 640625

URL: http://svn.apache.org/viewvc?rev=640625&view=rev
Log:
HBASE-534  Double-assignment at SPLIT-time

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

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=640625&r1=640624&r2=640625&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Mon Mar 24 15:42:14 2008
@@ -54,6 +54,7 @@
                files (Clint Morgan via Jim Kellerman)
    HBASE-527   RegexpRowFilter does not work when there are columns from 
                multiple families (Clint Morgan via Jim Kellerman)
+   HBASE-534   Double-assignment at SPLIT-time
       
   IMPROVEMENTS
    HBASE-415   Rewrite leases to use DelayedBlockingQueue instead of polling

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=640625&r1=640624&r2=640625&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 Mar
24 15:42:14 2008
@@ -473,7 +473,12 @@
   
   /** Set a region to unassigned */
   public void setUnassigned(HRegionInfo info) {
-    unassignedRegions.put(info, ZERO_L);
+    synchronized(this.unassignedRegions) {
+      if (!this.unassignedRegions.containsKey(info) &&
+          !this.pendingRegions.contains(info.getRegionName())) {
+        this.unassignedRegions.put(info, ZERO_L);
+      }
+    }
   }
   
   /** Set a region to pending assignment */

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/ServerManager.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/ServerManager.java?rev=640625&r1=640624&r2=640625&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/ServerManager.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/master/ServerManager.java Mon Mar
24 15:42:14 2008
@@ -409,7 +409,7 @@
     HRegionInfo newRegionB = splitB.getRegionInfo();
     master.regionManager.setUnassigned(newRegionB);
 
-    LOG.info("region " + region.getRegionName() + " split. New regions are: " +
+    LOG.info("Region " + region.getRegionName() + " split; new regions: " +
       newRegionA.getRegionName() + ", " + newRegionB.getRegionName());
 
     if (region.isMetaTable()) {
@@ -418,7 +418,7 @@
       master.regionManager.incrementNumMetaRegions();
     }
   }
-  
+
   /** Region server is reporting that a region is now opened */
   private void processRegionOpen(String serverName, HServerInfo serverInfo, 
     HRegionInfo region, ArrayList<HMsg> returnMsgs) 

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HStore.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HStore.java?rev=640625&r1=640624&r2=640625&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HStore.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/regionserver/HStore.java Mon Mar 24
15:42:14 2008
@@ -783,9 +783,10 @@
         // Add info about which file threw exception. It may not be in the
         // exception message so output a message here where we know the
         // culprit.
-        LOG.warn("Failed with " + e.toString() + ": " + hsf.toString() +
-          (hsf.isReference() ? " " + hsf.getReference().toString() : "") +
-          " for " + this.storeName);
+        LOG.warn("Failed with " + e.toString() + ": HStoreFile=" +
+          hsf.toString() + (hsf.isReference()? ", Reference=" +
+          hsf.getReference().toString() : "") + " for Store=" +
+          this.storeName);
         closeCompactionReaders(rdrs);
         throw e;
       }



Mime
View raw message