hadoop-yarn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jl...@apache.org
Subject svn commit: r1522971 - in /hadoop/common/branches/branch-2/hadoop-yarn-project: CHANGES.txt hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/webapp/TestContainerLogsPage.java
Date Fri, 13 Sep 2013 15:20:39 GMT
Author: jlowe
Date: Fri Sep 13 15:20:38 2013
New Revision: 1522971

URL: http://svn.apache.org/r1522971
Log:
svn merge -c 1522968 FIXES: YARN-1194. TestContainerLogsPage fails with native builds. Contributed
by Roman Shaposhnik

Modified:
    hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt
    hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/webapp/TestContainerLogsPage.java

Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt?rev=1522971&r1=1522970&r2=1522971&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt (original)
+++ hadoop/common/branches/branch-2/hadoop-yarn-project/CHANGES.txt Fri Sep 13 15:20:38 2013
@@ -176,6 +176,9 @@ Release 2.1.1-beta - UNRELEASED
     YARN-1078. TestNodeManagerResync, TestNodeManagerShutdown, and
     TestNodeStatusUpdater fail on Windows. (Chuan Liu via cnauroth)
 
+    YARN-1194. TestContainerLogsPage fails with native builds (Roman Shaposhnik
+    via jlowe)
+
 Release 2.1.0-beta - 2013-08-22
 
   INCOMPATIBLE CHANGES

Modified: hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/webapp/TestContainerLogsPage.java
URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/webapp/TestContainerLogsPage.java?rev=1522971&r1=1522970&r2=1522971&view=diff
==============================================================================
--- hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/webapp/TestContainerLogsPage.java
(original)
+++ hadoop/common/branches/branch-2/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/webapp/TestContainerLogsPage.java
Fri Sep 13 15:20:38 2013
@@ -42,6 +42,7 @@ import org.apache.hadoop.yarn.api.record
 import org.apache.hadoop.yarn.api.records.ApplicationId;
 import org.apache.hadoop.yarn.api.records.ContainerId;
 import org.apache.hadoop.yarn.conf.YarnConfiguration;
+import org.apache.hadoop.yarn.event.AsyncDispatcher;
 import org.apache.hadoop.yarn.exceptions.YarnException;
 import org.apache.hadoop.yarn.factories.RecordFactory;
 import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider;
@@ -50,6 +51,7 @@ import org.apache.hadoop.yarn.server.nod
 import org.apache.hadoop.yarn.server.nodemanager.NodeHealthCheckerService;
 import org.apache.hadoop.yarn.server.nodemanager.containermanager.application.Application;
 import org.apache.hadoop.yarn.server.nodemanager.containermanager.container.Container;
+import org.apache.hadoop.yarn.server.nodemanager.containermanager.container.ContainerState;
 import org.apache.hadoop.yarn.server.nodemanager.webapp.ContainerLogsPage.ContainersLogsBlock;
 import org.apache.hadoop.yarn.server.utils.BuilderUtils;
 import org.apache.hadoop.yarn.webapp.YarnWebParams;
@@ -151,8 +153,15 @@ public class TestContainerLogsPage {
           new ConcurrentHashMap<ApplicationId, Application>();
       appMap.put(appId, app);
       when(context.getApplications()).thenReturn(appMap);
-      when(context.getContainers()).thenReturn(
-        new ConcurrentHashMap<ContainerId, Container>());
+      ConcurrentHashMap<ContainerId, Container> containers =
+          new ConcurrentHashMap<ContainerId, Container>();
+      when(context.getContainers()).thenReturn(containers);
+      when(context.getLocalDirsHandler()).thenReturn(dirsHandler);
+
+      MockContainer container = new MockContainer(appAttemptId,
+        new AsyncDispatcher(), conf, user, appId, 1);
+      container.setState(ContainerState.RUNNING);
+      context.getContainers().put(container1, container);
 
       ContainersLogsBlock cLogsBlock =
           new ContainersLogsBlock(context);



Mime
View raw message