MAPREDUCE-6213. NullPointerException caused by job history server addr not resolvable. Contributed by Peng Zhang.
(cherry picked from commit e1e09052e8
)
This commit is contained in:
parent
97da36777f
commit
418d078bc5
|
@ -38,6 +38,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
|
||||
|
|
|
@ -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());
|
||||
|
@ -171,4 +172,4 @@ public class MRWebAppUtil {
|
|||
public static String getAMWebappScheme(Configuration conf) {
|
||||
return "http://";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue