Repository: hbase
Updated Branches:
  refs/heads/branch-2 f3089704d -> 0773209dd


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/0773209d
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/0773209d
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/0773209d

Branch: refs/heads/branch-2
Commit: 0773209dd3c40e8337ff48834a725aa24f20e21e
Parents: f308970
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:50:55 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/0773209d/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 d11cd7e..46eb2da 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