use of edu.snu.mist.core.task.stores.QueryInfoStore in project mist by snuspl.
the class QueryManagerTest method queryManagerBuild.
/**
* QueryManager Builder.
* It receives inputs tuple, physicalPlanGenerator, injector then makes query manager.
*/
private QueryManager queryManagerBuild(final AvroDag avroDag, final ConfigDagGenerator configDagGenerator, final DagGenerator dagGenerator, final Injector injector) throws Exception {
// Create mock PlanStore. It returns true and the above logical plan
final QueryInfoStore planStore = mock(QueryInfoStore.class);
when(planStore.load(avroDag.getQueryId())).thenReturn(avroDag);
// Create QueryManager
injector.bindVolatileInstance(ConfigDagGenerator.class, configDagGenerator);
injector.bindVolatileInstance(DagGenerator.class, dagGenerator);
injector.bindVolatileInstance(QueryInfoStore.class, planStore);
// Submit the fake logical plan
// The operators in the physical plan are executed
final QueryManager queryManager = injector.getInstance(QueryManager.class);
return queryManager;
}
Aggregations