Search in sources :

Example 1 with ContainerStartContext

use of org.apache.hadoop.yarn.server.nodemanager.executor.ContainerStartContext in project hadoop by apache.

the class TestContainerSchedulerQueuing method createContainerExecutor.

@Override
protected ContainerExecutor createContainerExecutor() {
    DefaultContainerExecutor exec = new DefaultContainerExecutor() {

        @Override
        public int launchContainer(ContainerStartContext ctx) throws IOException {
            if (delayContainers) {
                try {
                    Thread.sleep(10000);
                } catch (InterruptedException e) {
                // Nothing..
                }
            }
            return super.launchContainer(ctx);
        }
    };
    exec.setConf(conf);
    return spy(exec);
}
Also used : DefaultContainerExecutor(org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor) ContainerStartContext(org.apache.hadoop.yarn.server.nodemanager.executor.ContainerStartContext)

Aggregations

DefaultContainerExecutor (org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor)1 ContainerStartContext (org.apache.hadoop.yarn.server.nodemanager.executor.ContainerStartContext)1