Have master show its address using hostname rather than IP
----------------------------------------------------------
Key: HBASE-2867
URL: https://issues.apache.org/jira/browse/HBASE-2867
Project: HBase
Issue Type: Improvement
Reporter: stack
Priority: Trivial
Fix For: 0.90.0
Here is the patch:
{code}
diff --git a/src/main/java/org/apache/hadoop/hbase/HServerAddress.java
b/src/main/java/org/apache/hadoop/hbase/HServerAddress.java
index 763eca2..3859968 100644
--- a/src/main/java/org/apache/hadoop/hbase/HServerAddress.java
+++ b/src/main/java/org/apache/hadoop/hbase/HServerAddress.java
@@ -46,7 +46,7 @@ public class HServerAddress implements
WritableComparable<HServerAddress> {
*/
public HServerAddress(InetSocketAddress address) {
this.address = address;
- this.stringValue = address.getAddress().getHostAddress() + ":" +
+ this.stringValue = address.getAddress().getHostName() + ":" +
address.getPort();
checkBindAddressCanBeResolved();
}
{code}
This change will effect what is shown in log when master starts up printing its
hostname instead of address and it will also show over in NN logs -- using
hostname rather than IP will match what the RS is showing in NN log.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.