Search in sources :

Example 1 with MistDriver

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());
}
Also used : MistDriver(edu.snu.mist.core.driver.MistDriver) DriverConfiguration(org.apache.reef.client.DriverConfiguration) YarnClientConfiguration(org.apache.reef.runtime.yarn.client.YarnClientConfiguration) LocalRuntimeConfiguration(org.apache.reef.runtime.local.client.LocalRuntimeConfiguration) Configuration(org.apache.reef.tang.Configuration) JavaConfigurationBuilder(org.apache.reef.tang.JavaConfigurationBuilder)

Aggregations

MistDriver (edu.snu.mist.core.driver.MistDriver)1 DriverConfiguration (org.apache.reef.client.DriverConfiguration)1 LocalRuntimeConfiguration (org.apache.reef.runtime.local.client.LocalRuntimeConfiguration)1 YarnClientConfiguration (org.apache.reef.runtime.yarn.client.YarnClientConfiguration)1 Configuration (org.apache.reef.tang.Configuration)1 JavaConfigurationBuilder (org.apache.reef.tang.JavaConfigurationBuilder)1