hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ecl...@apache.org
Subject [37/50] [abbrv] git commit: [HBASE-11454] HBCK shouldn't check meta and root region info against meta
Date Thu, 31 Jul 2014 22:08:13 GMT
[HBASE-11454] HBCK shouldn't check meta and root region info against meta

Summary: Meta doesn't contain region info for META and ROOT so the on disk region info can't
be checked agains the meta one.

Test Plan: beholdunittests

Reviewers: pwhite, manukranthk, yuq

Reviewed By: yuq

Subscribers: hbase-eng@

Differential Revision: https://phabricator.fb.com/D1415290

git-svn-id: svn+ssh://tubbs/svnhive/hadoop/branches/titan/VENDOR.hbase/hbase-trunk@43275 e7acf4d4-3532-417f-9e73-7a9ae25a1f51


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

Branch: refs/heads/0.89-fb
Commit: 797de59a219c76475867e42ffea4f324e0f15c08
Parents: 153336f
Author: elliott <elliott@e7acf4d4-3532-417f-9e73-7a9ae25a1f51>
Authored: Wed Jul 2 06:32:07 2014 +0000
Committer: Elliott Clark <elliott@fb.com>
Committed: Thu Jul 31 14:44:24 2014 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/client/HBaseFsck.java  |  3 +++
 .../org/apache/hadoop/hbase/client/TestHBaseFsck.java   | 12 ++++++++++++
 2 files changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/797de59a/src/main/java/org/apache/hadoop/hbase/client/HBaseFsck.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/hadoop/hbase/client/HBaseFsck.java b/src/main/java/org/apache/hadoop/hbase/client/HBaseFsck.java
index 6228151..659c8a3 100644
--- a/src/main/java/org/apache/hadoop/hbase/client/HBaseFsck.java
+++ b/src/main/java/org/apache/hadoop/hbase/client/HBaseFsck.java
@@ -267,6 +267,9 @@ public class HBaseFsck {
 
     try {
       for (HbckInfo hbi : regionInfo.values()) {
+        if (hbi.metaEntry.getTableDesc().isMetaTable()) {
+          continue;
+        }
         tableDir = HTableDescriptor.getTableDir(FSUtils.getRootDir(conf),
             hbi.metaEntry.getTableDesc().getName());
 

http://git-wip-us.apache.org/repos/asf/hbase/blob/797de59a/src/test/java/org/apache/hadoop/hbase/client/TestHBaseFsck.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/hadoop/hbase/client/TestHBaseFsck.java b/src/test/java/org/apache/hadoop/hbase/client/TestHBaseFsck.java
index 16957d9..c34bc2b 100644
--- a/src/test/java/org/apache/hadoop/hbase/client/TestHBaseFsck.java
+++ b/src/test/java/org/apache/hadoop/hbase/client/TestHBaseFsck.java
@@ -74,6 +74,18 @@ public class TestHBaseFsck {
 
 
   @Test
+  public void testCheckRegionInfo() throws Exception {
+    HTableDescriptor desc = new HTableDescriptor("testCheckRegionInfo");
+    desc.addFamily(new HColumnDescriptor(Bytes.toBytes("D")));
+    admin.createTable(desc);
+    HBaseFsck fsck = new HBaseFsck(TEST_UTIL.getConfiguration());
+    Map<HRegionInfo, Path> result = fsck.checkRegionInfo();
+
+    assertEquals(0, result.size());
+  }
+
+
+  @Test
   public void testFindMultipleHoles() throws IOException, InterruptedException {
 
     byte[] tableName = Bytes.toBytes("testCreateTableWithRegions");


Mime
View raw message