hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ha...@apache.org
Subject hadoop git commit: MAPREDUCE-6213. NullPointerException caused by job history server addr not resolvable. Contributed by Peng Zhang.
Date Sat, 21 Mar 2015 21:15:23 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 97da36777 -> 418d078bc


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

(cherry picked from commit e1e09052e861926112493d6041aae01ab594b547)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/418d078b
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/418d078b
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/418d078b

Branch: refs/heads/branch-2
Commit: 418d078bc5621bea415c3fd095f1c8a9e218878a
Parents: 97da367
Author: Harsh J <harsh@cloudera.com>
Authored: Sun Mar 22 02:44:36 2015 +0530
Committer: Harsh J <harsh@cloudera.com>
Committed: Sun Mar 22 02:45:01 2015 +0530

----------------------------------------------------------------------
 hadoop-mapreduce-project/CHANGES.txt                          | 3 +++
 .../org/apache/hadoop/mapreduce/v2/util/MRWebAppUtil.java     | 7 ++++---
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/418d078b/hadoop-mapreduce-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt
index da43195..5897bd1 100644
--- a/hadoop-mapreduce-project/CHANGES.txt
+++ b/hadoop-mapreduce-project/CHANGES.txt
@@ -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

http://git-wip-us.apache.org/repos/asf/hadoop/blob/418d078b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-common/src/main/java/org/apache/hadoop/mapreduce/v2/util/MRWebAppUtil.java
----------------------------------------------------------------------
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 cac0119..d367060 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 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://";
   }
-}
\ No newline at end of file
+}


Mime
View raw message