MAPREDUCE-6213. NullPointerException caused by job history server addr not resolvable. Contributed by Peng Zhang.

This commit is contained in:
Harsh J 2015-03-22 02:44:36 +05:30
parent 7a678db3ac
commit e1e09052e8
2 changed files with 7 additions and 3 deletions

View File

@ -286,6 +286,9 @@ Release 2.8.0 - UNRELEASED
BUG FIXES BUG FIXES
MAPREDUCE-6213. NullPointerException caused by job history server addr not
resolvable. (Peng Zhang via harsh)
MAPREDUCE-6281. Fix javadoc in Terasort. (Albert Chu via ozawa) MAPREDUCE-6281. Fix javadoc in Terasort. (Albert Chu via ozawa)
Release 2.7.0 - UNRELEASED Release 2.7.0 - UNRELEASED

View File

@ -137,8 +137,9 @@ public static String getApplicationWebURLOnJHSWithoutScheme(Configuration conf,
hsAddress, getDefaultJHSWebappPort(), hsAddress, getDefaultJHSWebappPort(),
getDefaultJHSWebappURLWithoutScheme()); getDefaultJHSWebappURLWithoutScheme());
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
if (address.getAddress().isAnyLocalAddress() || if (address.getAddress() != null &&
address.getAddress().isLoopbackAddress()) { (address.getAddress().isAnyLocalAddress() ||
address.getAddress().isLoopbackAddress())) {
sb.append(InetAddress.getLocalHost().getCanonicalHostName()); sb.append(InetAddress.getLocalHost().getCanonicalHostName());
} else { } else {
sb.append(address.getHostName()); sb.append(address.getHostName());