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 <apurtell@apache.org>
This commit is contained in:
parent
4742658551
commit
495f11417a
|
@ -212,6 +212,12 @@ public final class MasterRegion {
|
||||||
FileSystem walFs, Path walRootDir, WALFactory walFactory, MasterRegionWALRoller walRoller,
|
FileSystem walFs, Path walRootDir, WALFactory walFactory, MasterRegionWALRoller walRoller,
|
||||||
String serverName) throws IOException {
|
String serverName) throws IOException {
|
||||||
Path tableDir = CommonFSUtils.getTableDir(rootDir, td.getTableName());
|
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
|
// 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
|
// .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.
|
// raise compatibility concerns, so here we just skip them by our own.
|
||||||
|
|
Loading…
Reference in New Issue