From 0c08836299d84beeb9d918708c82e09c7813f376 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Thu, 1 May 2008 04:22:56 +0000 Subject: [PATCH] HBASE-608 HRegionServer::getThisIP() checks hadoop config var for dns interface name git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@652428 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 2 ++ conf/hbase-default.xml | 9 +++++++++ .../apache/hadoop/hbase/regionserver/HRegionServer.java | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index a03c7f75905..4fc512c33db 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -25,6 +25,8 @@ Hbase Change Log knows about workings of memcache HBASE-588 Still a 'hole' in scanners, even after HBASE-532 HBASE-604 Don't allow CLASSPATH from environment pollute the hbase CLASSPATH + HBASE-608 HRegionServer::getThisIP() checks hadoop config var for dns interface name + (Jim R. Wilson via Stack) IMPROVEMENTS HBASE-559 MR example job to count table rows diff --git a/conf/hbase-default.xml b/conf/hbase-default.xml index c44c23d1788..8295abaa528 100644 --- a/conf/hbase-default.xml +++ b/conf/hbase-default.xml @@ -57,6 +57,15 @@ The host and port a HBase region server runs at. + + hbase.regionserver.dns.interface + default + Name of the network interface which a regionserver + should use to determine it's "real" IP address. This lookup + prevents strings like "localhost" and "127.0.0.1" from being + reported back to the master. + + hbase.regionserver.info.port 60030 diff --git a/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index 6daaa954e84..3a4930db4c1 100644 --- a/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ b/src/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -607,7 +607,7 @@ public class HRegionServer implements HConstants, HRegionInterface, Runnable { * @return This servers' IP. */ private String getThisIP() throws UnknownHostException { - return DNS.getDefaultIP(conf.get("dfs.datanode.dns.interface","default")); + return DNS.getDefaultIP(conf.get("hbase.regionserver.dns.interface","default")); } /**