hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r649308 - in /hadoop/hbase/branches/0.1: CHANGES.txt src/java/org/apache/hadoop/hbase/util/Migrate.java
Date Thu, 17 Apr 2008 22:16:27 GMT
Author: jimk
Date: Thu Apr 17 15:16:24 2008
New Revision: 649308

URL: http://svn.apache.org/viewvc?rev=649308&view=rev
Log:
HBase migration tool does not get correct FileSystem or root directory if configuration is
not correct

Modified:
    hadoop/hbase/branches/0.1/CHANGES.txt
    hadoop/hbase/branches/0.1/src/java/org/apache/hadoop/hbase/util/Migrate.java

Modified: hadoop/hbase/branches/0.1/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.1/CHANGES.txt?rev=649308&r1=649307&r2=649308&view=diff
==============================================================================
--- hadoop/hbase/branches/0.1/CHANGES.txt (original)
+++ hadoop/hbase/branches/0.1/CHANGES.txt Thu Apr 17 15:16:24 2008
@@ -15,6 +15,8 @@
    HBASE-582   HBase 554 forgot to clear results on each iteration caused by a filter
                (Clint Morgan via Stack)
    HBASE-532   Odd interaction between HRegion.get, HRegion.deleteAll and compactions
+   HBASE-590   HBase migration tool does not get correct FileSystem or root
+               directory if configuration is not correct
 
   IMPROVEMENTS
    HBASE-559   MR example job to count table rows

Modified: hadoop/hbase/branches/0.1/src/java/org/apache/hadoop/hbase/util/Migrate.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/branches/0.1/src/java/org/apache/hadoop/hbase/util/Migrate.java?rev=649308&r1=649307&r2=649308&view=diff
==============================================================================
--- hadoop/hbase/branches/0.1/src/java/org/apache/hadoop/hbase/util/Migrate.java (original)
+++ hadoop/hbase/branches/0.1/src/java/org/apache/hadoop/hbase/util/Migrate.java Thu Apr 17
15:16:24 2008
@@ -123,6 +123,20 @@
       return -1;
     }
 
+    // Validate root directory path
+    
+    Path rd = new Path(conf.get(HConstants.HBASE_DIR));
+    try {
+      // Validate root directory path
+      FSUtils.validateRootPath(rd);
+    } catch (IOException e) {
+      LOG.fatal("Not starting migration because the root directory path '" +
+          rd.toString() + "' is not valid. Check the setting of the" +
+          " configuration parameter '" + HConstants.HBASE_DIR + "'", e);
+      return -1;
+    }
+    this.conf.set("fs.default.name", rd.toString());
+    
     try {
       // Verify file system is up.
       fs = FileSystem.get(this.conf);                   // get DFS handle



Mime
View raw message