Skip to content

Commit f707c23

Browse files
author
Huaxiang Sun
committed
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
1 parent aa0fa58 commit f707c23

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/master/region/MasterRegion.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,12 @@ private static HRegion open(Configuration conf, TableDescriptor td, FileSystem f
225225
FileSystem walFs, Path walRootDir, WALFactory walFactory, MasterRegionWALRoller walRoller,
226226
String serverName) throws IOException {
227227
Path tableDir = CommonFSUtils.getTableDir(rootDir, td.getTableName());
228+
FileStatus[] nonRegionDirs = fs.listStatus(tableDir, p -> p.getName().startsWith("."));
229+
if (nonRegionDirs.length > 0) {
230+
LOG.warn("There are non-region directories under " + tableDir + ", such as " +
231+
nonRegionDirs[0].getPath() + ", ignored");
232+
}
233+
228234
// on branch-2, the RegionInfo.isEncodedRegionName will returns true for .initializing and
229235
// .initialized, see HBASE-25368. Since RegionInfo is IA.Public, changing the implementation may
230236
// raise compatibility concerns, so here we just skip them by our own.

0 commit comments

Comments
 (0)