HBASE-3639 FSUtils.getRootDir should qualify path
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1081618 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4196e5404c
commit
b45a3456a1
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue