Search in sources :

Example 1 with LeastAMNodesFirstPolicy

use of org.apache.myriad.policy.LeastAMNodesFirstPolicy in project incubator-myriad by apache.

the class MyriadOperationsTest method initialize.

private MyriadOperations initialize() throws Exception {
    resetStoreState();
    SchedulerState sState = TestObjectFactory.getSchedulerState(cfg, "tmp/myriad-operations-test");
    sState.setFrameworkId(FrameworkID.newBuilder().setValue("mock-framework").build());
    AbstractYarnScheduler<FiCaSchedulerApp, FiCaSchedulerNode> scheduler = TestObjectFactory.getYarnScheduler();
    MyriadDriverManager manager = TestObjectFactory.getMyriadDriverManager();
    MyriadWebServer webServer = TestObjectFactory.getMyriadWebServer(cfg);
    CompositeInterceptor registry = new CompositeInterceptor();
    LeastAMNodesFirstPolicy policy = new LeastAMNodesFirstPolicy(registry, scheduler, sState);
    manager.startDriver();
    return new MyriadOperations(cfg, sState, policy, manager, webServer, generateRMContext(scheduler));
}
Also used : CompositeInterceptor(org.apache.myriad.scheduler.yarn.interceptor.CompositeInterceptor) MyriadWebServer(org.apache.myriad.webapp.MyriadWebServer) SchedulerState(org.apache.myriad.state.SchedulerState) FiCaSchedulerNode(org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica.FiCaSchedulerNode) FiCaSchedulerApp(org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica.FiCaSchedulerApp) LeastAMNodesFirstPolicy(org.apache.myriad.policy.LeastAMNodesFirstPolicy)

Aggregations

FiCaSchedulerApp (org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica.FiCaSchedulerApp)1 FiCaSchedulerNode (org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica.FiCaSchedulerNode)1 LeastAMNodesFirstPolicy (org.apache.myriad.policy.LeastAMNodesFirstPolicy)1 CompositeInterceptor (org.apache.myriad.scheduler.yarn.interceptor.CompositeInterceptor)1 SchedulerState (org.apache.myriad.state.SchedulerState)1 MyriadWebServer (org.apache.myriad.webapp.MyriadWebServer)1