Search in sources :

Example 1 with MyriadWebServer

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());
}
Also used : Connector(org.mortbay.jetty.Connector) MyriadWebServer(org.apache.myriad.webapp.MyriadWebServer) GuiceFilter(com.google.inject.servlet.GuiceFilter) Server(org.mortbay.jetty.Server) MyriadWebServer(org.apache.myriad.webapp.MyriadWebServer) HttpConnectorProvider(org.apache.myriad.webapp.HttpConnectorProvider)

Example 2 with MyriadWebServer

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

MyriadWebServer (org.apache.myriad.webapp.MyriadWebServer)2 GuiceFilter (com.google.inject.servlet.GuiceFilter)1 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 HttpConnectorProvider (org.apache.myriad.webapp.HttpConnectorProvider)1 Connector (org.mortbay.jetty.Connector)1 Server (org.mortbay.jetty.Server)1