HBASE-16294 hbck reporting "No HDFS region dir found" for replicas

Signed-off-by: Matteo Bertozzi <matteo.berto...@cloudera.com>


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

Branch: refs/heads/branch-1
Commit: 23c5ea39bd237c2012c0c5a13951b8338dc54a8d
Parents: c80d671
Author: Umesh Agashe <uaga...@cloudera.com>
Authored: Wed Sep 21 10:05:33 2016 -0700
Committer: Matteo Bertozzi <matteo.berto...@cloudera.com>
Committed: Wed Sep 21 14:43:15 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/hbase/blob/23c5ea39/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 c115e7b..745adbf 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
@@ -1170,7 +1170,10 @@ public class HBaseFsck extends Configured implements 
Closeable {
   private void loadHdfsRegioninfo(HbckInfo hbi) throws IOException {
     Path regionDir = hbi.getHdfsRegionDir();
     if (regionDir == null) {
-      LOG.warn("No HDFS region dir found: " + hbi + " meta=" + hbi.metaEntry);
+      if (hbi.getReplicaId() == HRegionInfo.DEFAULT_REPLICA_ID) {
+        // Log warning only for default/ primary replica with no region dir
+        LOG.warn("No HDFS region dir found: " + hbi + " meta=" + 
hbi.metaEntry);
+      }
       return;
     }
 

Reply via email to