use of edu.snu.mist.core.driver.MistDriver in project mist by snuspl.
the class MistLauncher method getDriverConfiguration.
/**
* @return the configuration of the Mist driver.
*/
public static Configuration getDriverConfiguration(final Configuration conf) {
final JavaConfigurationBuilder jcb = Tang.Factory.getTang().newConfigurationBuilder(conf);
jcb.bindImplementation(NameResolver.class, LocalNameResolverImpl.class);
jcb.bindImplementation(IdentifierFactory.class, StringIdentifierFactory.class);
final Configuration driverConf = DriverConfiguration.CONF.set(DriverConfiguration.GLOBAL_LIBRARIES, EnvironmentUtils.getClassLocation(MistDriver.class)).set(DriverConfiguration.DRIVER_IDENTIFIER, "MistDriver").set(DriverConfiguration.ON_DRIVER_STARTED, MistDriver.StartHandler.class).set(DriverConfiguration.ON_EVALUATOR_ALLOCATED, MistDriver.EvaluatorAllocatedHandler.class).set(DriverConfiguration.ON_CONTEXT_ACTIVE, MistDriver.ActiveContextHandler.class).set(DriverConfiguration.ON_TASK_RUNNING, MistDriver.RunningTaskHandler.class).build();
return Configurations.merge(driverConf, jcb.build());
}
Aggregations