use of org.apache.myriad.webapp.MyriadWebServer in project incubator-myriad by apache.
the class TestObjectFactory method getMyriadWebServer.
public static MyriadWebServer getMyriadWebServer(MyriadConfiguration cfg) {
Server server = TestObjectFactory.getJettyServer();
HttpConnectorProvider provider = new HttpConnectorProvider(cfg);
Connector connector = provider.get();
return new MyriadWebServer(server, connector, new GuiceFilter());
}
use of org.apache.myriad.webapp.MyriadWebServer 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