Revert "YARN-6570. No logs were found for running application, running"
This reverts commit e103acc8f4
.
This commit is contained in:
parent
3ecc1431fc
commit
44b51b0047
|
@ -20,7 +20,6 @@ package org.apache.hadoop.yarn.api.records;
|
|||
|
||||
import org.apache.hadoop.classification.InterfaceAudience.Public;
|
||||
import org.apache.hadoop.classification.InterfaceStability.Stable;
|
||||
import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
||||
|
||||
/**
|
||||
* <p>State of a <code>Container</code>.</p>
|
||||
|
@ -29,15 +28,11 @@ import org.apache.hadoop.classification.InterfaceStability.Unstable;
|
|||
@Stable
|
||||
public enum ContainerState {
|
||||
/** New container */
|
||||
NEW,
|
||||
|
||||
NEW,
|
||||
|
||||
/** Running container */
|
||||
RUNNING,
|
||||
|
||||
RUNNING,
|
||||
|
||||
/** Completed container */
|
||||
COMPLETE,
|
||||
|
||||
/** Scheduled (awaiting resources) at the NM. */
|
||||
@Unstable
|
||||
SCHEDULED
|
||||
}
|
||||
COMPLETE
|
||||
}
|
|
@ -82,7 +82,6 @@ enum ContainerStateProto {
|
|||
C_NEW = 1;
|
||||
C_RUNNING = 2;
|
||||
C_COMPLETE = 3;
|
||||
C_SCHEDULED = 4;
|
||||
}
|
||||
|
||||
message ContainerProto {
|
||||
|
|
|
@ -363,11 +363,9 @@ public class ContainerImpl implements Container {
|
|||
public org.apache.hadoop.yarn.api.records.ContainerState getCurrentState() {
|
||||
switch (stateMachine.getCurrentState()) {
|
||||
case NEW:
|
||||
return org.apache.hadoop.yarn.api.records.ContainerState.NEW;
|
||||
case LOCALIZING:
|
||||
case LOCALIZATION_FAILED:
|
||||
case LOCALIZED:
|
||||
return org.apache.hadoop.yarn.api.records.ContainerState.SCHEDULED;
|
||||
case RUNNING:
|
||||
case EXITED_WITH_SUCCESS:
|
||||
case EXITED_WITH_FAILURE:
|
||||
|
|
|
@ -21,7 +21,6 @@ package org.apache.hadoop.yarn.server.nodemanager;
|
|||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.hadoop.fs.FileContext;
|
||||
|
@ -156,7 +155,7 @@ public class TestEventFlow {
|
|||
containerManager.startContainers(allRequests);
|
||||
|
||||
BaseContainerManagerTest.waitForContainerState(containerManager, cID,
|
||||
ContainerState.NEW);
|
||||
ContainerState.RUNNING);
|
||||
|
||||
List<ContainerId> containerIds = new ArrayList<ContainerId>();
|
||||
containerIds.add(cID);
|
||||
|
|
|
@ -454,14 +454,6 @@ public class TestNodeManagerResync {
|
|||
if (containersShouldBePreserved) {
|
||||
Assert.assertFalse(containers.isEmpty());
|
||||
Assert.assertTrue(containers.containsKey(existingCid));
|
||||
ContainerState state = containers.get(existingCid)
|
||||
.cloneAndGetContainerStatus().getState();
|
||||
// Wait till RUNNING state...
|
||||
int counter = 50;
|
||||
while (state != ContainerState.RUNNING && counter > 0) {
|
||||
Thread.sleep(100);
|
||||
counter--;
|
||||
}
|
||||
Assert.assertEquals(ContainerState.RUNNING,
|
||||
containers.get(existingCid)
|
||||
.cloneAndGetContainerStatus().getState());
|
||||
|
|
|
@ -255,7 +255,7 @@ public class TestNodeManagerShutdown {
|
|||
GetContainerStatusesRequest.newInstance(containerIds);
|
||||
ContainerStatus containerStatus =
|
||||
containerManager.getContainerStatuses(request).getContainerStatuses().get(0);
|
||||
Assert.assertEquals(ContainerState.SCHEDULED, containerStatus.getState());
|
||||
Assert.assertEquals(ContainerState.RUNNING, containerStatus.getState());
|
||||
}
|
||||
|
||||
public static ContainerId createContainerId() {
|
||||
|
|
|
@ -110,8 +110,6 @@ public class TestContainer {
|
|||
try {
|
||||
wc = new WrappedContainer(7, 314159265358979L, 4344, "yak");
|
||||
assertEquals(ContainerState.NEW, wc.c.getContainerState());
|
||||
ContainerImpl container = (ContainerImpl)wc.c;
|
||||
assertEquals(org.apache.hadoop.yarn.api.records.ContainerState.NEW, container.getCurrentState());
|
||||
wc.initContainer();
|
||||
|
||||
// Verify request for public/private resources to localizer
|
||||
|
@ -121,7 +119,6 @@ public class TestContainer {
|
|||
LocalResourceVisibility.APPLICATION));
|
||||
verify(wc.localizerBus).handle(argThat(matchesReq));
|
||||
assertEquals(ContainerState.LOCALIZING, wc.c.getContainerState());
|
||||
assertEquals(org.apache.hadoop.yarn.api.records.ContainerState.SCHEDULED, container.getCurrentState());
|
||||
}
|
||||
finally {
|
||||
if (wc != null) {
|
||||
|
|
Loading…
Reference in New Issue