hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject svn commit: r1081618 - in /hbase/trunk: CHANGES.txt src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
Date Tue, 15 Mar 2011 00:25:59 GMT
Author: todd
Date: Tue Mar 15 00:25:59 2011
New Revision: 1081618

URL: http://svn.apache.org/viewvc?rev=1081618&view=rev
Log:
HBASE-3639  FSUtils.getRootDir should qualify path

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1081618&r1=1081617&r2=1081618&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Tue Mar 15 00:25:59 2011
@@ -159,6 +159,7 @@ Release 0.90.2 - Unreleased
                nonexists (Guanpeng Xu via Stack)
    HBASE-3636  a bug about deciding whether this key is a new key for the ROWCOL
                bloomfilter (Liyin Tang via Stack)
+   HBASE-3639  FSUtils.getRootDir should qualify path
 
   IMPROVEMENTS
    HBASE-3542  MultiGet methods in Thrift

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java?rev=1081618&r1=1081617&r2=1081618&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java Tue Mar
15 00:25:59 2011
@@ -81,10 +81,11 @@ public class MasterFileSystem {
     this.rootdir = FSUtils.getRootDir(conf);
     // Cover both bases, the old way of setting default fs and the new.
     // We're supposed to run on 0.20 and 0.21 anyways.
-    conf.set("fs.default.name", this.rootdir.toString());
-    conf.set("fs.defaultFS", this.rootdir.toString());
+    this.fs = this.rootdir.getFileSystem(conf);
+    String fsUri = this.fs.getUri().toString();
+    conf.set("fs.default.name", fsUri);
+    conf.set("fs.defaultFS", fsUri);
     // setup the filesystem variable
-    this.fs = FileSystem.get(conf);
     // set up the archived logs path
     this.oldLogDir = new Path(this.rootdir, HConstants.HREGION_OLDLOGDIR_NAME);
     createInitialFileSystemLayout();

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java?rev=1081618&r1=1081617&r2=1081618&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java (original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java Tue Mar 15 00:25:59
2011
@@ -337,11 +337,13 @@ public class FSUtils {
   /**
    * @param c configuration
    * @return Path to hbase root directory: i.e. <code>hbase.rootdir</code> from
-   * configuration as a Path.
+   * configuration as a qualified Path.
    * @throws IOException e
    */
   public static Path getRootDir(final Configuration c) throws IOException {
-    return new Path(c.get(HConstants.HBASE_DIR));
+    Path p = new Path(c.get(HConstants.HBASE_DIR));
+    FileSystem fs = p.getFileSystem(c);
+    return p.makeQualified(fs);
   }
 
   /**



Mime
View raw message