diff --git hbase-server/src/main/java/org/apache/hadoop/hbase/migration/NamespaceUpgrade.java hbase-server/src/main/java/org/apache/hadoop/hbase/migration/NamespaceUpgrade.java index 6821ac5..2245946 100644 --- hbase-server/src/main/java/org/apache/hadoop/hbase/migration/NamespaceUpgrade.java +++ hbase-server/src/main/java/org/apache/hadoop/hbase/migration/NamespaceUpgrade.java @@ -86,7 +86,7 @@ public class NamespaceUpgrade implements Tool { private static final String DOT_SPLITLOG = "splitlog"; private static final String DOT_ARCHIVE = ".archive"; - // The old default directory of hbase.dynamic.jars.dir(0.94.12 release). + // The old default directory of hbase.dynamic.jars.dir(0.94.12 release). private static final String DOT_LIB_DIR = ".lib"; private static final String OLD_ACL = "_acl_"; @@ -233,7 +233,7 @@ public class NamespaceUpgrade implements Tool { * @throws IOException */ public void migrateTables() throws IOException { - List sysTables = Lists.newArrayList("-ROOT-",".META."); + List sysTables = Lists.newArrayList("-ROOT-",".META.", ".META"); // Migrate tables including archive and tmp for (Path baseDir: baseDirs) { @@ -300,6 +300,16 @@ public class NamespaceUpgrade implements Tool { throw new IOException("Failed to migrate meta table " + oldMetaDir.getName() + " to " + newMetaDir); } + } else { + // on windows NTFS, meta's name is .META (note the missing dot at the end) + oldMetaDir = new Path(rootDir, ".META"); + if (fs.exists(oldMetaDir)) { + LOG.info("Migrating meta table " + oldMetaDir.getName() + " to " + newMetaDir); + if (!fs.rename(oldMetaDir, newMetaDir)) { + throw new IOException("Failed to migrate meta table " + + oldMetaDir.getName() + " to " + newMetaDir); + } + } } // Since meta table name has changed rename meta region dir from it's old encoding to new one