hadoop-mapreduce-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vino...@apache.org
Subject svn commit: r1134864 - in /hadoop/mapreduce/branches/MR-279: ./ yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/ yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodem...
Date Sun, 12 Jun 2011 04:28:02 GMT
Author: vinodkv
Date: Sun Jun 12 04:28:01 2011
New Revision: 1134864

URL: http://svn.apache.org/viewvc?rev=1134864&view=rev
Log:
Fixing broken link to logs for container on NM web UI. (vinodkv)

Modified:
    hadoop/mapreduce/branches/MR-279/CHANGES.txt
    hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/Context.java
    hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/AllApplicationsPage.java
    hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/AllContainersPage.java
    hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ApplicationPage.java
    hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java
    hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerPage.java
    hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMController.java
    hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMView.java
    hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMWebParams.java
    hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NavBlock.java
    hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NodePage.java
    hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/WebServer.java

Modified: hadoop/mapreduce/branches/MR-279/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/CHANGES.txt?rev=1134864&r1=1134863&r2=1134864&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/CHANGES.txt (original)
+++ hadoop/mapreduce/branches/MR-279/CHANGES.txt Sun Jun 12 04:28:01 2011
@@ -5,6 +5,8 @@ Trunk (unreleased changes)
 
     MAPREDUCE-279
 
+    Fixing broken link to logs for container on NM web UI. (vinodkv)
+
     Miscellaneous UI fixes + source code formatting for
     MR JobHistoryEventHandler. (vinodkv)
 

Modified: hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/Context.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/Context.java?rev=1134864&r1=1134863&r2=1134864&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/Context.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/Context.java
Sun Jun 12 04:28:01 2011
@@ -32,9 +32,9 @@ import org.apache.hadoop.yarn.server.nod
  */
 public interface Context {
 
-  public ConcurrentMap<ApplicationId, Application> getApplications();
+  ConcurrentMap<ApplicationId, Application> getApplications();
 
-  public ConcurrentMap<ContainerId, Container> getContainers();
+  ConcurrentMap<ContainerId, Container> getContainers();
 
-  public NodeHealthStatus getNodeHealthStatus();
+  NodeHealthStatus getNodeHealthStatus();
 }

Modified: hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/AllApplicationsPage.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/AllApplicationsPage.java?rev=1134864&r1=1134863&r2=1134864&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/AllApplicationsPage.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/AllApplicationsPage.java
Sun Jun 12 04:28:01 2011
@@ -90,7 +90,7 @@ public class AllApplicationsPage extends
         String appIdStr = ConverterUtils.toString(appId);
         tableBody
           .tr()
-            .td().a(url($(NM_HTTP_URL), "yarn", "application", appIdStr), appIdStr)._()
+            .td().a(url("application", appIdStr), appIdStr)._()
             .td()._(app.getApplicationState())
             ._()
           ._();

Modified: hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/AllContainersPage.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/AllContainersPage.java?rev=1134864&r1=1134863&r2=1134864&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/AllContainersPage.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/AllContainersPage.java
Sun Jun 12 04:28:01 2011
@@ -87,12 +87,11 @@ public class AllContainersPage extends N
         String containerIdStr = ConverterUtils.toString(containerId);
         tableBody
           .tr()
-            .td().a(url($(NM_HTTP_URL), "yarn", "container", containerIdStr), 
-                containerIdStr)._()
+            .td().a(url("container", containerIdStr), containerIdStr)
+            ._()
             .td()._(container.getContainerState())._()
             .td()
-                .a(url($(NM_HTTP_URL), "yarn", "containerlogs", containerIdStr),
-                   "logs")._()
+                .a(url("containerlogs", containerIdStr), "logs")._()
           ._();
       }
       tableBody._()._()._();

Modified: hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ApplicationPage.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ApplicationPage.java?rev=1134864&r1=1134863&r2=1134864&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ApplicationPage.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ApplicationPage.java
Sun Jun 12 04:28:01 2011
@@ -91,8 +91,7 @@ public class ApplicationPage extends NMV
         String containerIdStr = ConverterUtils.toString(containerId);
         containersListBody
                .tr().td()
-                 .a(url($(NM_HTTP_URL), "yarn", "container", containerIdStr),
-                     containerIdStr)
+                 .a(url("container", containerIdStr), containerIdStr)
                  ._()._();
       }
       containersListBody._();

Modified: hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java?rev=1134864&r1=1134863&r2=1134864&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerLogsPage.java
Sun Jun 12 04:28:01 2011
@@ -123,8 +123,7 @@ public class ContainerLogsPage extends N
             long toRead = end - start;
             if (toRead < logFile.length()) {
                 div._("Showing " + toRead + " bytes. Click ")
-                    .a(url($(NM_HTTP_URL), "yarn", "containerlogs",
-                        $(CONTAINER_ID),
+                    .a(url("containerlogs", $(CONTAINER_ID),
                         logFile.getName()), "here")
                     ._(" for full log").br()._();
             }
@@ -158,8 +157,7 @@ public class ContainerLogsPage extends N
               div
                   .p()
                   .a(
-                      url($(NM_HTTP_URL), "yarn", "containerlogs",
-                          $(CONTAINER_ID),
+                      url("containerlogs", $(CONTAINER_ID),
                           logFile.getName(), "?start=-4076"),
                       logFile.getName() + " : Total file length is "
                           + logFile.length() + " bytes.")

Modified: hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerPage.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerPage.java?rev=1134864&r1=1134863&r2=1134864&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerPage.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/ContainerPage.java
Sun Jun 12 04:28:01 2011
@@ -20,6 +20,7 @@ package org.apache.hadoop.yarn.server.no
 
 import static org.apache.hadoop.yarn.webapp.view.JQueryUI.ACCORDION;
 import static org.apache.hadoop.yarn.webapp.view.JQueryUI.initID;
+import static org.apache.hadoop.yarn.util.StringHelper.ujoin;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.yarn.api.records.ContainerId;
@@ -40,7 +41,7 @@ public class ContainerPage extends NMVie
   protected void preHead(Page.HTML<_> html) {
     commonPreHead(html);
     setTitle("Container " + $(CONTAINER_ID));
-    set(initID(ACCORDION, "nav"), "{autoHeight:false, active:2}");
+    set(initID(ACCORDION, "nav"), "{autoHeight:false, active:0}");
   }
 
   @Override
@@ -69,9 +70,7 @@ public class ContainerPage extends NMVie
     info("Container information")
       ._("ContainerID", $(CONTAINER_ID))
       ._("ContainerState", container.getContainerState())
-      ._("logs",
-          url($(NM_HTTP_URL), "yarn", "containerlogs", $(CONTAINER_ID)),
-          "Link to logs");
+      ._("logs", ujoin("containerlogs", $(CONTAINER_ID)), "Link to logs");
     html._(InfoBlock.class);
     }
   }

Modified: hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMController.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMController.java?rev=1134864&r1=1134863&r2=1134864&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMController.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMController.java
Sun Jun 12 04:28:01 2011
@@ -31,9 +31,6 @@ public class NMController extends Contro
   @Inject
   public NMController(Configuration nmConf, RequestContext requestContext) {
     super(requestContext);
-    set(NM_HTTP_URL,
-        join("http://", nmConf.get(NMConfig.NM_HTTP_BIND_ADDRESS,
-            NMConfig.DEFAULT_NM_HTTP_BIND_ADDRESS)));
   }
 
   @Override
@@ -43,7 +40,6 @@ public class NMController extends Contro
   }
 
   public void info() {
-    info("NodeManager:\n" + $(NM_HTTP_URL));
     render(NodePage.class);    
   }
 

Modified: hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMView.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMView.java?rev=1134864&r1=1134863&r2=1134864&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMView.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMView.java
Sun Jun 12 04:28:01 2011
@@ -35,7 +35,7 @@ public class NMView extends TwoColumnLay
   protected void commonPreHead(Page.HTML<_> html) {
     html.meta_http("refresh", "10");
     set(ACCORDION_ID, "nav");
-    set(initID(ACCORDION, "nav"), "{autoHeight:false, active:1}");
+    set(initID(ACCORDION, "nav"), "{autoHeight:false, active:0}");
     set(THEMESWITCHER_ID, "themeswitcher");
   }
 

Modified: hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMWebParams.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMWebParams.java?rev=1134864&r1=1134863&r2=1134864&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMWebParams.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NMWebParams.java
Sun Jun 12 04:28:01 2011
@@ -19,9 +19,8 @@
 package org.apache.hadoop.yarn.server.nodemanager.webapp;
 
 public interface NMWebParams {
-  public static final String NM_NODENAME = "nm.id";
-  public static final String NM_HTTP_URL = "nm.http-url";
-  public static final String APPLICATION_ID = "nm.appId";
-  public static final String CONTAINER_ID = "nm.containerId";
-  public static final String CONTAINER_LOG_TYPE= "nm.containerLogType";
+  String NM_NODENAME = "nm.id";
+  String APPLICATION_ID = "nm.appId";
+  String CONTAINER_ID = "nm.containerId";
+  String CONTAINER_LOG_TYPE= "nm.containerLogType";
 }

Modified: hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NavBlock.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NavBlock.java?rev=1134864&r1=1134863&r2=1134864&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NavBlock.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NavBlock.java
Sun Jun 12 04:28:01 2011
@@ -29,12 +29,12 @@ public class NavBlock extends HtmlBlock 
         .h3()._("NodeManager")._() // TODO: Problem if no header like this
         .ul()
           .li()
-            .a(url($(NM_HTTP_URL), "yarn", "node"), "Node Information")._()
+            .a(url("node"), "Node Information")._()
           .li()
-            .a(url($(NM_HTTP_URL), "yarn", "allApplications"), "List of Applications")
+            .a(url("allApplications"), "List of Applications")
             ._()
           .li()
-            .a(url($(NM_HTTP_URL), "yarn","allContainers"), "List of Containers")._()
+            .a(url("allContainers"), "List of Containers")._()
         ._()
         .h3()._("Tools")._()
       ._()

Modified: hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NodePage.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NodePage.java?rev=1134864&r1=1134863&r2=1134864&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NodePage.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/NodePage.java
Sun Jun 12 04:28:01 2011
@@ -37,7 +37,7 @@ public class NodePage extends NMView {
   @Override
   protected void commonPreHead(HTML<_> html) {
     super.commonPreHead(html);
-    set(initID(ACCORDION, "nav"), "{autoHeight:false, active:1}");
+    set(initID(ACCORDION, "nav"), "{autoHeight:false, active:0}");
   }
 
   @Override

Modified: hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/WebServer.java
URL: http://svn.apache.org/viewvc/hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/WebServer.java?rev=1134864&r1=1134863&r2=1134864&view=diff
==============================================================================
--- hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/WebServer.java
(original)
+++ hadoop/mapreduce/branches/MR-279/yarn/yarn-server/yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/webapp/WebServer.java
Sun Jun 12 04:28:01 2011
@@ -23,6 +23,7 @@ import static org.apache.hadoop.yarn.uti
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.net.DNS;
 import org.apache.hadoop.yarn.YarnException;
 import org.apache.hadoop.yarn.server.nodemanager.Context;
 import org.apache.hadoop.yarn.server.nodemanager.NMConfig;
@@ -38,7 +39,6 @@ public class WebServer extends AbstractS
   private final Context nmContext;
   private final ResourceView resourceView;
   private WebApp webApp;
-  private String bindAddress;
 
   public WebServer(Context nmContext, ResourceView resourceView) {
     super(WebServer.class.getName());
@@ -53,13 +53,13 @@ public class WebServer extends AbstractS
 
   @Override
   public synchronized void start() {
-    this.bindAddress = getConfig().get(NMConfig.NM_HTTP_BIND_ADDRESS,
+    String bindAddress = getConfig().get(NMConfig.NM_HTTP_BIND_ADDRESS,
         NMConfig.DEFAULT_NM_HTTP_BIND_ADDRESS);
-    LOG.info("Instantiating NMWebApp at " + this.bindAddress);
+    LOG.info("Instantiating NMWebApp at " + bindAddress);
     try {
       this.webApp =
           WebApps.$for("yarn", Context.class, this.nmContext)
-              .at(this.bindAddress).with(getConfig())
+              .at(bindAddress).with(getConfig())
               .start(new NMWebApp(this.resourceView));
     } catch (Exception e) {
       String msg = "NMWebapps failed to start.";



Mime
View raw message