Search in sources :

Example 1 with REEF

use of org.apache.reef.client.REEF in project heron by twitter.

the class YarnLauncher method launch.

@Override
public boolean launch(PackingPlan packing) {
    Configuration reefRuntimeConf = getRuntimeConf();
    Configuration reefDriverConf = getHMDriverConf();
    Configuration reefClientConf = getClientConf();
    boolean ret;
    try {
        final Injector injector = Tang.Factory.getTang().newInjector(reefRuntimeConf, reefClientConf);
        final REEF reef = injector.getInstance(REEF.class);
        final ReefClientSideHandlers client = injector.getInstance(ReefClientSideHandlers.class);
        reef.submit(reefDriverConf);
        ret = client.waitForSchedulerJobResponse();
    } catch (InjectionException | InterruptedException e) {
        LOG.log(Level.WARNING, "Failed to launch REEF app", e);
        return false;
    }
    return ret;
}
Also used : InjectionException(org.apache.reef.tang.exceptions.InjectionException) REEF(org.apache.reef.client.REEF) YarnClientConfiguration(org.apache.reef.runtime.yarn.client.YarnClientConfiguration) Configuration(org.apache.reef.tang.Configuration) ClientConfiguration(org.apache.reef.client.ClientConfiguration) DriverConfiguration(org.apache.reef.client.DriverConfiguration) YarnDriverConfiguration(org.apache.reef.runtime.yarn.client.YarnDriverConfiguration) Injector(org.apache.reef.tang.Injector)

Aggregations

ClientConfiguration (org.apache.reef.client.ClientConfiguration)1 DriverConfiguration (org.apache.reef.client.DriverConfiguration)1 REEF (org.apache.reef.client.REEF)1 YarnClientConfiguration (org.apache.reef.runtime.yarn.client.YarnClientConfiguration)1 YarnDriverConfiguration (org.apache.reef.runtime.yarn.client.YarnDriverConfiguration)1 Configuration (org.apache.reef.tang.Configuration)1 Injector (org.apache.reef.tang.Injector)1 InjectionException (org.apache.reef.tang.exceptions.InjectionException)1