HBASE-1368 HBASE-1279 broke the build
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@771406 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7a66721ea6
commit
8abe303d1f
|
@ -103,6 +103,7 @@ Release 0.20.0 - Unreleased
|
|||
(Evgeny Ryabitskiy via Stack)
|
||||
HBASE-1365 Typo in TableInputFormatBase.setInputColums (Jon Gray via Stack)
|
||||
HBASE-1279 Fix the way hostnames and IPs are handled
|
||||
HBASE-1368 HBASE-1279 broke the build
|
||||
|
||||
IMPROVEMENTS
|
||||
HBASE-1089 Add count of regions on filesystem to master UI; add percentage
|
||||
|
|
|
@ -43,7 +43,8 @@ public class HServerInfo implements WritableComparable<HServerInfo> {
|
|||
|
||||
/** default constructor - used by Writable */
|
||||
public HServerInfo() {
|
||||
this(new HServerAddress(), 0, HConstants.DEFAULT_REGIONSERVER_INFOPORT);
|
||||
this(new HServerAddress(), 0,
|
||||
HConstants.DEFAULT_REGIONSERVER_INFOPORT, "default name");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -53,11 +54,12 @@ public class HServerInfo implements WritableComparable<HServerInfo> {
|
|||
* @param infoPort Port the info server is listening on.
|
||||
*/
|
||||
public HServerInfo(HServerAddress serverAddress, long startCode,
|
||||
final int infoPort) {
|
||||
final int infoPort, String name) {
|
||||
this.serverAddress = serverAddress;
|
||||
this.startCode = startCode;
|
||||
this.load = new HServerLoad();
|
||||
this.infoPort = infoPort;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -287,16 +287,16 @@ public class HRegionServer implements HConstants, HRegionInterface,
|
|||
address.getPort(), conf.getInt("hbase.regionserver.handler.count", 10),
|
||||
false, conf);
|
||||
this.server.setErrorHandler(this);
|
||||
String machineName = DNS.getDefaultHost(
|
||||
conf.get("hbase.regionserver.dns.interface","default"),
|
||||
conf.get("hbase.regionserver.dns.nameserver","default"));
|
||||
// Address is givin a default IP for the moment. Will be changed after
|
||||
// calling the master.
|
||||
this.serverInfo = new HServerInfo(new HServerAddress(
|
||||
new InetSocketAddress(address.getBindAddress(),
|
||||
this.server.getListenerAddress().getPort())), System.currentTimeMillis(),
|
||||
this.conf.getInt("hbase.regionserver.info.port", 60030));
|
||||
String machineName = DNS.getDefaultHost(
|
||||
conf.get("hbase.regionserver.dns.interface","default"),
|
||||
conf.get("hbase.regionserver.dns.nameserver","default"));
|
||||
this.serverInfo.setName(machineName);
|
||||
this.conf.getInt("hbase.regionserver.info.port", 60030), machineName);
|
||||
|
||||
if (this.serverInfo.getServerAddress() == null) {
|
||||
throw new NullPointerException("Server address cannot be null; " +
|
||||
"hbase-958 debugging");
|
||||
|
|
|
@ -125,7 +125,7 @@ public class TestSerialization extends HBaseTestCase {
|
|||
*/
|
||||
public void testServerInfo() throws Exception {
|
||||
HServerInfo hsi = new HServerInfo(new HServerAddress("0.0.0.0:123"), -1,
|
||||
1245);
|
||||
1245, "default name");
|
||||
byte [] b = Writables.getBytes(hsi);
|
||||
HServerInfo deserializedHsi =
|
||||
(HServerInfo)Writables.getWritable(b, new HServerInfo());
|
||||
|
|
Loading…
Reference in New Issue