Search in sources :

Example 1 with NomadMasterStarter

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;
}
Also used : Twister2JobState(edu.iu.dsc.tws.api.scheduler.Twister2JobState) NomadMasterStarter(edu.iu.dsc.tws.rsched.schedulers.nomad.master.NomadMasterStarter)

Aggregations

Twister2JobState (edu.iu.dsc.tws.api.scheduler.Twister2JobState)1 NomadMasterStarter (edu.iu.dsc.tws.rsched.schedulers.nomad.master.NomadMasterStarter)1