YARN-1194. TestContainerLogsPage fails with native builds. Contributed by Roman Shaposhnik
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1522968 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4857e76579
commit
2950c9ff6e
@ -191,6 +191,9 @@ Release 2.1.1-beta - UNRELEASED
|
|||||||
YARN-1078. TestNodeManagerResync, TestNodeManagerShutdown, and
|
YARN-1078. TestNodeManagerResync, TestNodeManagerShutdown, and
|
||||||
TestNodeStatusUpdater fail on Windows. (Chuan Liu via cnauroth)
|
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
|
Release 2.1.0-beta - 2013-08-22
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
import org.apache.hadoop.yarn.api.records.ApplicationId;
|
||||||
import org.apache.hadoop.yarn.api.records.ContainerId;
|
import org.apache.hadoop.yarn.api.records.ContainerId;
|
||||||
import org.apache.hadoop.yarn.conf.YarnConfiguration;
|
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.exceptions.YarnException;
|
||||||
import org.apache.hadoop.yarn.factories.RecordFactory;
|
import org.apache.hadoop.yarn.factories.RecordFactory;
|
||||||
import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider;
|
import org.apache.hadoop.yarn.factory.providers.RecordFactoryProvider;
|
||||||
@ -50,6 +51,7 @@
|
|||||||
import org.apache.hadoop.yarn.server.nodemanager.NodeHealthCheckerService;
|
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.application.Application;
|
||||||
import org.apache.hadoop.yarn.server.nodemanager.containermanager.container.Container;
|
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.nodemanager.webapp.ContainerLogsPage.ContainersLogsBlock;
|
||||||
import org.apache.hadoop.yarn.server.utils.BuilderUtils;
|
import org.apache.hadoop.yarn.server.utils.BuilderUtils;
|
||||||
import org.apache.hadoop.yarn.webapp.YarnWebParams;
|
import org.apache.hadoop.yarn.webapp.YarnWebParams;
|
||||||
@ -151,8 +153,15 @@ public void testContainerLogPageAccess() throws IOException {
|
|||||||
new ConcurrentHashMap<ApplicationId, Application>();
|
new ConcurrentHashMap<ApplicationId, Application>();
|
||||||
appMap.put(appId, app);
|
appMap.put(appId, app);
|
||||||
when(context.getApplications()).thenReturn(appMap);
|
when(context.getApplications()).thenReturn(appMap);
|
||||||
when(context.getContainers()).thenReturn(
|
ConcurrentHashMap<ContainerId, Container> containers =
|
||||||
new ConcurrentHashMap<ContainerId, Container>());
|
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 =
|
ContainersLogsBlock cLogsBlock =
|
||||||
new ContainersLogsBlock(context);
|
new ContainersLogsBlock(context);
|
||||||
|
Loading…
Reference in New Issue
Block a user