hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anoopsamj...@apache.org
Subject svn commit: r1550880 - in /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver: HRegion.java handler/OpenRegionHandler.java
Date Sat, 14 Dec 2013 05:35:40 GMT
Author: anoopsamjohn
Date: Sat Dec 14 05:35:39 2013
New Revision: 1550880

URL: http://svn.apache.org/r1550880
Log:
HBASE-10155 HRegion isRecovering state is wrongly coming in postOpen hook

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java?rev=1550880&r1=1550879&r2=1550880&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
Sat Dec 14 05:35:39 2013
@@ -543,6 +543,13 @@ public class HRegion implements HeapSize
       this.coprocessorHost = new RegionCoprocessorHost(this, rsServices, conf);
       this.metricsRegionWrapper = new MetricsRegionWrapperImpl(this);
       this.metricsRegion = new MetricsRegion(this.metricsRegionWrapper);
+
+      Map<String, HRegion> recoveringRegions = rsServices.getRecoveringRegions();
+      String encodedName = getRegionInfo().getEncodedName();
+      if (recoveringRegions != null && recoveringRegions.containsKey(encodedName))
{
+        this.isRecovering = true;
+        recoveringRegions.put(encodedName, this);
+      }
     } else {
       this.metricsRegionWrapper = null;
       this.metricsRegion = null;

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java?rev=1550880&r1=1550879&r2=1550880&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java
Sat Dec 14 05:35:39 2013
@@ -19,7 +19,6 @@
 package org.apache.hadoop.hbase.regionserver.handler;
 
 import java.io.IOException;
-import java.util.Map;
 import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.commons.logging.Log;
@@ -142,15 +141,6 @@ public class OpenRegionHandler extends E
         return;
       }
 
-      // check if we need set current region in recovering state
-      region.setRecovering(false);
-      Map<String, HRegion> recoveringRegions = this.rsServices.getRecoveringRegions();
-      if (recoveringRegions != null && !recoveringRegions.isEmpty()
-          && recoveringRegions.containsKey(region.getRegionInfo().getEncodedName()))
{
-        region.setRecovering(true);
-        recoveringRegions.put(region.getRegionInfo().getEncodedName(), region);
-      }
-
       boolean failed = true;
       if (tickleOpening("post_region_open")) {
         if (updateMeta(region)) {



Mime
View raw message