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

Branch: refs/heads/branch-1.2
Commit: c665424540afd0c771ac01fda8beac0a36949c1f
Parents: 2f0a006
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:25:22 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/c6654245/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 6797e1a..c1778f7 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
@@ -1095,7 +1095,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