This is an automated email from the ASF dual-hosted git repository.

bbeaudreault pushed a commit to branch hubspot-2
in repository https://gitbox.apache.org/repos/asf/hbase.git

commit 495f11417aeb7d20165cc63129215aa50c838036
Author: huaxiangsun <huaxiang...@apache.org>
AuthorDate: Mon Aug 1 16:42:13 2022 -0700

    HBASE-27251 Rolling back from 2.5.0-SNAPSHOT to 2.4.13 fails due to 'File 
does not exist: /hbase/MasterData/data/master/store/.initialized/.regioninfo' 
Addendum (#4665)
    
    Signed-off-by: Andrew Purtell <apurt...@apache.org>
---
 .../java/org/apache/hadoop/hbase/master/region/MasterRegion.java    | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/region/MasterRegion.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/region/MasterRegion.java
index aa356e3cd3c..e7b53a55923 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/region/MasterRegion.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/region/MasterRegion.java
@@ -212,6 +212,12 @@ public final class MasterRegion {
     FileSystem walFs, Path walRootDir, WALFactory walFactory, 
MasterRegionWALRoller walRoller,
     String serverName) throws IOException {
     Path tableDir = CommonFSUtils.getTableDir(rootDir, td.getTableName());
+    FileStatus[] nonRegionDirs = fs.listStatus(tableDir, p -> 
p.getName().startsWith("."));
+    if (nonRegionDirs.length > 0) {
+      LOG.warn("There are non-region directories under " + tableDir + ", such 
as "
+        + nonRegionDirs[0].getPath() + ", ignored");
+    }
+
     // on branch-2, the RegionInfo.isEncodedRegionName will returns true for 
.initializing and
     // .initialized, see HBASE-25368. Since RegionInfo is IA.Public, changing 
the implementation may
     // raise compatibility concerns, so here we just skip them by our own.

Reply via email to