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

Branch: refs/heads/hbase-14439
Commit: 6a4c292a901386fd0b8c800f00a05572f0cb5cb5
Parents: b6b01a7
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:40:43 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/6a4c292a/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 6a56f8e..a1a6099 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
@@ -1159,7 +1159,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