You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by en...@apache.org on 2013/11/12 20:04:42 UTC
svn commit: r1541198 -
/hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/migration/NamespaceUpgrade.java
Author: enis
Date: Tue Nov 12 19:04:41 2013
New Revision: 1541198
URL: http://svn.apache.org/r1541198
Log:
HBASE-9957 [WINDOWS] TestNamespaceUpgrade fails on windows
Modified:
hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/migration/NamespaceUpgrade.java
Modified: hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/migration/NamespaceUpgrade.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/migration/NamespaceUpgrade.java?rev=1541198&r1=1541197&r2=1541198&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/migration/NamespaceUpgrade.java (original)
+++ hbase/branches/0.96/hbase-server/src/main/java/org/apache/hadoop/hbase/migration/NamespaceUpgrade.java Tue Nov 12 19:04:41 2013
@@ -86,7 +86,7 @@ public class NamespaceUpgrade implements
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
* @throws IOException
*/
public void migrateTables() throws IOException {
- List<String> sysTables = Lists.newArrayList("-ROOT-",".META.");
+ List<String> sysTables = Lists.newArrayList("-ROOT-",".META.", ".META");
// Migrate tables including archive and tmp
for (Path baseDir: baseDirs) {
@@ -300,6 +300,16 @@ public class NamespaceUpgrade implements
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