HBASE-446 Fully qualified hbase.rootdir doesn't work

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@627837 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jim Kellerman 2008-02-14 18:49:00 +00:00
parent dd19c18e76
commit 21932c5981
4 changed files with 12 additions and 3 deletions

View File

@ -19,6 +19,7 @@ Hbase Change Log
HBASE-426 hbase can't find remote filesystem
HBASE-437 Clear Command should use system.out (Edward Yoon via Stack)
HBASE-434, HBASE-435 TestTableIndex and TestTableMapReduce failed in Hudson builds
HBASE-446 Fully qualified hbase.rootdir doesn't work
IMPROVEMENTS
HBASE-415 Rewrite leases to use DelayedBlockingQueue instead of polling

View File

@ -872,6 +872,12 @@ public class HRegionServer implements HConstants, HRegionInterface, Runnable {
}
this.conf.set(key, value);
}
// Master sent us hbase.rootdir to use. Should be fully qualified
// path with file system specification included. Set 'fs.default.name'
// to match the filesystem on hbase.rootdir else underlying hadoop hdfs
// accessors will be going against wrong filesystem (unless all is set
// to defaults).
this.conf.set("fs.default.name", this.conf.get("hbase.rootdir"));
this.fs = FileSystem.get(this.conf);
this.rootDir = new Path(this.conf.get(HConstants.HBASE_DIR));
this.log = setupHLog();

View File

@ -255,10 +255,12 @@ public class HMaster extends Thread implements HConstants, HMasterInterface,
*/
public HMaster(Path rd, HServerAddress address, HBaseConfiguration conf)
throws IOException {
this.conf = conf;
this.rootdir = rd;
// The filesystem hbase wants to use is probably not what is set into
// fs.default.name; its value is probably the default.
this.conf.set("fs.default.name", this.rootdir.toString());
this.fs = FileSystem.get(conf);
this.rootdir = this.fs.makeQualified(rd);
this.conf.set(HConstants.HBASE_DIR, this.rootdir.toString());
this.rand = new Random();
Path rootRegionDir =

View File

@ -75,7 +75,7 @@ example:
<property>
<name>hbase.master</name>
<value>http://localhost:60000</value>
<value>localhost:60000</value>
<description>The host and port that the HBase master runs at.
</description>
</property>