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));
}
Aggregations