YARN-6570. No logs were found for running application, running
container. Contributed by Junping Du
This commit is contained in:
parent
29dd55153e
commit
7c732924a8
|
@ -616,6 +616,7 @@ public class ContainerImpl implements Container {
|
||||||
public org.apache.hadoop.yarn.api.records.ContainerState getCurrentState() {
|
public org.apache.hadoop.yarn.api.records.ContainerState getCurrentState() {
|
||||||
switch (stateMachine.getCurrentState()) {
|
switch (stateMachine.getCurrentState()) {
|
||||||
case NEW:
|
case NEW:
|
||||||
|
return org.apache.hadoop.yarn.api.records.ContainerState.NEW;
|
||||||
case LOCALIZING:
|
case LOCALIZING:
|
||||||
case LOCALIZATION_FAILED:
|
case LOCALIZATION_FAILED:
|
||||||
case SCHEDULED:
|
case SCHEDULED:
|
||||||
|
|
|
@ -159,7 +159,8 @@ public class TestEventFlow {
|
||||||
containerManager.startContainers(allRequests);
|
containerManager.startContainers(allRequests);
|
||||||
|
|
||||||
BaseContainerManagerTest.waitForContainerState(containerManager, cID,
|
BaseContainerManagerTest.waitForContainerState(containerManager, cID,
|
||||||
Arrays.asList(ContainerState.RUNNING, ContainerState.SCHEDULED), 20);
|
Arrays.asList(ContainerState.RUNNING, ContainerState.SCHEDULED,
|
||||||
|
ContainerState.NEW), 20);
|
||||||
|
|
||||||
List<ContainerId> containerIds = new ArrayList<ContainerId>();
|
List<ContainerId> containerIds = new ArrayList<ContainerId>();
|
||||||
containerIds.add(cID);
|
containerIds.add(cID);
|
||||||
|
|
|
@ -122,6 +122,8 @@ public class TestContainer {
|
||||||
try {
|
try {
|
||||||
wc = new WrappedContainer(7, 314159265358979L, 4344, "yak");
|
wc = new WrappedContainer(7, 314159265358979L, 4344, "yak");
|
||||||
assertEquals(ContainerState.NEW, wc.c.getContainerState());
|
assertEquals(ContainerState.NEW, wc.c.getContainerState());
|
||||||
|
ContainerImpl container = (ContainerImpl)wc.c;
|
||||||
|
assertEquals(org.apache.hadoop.yarn.api.records.ContainerState.NEW, container.getCurrentState());
|
||||||
wc.initContainer();
|
wc.initContainer();
|
||||||
|
|
||||||
// Verify request for public/private resources to localizer
|
// Verify request for public/private resources to localizer
|
||||||
|
@ -131,6 +133,7 @@ public class TestContainer {
|
||||||
LocalResourceVisibility.APPLICATION));
|
LocalResourceVisibility.APPLICATION));
|
||||||
verify(wc.localizerBus).handle(argThat(matchesReq));
|
verify(wc.localizerBus).handle(argThat(matchesReq));
|
||||||
assertEquals(ContainerState.LOCALIZING, wc.c.getContainerState());
|
assertEquals(ContainerState.LOCALIZING, wc.c.getContainerState());
|
||||||
|
assertEquals(org.apache.hadoop.yarn.api.records.ContainerState.SCHEDULED, container.getCurrentState());
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
if (wc != null) {
|
if (wc != null) {
|
||||||
|
|
Loading…
Reference in New Issue