diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index 4f80411343..76180a3364 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -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 diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/util/MRWebAppUtil.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/util/MRWebAppUtil.java index cac01191fc..d367060eb1 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/util/MRWebAppUtil.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/util/MRWebAppUtil.java @@ -137,8 +137,9 @@ public static String getApplicationWebURLOnJHSWithoutScheme(Configuration conf, 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 @@ private static String getDefaultJHSWebappURLWithoutScheme() { public static String getAMWebappScheme(Configuration conf) { return "http://"; } -} \ No newline at end of file +}