HBASE-20310 Fixed false inconsistency shown by hbck -metaonly option on HBase 2

When -metaonly option is specified then tablesInfo is not populated for all 
tables from hdfs causing false inconsistency of dangling state in meta.


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

Branch: refs/heads/HBASE-19064
Commit: 199b392ec8fa1137876e2251bca566b52e426a04
Parents: 3342383
Author: Umesh Agashe <uaga...@cloudera.com>
Authored: Fri Mar 30 12:21:31 2018 -0700
Committer: Michael Stack <st...@apache.org>
Committed: Wed Apr 11 12:51:12 2018 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/199b392e/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
index 7a2bd00..fcbb032 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java
@@ -2105,7 +2105,9 @@ public class HBaseFsck extends Configured implements 
Closeable {
             errors.reportError(ERROR_CODE.ORPHAN_TABLE_STATE,
                 tableName + " unable to delete dangling table state " + 
tableState);
           }
-        } else {
+        } else if (!checkMetaOnly) {
+          // dangling table state in meta if checkMetaOnly is false. If 
checkMetaOnly is
+          // true, tableInfo will be null as tablesInfo are not polulated for 
all tables from hdfs
           errors.reportError(ERROR_CODE.ORPHAN_TABLE_STATE,
               tableName + " has dangling table state " + tableState);
         }

Reply via email to