Search in sources :

Example 51 with JavaConfigurationBuilder

use of org.apache.reef.tang.JavaConfigurationBuilder in project mist by snuspl.

the class GroupSplitterTest method createApplication.

private ApplicationInfo createApplication() throws InjectionException {
    final JavaConfigurationBuilder jcb = Tang.Factory.getTang().newConfigurationBuilder();
    jcb.bindNamedParameter(ApplicationIdentifier.class, "app" + appNum);
    jcb.bindNamedParameter(JarFilePath.class, "");
    appNum += 1;
    final Injector injector = Tang.Factory.getTang().newInjector(jcb.build());
    final QueryStarter queryStarter = mock(QueryStarter.class);
    final QueryRemover queryRemover = mock(QueryRemover.class);
    final ExecutionDags executionDags = mock(ExecutionDags.class);
    injector.bindVolatileInstance(QueryStarter.class, queryStarter);
    injector.bindVolatileInstance(QueryRemover.class, queryRemover);
    injector.bindVolatileInstance(ExecutionDags.class, executionDags);
    return injector.getInstance(ApplicationInfo.class);
}
Also used : Injector(org.apache.reef.tang.Injector) JavaConfigurationBuilder(org.apache.reef.tang.JavaConfigurationBuilder)

Aggregations

JavaConfigurationBuilder (org.apache.reef.tang.JavaConfigurationBuilder)51 Injector (org.apache.reef.tang.Injector)24 CommandLine (org.apache.reef.tang.formats.CommandLine)18 APIQueryControlResult (edu.snu.mist.client.APIQueryControlResult)17 NettySourceAddress (edu.snu.mist.examples.parameters.NettySourceAddress)12 Before (org.junit.Before)9 Test (org.junit.Test)8 DefaultEventProcessorFactory (edu.snu.mist.core.task.groupaware.eventprocessor.DefaultEventProcessorFactory)5 EventProcessor (edu.snu.mist.core.task.groupaware.eventprocessor.EventProcessor)5 EventProcessorFactory (edu.snu.mist.core.task.groupaware.eventprocessor.EventProcessorFactory)5 LinkedList (java.util.LinkedList)5 LoadUpdater (edu.snu.mist.core.task.groupaware.rebalancer.LoadUpdater)4 MISTQuery (edu.snu.mist.client.MISTQuery)3 GroupRebalancer (edu.snu.mist.core.task.groupaware.rebalancer.GroupRebalancer)3 AvroDag (edu.snu.mist.formats.avro.AvroDag)3 MISTQueryBuilder (edu.snu.mist.client.MISTQueryBuilder)2 Tuple2 (edu.snu.mist.common.types.Tuple2)2 MQTTSharedResource (edu.snu.mist.core.shared.MQTTSharedResource)2 ApplicationInfo (edu.snu.mist.core.task.groupaware.ApplicationInfo)2 IdAndConfGenerator (edu.snu.mist.core.task.utils.IdAndConfGenerator)2