You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by to...@apache.org on 2011/03/15 01:24:50 UTC
svn commit: r1081617 - in /hbase/branches/0.90: CHANGES.txt
src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java
src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
Author: todd
Date: Tue Mar 15 00:24:49 2011
New Revision: 1081617
URL: http://svn.apache.org/viewvc?rev=1081617&view=rev
Log:
HBASE-3639 FSUtils.getRootDir should qualify path
Modified:
hbase/branches/0.90/CHANGES.txt
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java
hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1081617&r1=1081616&r2=1081617&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Tue Mar 15 00:24:49 2011
@@ -28,6 +28,7 @@ Release 0.90.2 - February 9th, 2011
(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/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java?rev=1081617&r1=1081616&r2=1081617&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java (original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/master/MasterFileSystem.java Tue Mar 15 00:24:49 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/branches/0.90/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java?rev=1081617&r1=1081616&r2=1081617&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java (original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java Tue Mar 15 00:24:49 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);
}
/**