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;
}
Aggregations