merge MAPREDUCE-4040 from trunk. History links should use hostname rather than IP address. (Contributed by Bhallamudi Venkata Siva Kamesh)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1312077 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Siddharth Seth 2012-04-11 02:52:13 +00:00
parent e9180d1e5b
commit 40497a9d04
2 changed files with 4 additions and 1 deletions

View File

@ -208,6 +208,9 @@ Release 0.23.3 - UNRELEASED
MAPREDUCE-4017. Add jobname to jobsummary log (tgraves and Koji Noguchi
via bobby)
MAPREDUCE-4040. History links should use hostname rather than IP address.
(Bhallamudi Venkata Siva Kamesh via sseth)
Release 0.23.2 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -507,7 +507,7 @@ public class JobHistoryUtils {
StringBuffer sb = new StringBuffer();
if (address.getAddress().isAnyLocalAddress() ||
address.getAddress().isLoopbackAddress()) {
sb.append(InetAddress.getLocalHost().getHostAddress());
sb.append(InetAddress.getLocalHost().getCanonicalHostName());
} else {
sb.append(address.getHostName());
}