浏览代码

Merge MAPREDUCE-4050 from trunk. For tasks without assigned containers, changes the node text on the UI to N/A instead of a link to null. (Contributed by Bhallamudi Venkata Siva Kamesh)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1325437 13f79535-47bb-0310-9956-ffa450edef68
Siddharth Seth 13 年之前
父节点
当前提交
83caf70d12

+ 4 - 0
hadoop-mapreduce-project/CHANGES.txt

@@ -87,6 +87,10 @@ Release 0.23.3 - UNRELEASED
     MAPREDUCE-4140. mapreduce classes incorrectly importing
     "clover.org.apache.*" classes. (Patrick Hunt via tomwhite)
 
+    MAPREDUCE-4050. For tasks without assigned containers, changes the node
+    text on the UI to N/A instead of a link to null. (Bhallamudi Venkata Siva
+    Kamesh via sseth)
+
 Release 0.23.2 - UNRELEASED
 
   INCOMPATIBLE CHANGES

+ 7 - 3
hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/main/java/org/apache/hadoop/mapreduce/v2/app/webapp/TaskPage.java

@@ -87,9 +87,13 @@ public class TaskPage extends AppView {
           tr().
             td(".id", taid).
             td(".progress", progress).
-            td(".state", ta.getState()).
-            td().
-              a(".nodelink", url("http://", nodeHttpAddr), nodeHttpAddr);
+            td(".state", ta.getState()).td();
+        if (nodeHttpAddr == null) {
+          nodeTd._("N/A");
+        } else {
+          nodeTd.
+            a(".nodelink", url("http://", nodeHttpAddr), nodeHttpAddr);
+        }
         if (containerId != null) {
           String containerIdStr = ta.getAssignedContainerIdStr();
           nodeTd._(" ").