use of edu.iu.dsc.tws.rsched.schedulers.nomad.master.NomadMasterStarter in project twister2 by DSC-SPIDAL.
the class NomadLauncher method launch.
@Override
public Twister2JobState launch(JobAPI.Job job) {
LOG.log(Level.INFO, "Launching job for cluster {0}", NomadContext.clusterType(config));
Twister2JobState state = new Twister2JobState(false);
NomadMasterStarter master = new NomadMasterStarter();
master.initialize(job, config);
boolean start = master.launch();
// now we need to terminate the job
if (!killJob(job.getJobId())) {
LOG.log(Level.INFO, "Failed to terminate job: " + job.getJobId());
}
state.setRequestGranted(start);
return state;
}
Aggregations