Index: src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java =================================================================== --- src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (revision 673670) +++ src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (working copy) @@ -492,6 +492,9 @@ // to match the filesystem on hbase.rootdir else underlying hadoop hdfs // accessors will be going against wrong filesystem (unless all is set // to defaults). + serverInfo.getServerAddress().updateInfo(new HServerAddress + (conf.get("hbase.regionserver.address"), + serverInfo.getServerAddress().getPort())); 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)); @@ -522,7 +525,8 @@ private HLog setupHLog() throws RegionServerRunningException, IOException { - Path logdir = new Path(rootDir, "log" + "_" + getThisIP() + "_" + + Path logdir = new Path(rootDir, "log" + "_" + + serverInfo.getServerAddress().getBindAddress() + "_" + this.serverInfo.getStartCode() + "_" + this.serverInfo.getServerAddress().getPort()); if (LOG.isDebugEnabled()) { Index: src/java/org/apache/hadoop/hbase/master/HMaster.java =================================================================== --- src/java/org/apache/hadoop/hbase/master/HMaster.java (revision 673670) +++ src/java/org/apache/hadoop/hbase/master/HMaster.java (working copy) @@ -529,7 +529,10 @@ @SuppressWarnings("unused") public MapWritable regionServerStartup(HServerInfo serverInfo) throws IOException { - // register with server manager +// register with server manager + String rsAddress = Server.getRemoteAddress(); + serverInfo.getServerAddress().updateInfo(new HServerAddress + (rsAddress, serverInfo.getServerAddress().getPort())); serverManager.regionServerStartup(serverInfo); // send back some config info return createConfigurationSubset(); @@ -541,6 +544,11 @@ */ protected MapWritable createConfigurationSubset() { MapWritable mw = addConfig(new MapWritable(), HConstants.HBASE_DIR); + String rsAddress = Server.getRemoteAddress(); + if (rsAddress != null) { + mw.put(new Text("hbase.regionserver.address"), new Text(rsAddress)); + } + return addConfig(mw, "fs.default.name"); } Index: src/java/org/apache/hadoop/hbase/HServerAddress.java =================================================================== --- src/java/org/apache/hadoop/hbase/HServerAddress.java (revision 673670) +++ src/java/org/apache/hadoop/hbase/HServerAddress.java (working copy) @@ -83,6 +83,18 @@ * @param other the HServerAddress to copy from */ public HServerAddress(HServerAddress other) { + copyInfoFromOther(other); + } + + /** + * Update info + * @param other + */ + public void updateInfo(HServerAddress other) { + copyInfoFromOther(other); + } + + private void copyInfoFromOther(HServerAddress other) { String bindAddress = other.getBindAddress(); int port = other.getPort(); address = new InetSocketAddress(bindAddress, port);