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
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)
Release 2.7.0 - UNRELEASED

View File

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