YARN-1873. Fixed TestDistributedShell failure when the test cases are out of order. Contributed by Mit Desai.
svn merge --ignore-ancestry -c 1582060
../../trunk/
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1582062 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8dc3ad11a9
commit
40c110c530
|
@ -570,6 +570,9 @@ Release 2.4.0 - UNRELEASED
|
||||||
ResourceTrackerProtocol so that they work in HA scenario. (Xuan Gong
|
ResourceTrackerProtocol so that they work in HA scenario. (Xuan Gong
|
||||||
via jianhe)
|
via jianhe)
|
||||||
|
|
||||||
|
YARN-1873. Fixed TestDistributedShell failure when the test cases are out of
|
||||||
|
order. (Mit Desai via zjshen)
|
||||||
|
|
||||||
Release 2.3.1 - UNRELEASED
|
Release 2.3.1 - UNRELEASED
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -51,8 +51,8 @@ import org.apache.hadoop.yarn.server.nodemanager.NodeManager;
|
||||||
import org.apache.hadoop.yarn.server.nodemanager.containermanager.ContainerManagerImpl;
|
import org.apache.hadoop.yarn.server.nodemanager.containermanager.ContainerManagerImpl;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ResourceScheduler;
|
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.ResourceScheduler;
|
||||||
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler;
|
import org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler;
|
||||||
import org.junit.AfterClass;
|
import org.junit.After;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
public class TestDistributedShell {
|
public class TestDistributedShell {
|
||||||
|
@ -60,13 +60,14 @@ public class TestDistributedShell {
|
||||||
private static final Log LOG =
|
private static final Log LOG =
|
||||||
LogFactory.getLog(TestDistributedShell.class);
|
LogFactory.getLog(TestDistributedShell.class);
|
||||||
|
|
||||||
protected static MiniYARNCluster yarnCluster = null;
|
protected MiniYARNCluster yarnCluster = null;
|
||||||
protected static Configuration conf = new YarnConfiguration();
|
protected Configuration conf = new YarnConfiguration();
|
||||||
|
|
||||||
protected static String APPMASTER_JAR = JarFinder.getJar(ApplicationMaster.class);
|
protected final static String APPMASTER_JAR =
|
||||||
|
JarFinder.getJar(ApplicationMaster.class);
|
||||||
|
|
||||||
@BeforeClass
|
@Before
|
||||||
public static void setup() throws Exception {
|
public void setup() throws Exception {
|
||||||
LOG.info("Starting up YARN cluster");
|
LOG.info("Starting up YARN cluster");
|
||||||
conf.setInt(YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB, 128);
|
conf.setInt(YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB, 128);
|
||||||
conf.setClass(YarnConfiguration.RM_SCHEDULER,
|
conf.setClass(YarnConfiguration.RM_SCHEDULER,
|
||||||
|
@ -106,11 +107,11 @@ public class TestDistributedShell {
|
||||||
Thread.sleep(2000);
|
Thread.sleep(2000);
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
LOG.info("setup thread sleep interrupted. message=" + e.getMessage());
|
LOG.info("setup thread sleep interrupted. message=" + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterClass
|
@After
|
||||||
public static void tearDown() throws IOException {
|
public void tearDown() throws IOException {
|
||||||
if (yarnCluster != null) {
|
if (yarnCluster != null) {
|
||||||
try {
|
try {
|
||||||
yarnCluster.stop();
|
yarnCluster.stop();
|
||||||
|
|
Loading…
Reference in New Issue