hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apurt...@apache.org
Subject hbase git commit: HBASE-12793 [hbck] closeRegionSilentlyAndWait() should log cause of IOException and retry until hbase.hbck.close.timeout expires
Date Thu, 15 Jan 2015 17:31:27 GMT
Repository: hbase
Updated Branches:
  refs/heads/0.98 6314063e7 -> 98426a9f3


HBASE-12793 [hbck] closeRegionSilentlyAndWait() should log cause of IOException and retry
until hbase.hbck.close.timeout expires

Signed-off-by: Andrew Purtell <apurtell@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/98426a9f
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/98426a9f
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/98426a9f

Branch: refs/heads/0.98
Commit: 98426a9f3a39f0dc277be4c2d7ceb905ff785619
Parents: 6314063
Author: Esteban Gutierrez <esteban@cloudera.com>
Authored: Thu Jan 15 09:25:18 2015 -0800
Committer: Andrew Purtell <apurtell@apache.org>
Committed: Thu Jan 15 09:25:18 2015 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/hadoop/hbase/util/HBaseFsckRepair.java | 5 ++++-
 .../test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java   | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/98426a9f/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsckRepair.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsckRepair.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsckRepair.java
index 5ed757a..25b9673 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsckRepair.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsckRepair.java
@@ -29,6 +29,7 @@ import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.NotServingRegionException;
 import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.ZooKeeperConnectionException;
@@ -161,7 +162,9 @@ public class HBaseFsckRepair {
           ProtobufUtil.getRegionInfo(rs, region.getRegionName());
         if (rsRegion == null) return;
       } catch (IOException ioe) {
-        return;
+        if (ioe instanceof NotServingRegionException) // no need to retry again
+          return;
+        LOG.warn("Exception when retrieving regioninfo from: " + region.getRegionNameAsString(),
ioe);
       }
       Thread.sleep(1000);
     }

http://git-wip-us.apache.org/repos/asf/hbase/blob/98426a9f/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java
index b34b3b6..a4084ea 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsck.java
@@ -140,6 +140,7 @@ public class TestHBaseFsck {
   public static void setUpBeforeClass() throws Exception {
     TEST_UTIL.getConfiguration().setInt("hbase.regionserver.handler.count", 2);
     TEST_UTIL.getConfiguration().setInt("hbase.regionserver.metahandler.count", 2);
+    TEST_UTIL.getConfiguration().setInt("hbase.hbck.close.timeout", 2 * REGION_ONLINE_TIMEOUT);
     TEST_UTIL.startMiniCluster(3);
     TEST_UTIL.setHDFSClientRetry(0);
 


Mime
View raw message