hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-12793 [hbck] closeRegionSilentlyAndWait() should log cause of IOException and retry until hbase.hbck.close.timeout expires (Esteban)
Date Mon, 05 Jan 2015 23:06:37 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 f9873622b -> 071c3026f


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


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

Branch: refs/heads/branch-1
Commit: 071c3026f0325fc75d46e56cb2c6b569d7a374c9
Parents: f987362
Author: tedyu <yuzhihong@gmail.com>
Authored: Mon Jan 5 15:06:28 2015 -0800
Committer: tedyu <yuzhihong@gmail.com>
Committed: Mon Jan 5 15:06:28 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/071c3026/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 4a8dd28..d98f409 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
@@ -25,6 +25,7 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.HRegionInfo;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.MetaTableAccessor;
+import org.apache.hadoop.hbase.NotServingRegionException;
 import org.apache.hadoop.hbase.ServerName;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.ZooKeeperConnectionException;
@@ -166,7 +167,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/071c3026/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 7cb016c..604982c 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
@@ -151,6 +151,7 @@ public class TestHBaseFsck {
     conf.setInt("hbase.htable.threads.max", POOL_SIZE);
     conf.setInt("hbase.hconnection.threads.max", 2 * POOL_SIZE);
     conf.setInt("hbase.hconnection.threads.core", POOL_SIZE);
+    conf.setInt("hbase.hbck.close.timeout", 2 * REGION_ONLINE_TIMEOUT);
     TEST_UTIL.startMiniCluster(3);
 
     tableExecutorService = new ThreadPoolExecutor(1, POOL_SIZE, 60, TimeUnit.SECONDS,


Mime
View raw message