use of org.ow2.proactive.scheduler.common.job.TaskFlowJob in project scheduling by ow2-proactive.
the class SchedulerDBManagerTest method createTestJob.
private InternalJob createTestJob(String jobName, String taskTag, int nbTasks) throws Exception {
TaskFlowJob job = new TaskFlowJob();
job.setName(jobName);
for (int i = 1; i <= nbTasks; i++) {
JavaTask task = new JavaTask();
task.setName(jobName + "-TASK-" + i + "/" + nbTasks);
task.setExecutableClassName("class");
task.setTag(taskTag);
job.addTask(task);
}
return createJob(job);
}
use of org.ow2.proactive.scheduler.common.job.TaskFlowJob in project scheduling by ow2-proactive.
the class SchedulingServiceTest2 method createTestJob.
private TaskFlowJob createTestJob() throws Exception {
TaskFlowJob job = new TaskFlowJob();
job.setName(this.getClass().getSimpleName());
JavaTask task1 = new JavaTask();
task1.setName("javaTask");
task1.setExecutableClassName("class");
task1.setOnTaskError(OnTaskError.CANCEL_JOB);
job.addTask(task1);
NativeTask task2 = new NativeTask();
task2.setName("nativeTask");
task2.setCommandLine("command line");
task2.setOnTaskError(OnTaskError.CANCEL_JOB);
job.addTask(task2);
return job;
}
use of org.ow2.proactive.scheduler.common.job.TaskFlowJob in project scheduling by ow2-proactive.
the class SchedulingServiceTest4 method createTestJob.
private TaskFlowJob createTestJob() throws Exception {
TaskFlowJob job = new TaskFlowJob();
job.setName(this.getClass().getSimpleName());
JavaTask task1 = new JavaTask();
task1.setName("javaTask");
task1.setExecutableClassName("class");
task1.setMaxNumberOfExecution(3);
job.addTask(task1);
return job;
}
use of org.ow2.proactive.scheduler.common.job.TaskFlowJob in project scheduling by ow2-proactive.
the class ExtendedSchedulerPolicyTest method createJobDescWithTwoTasks.
private JobDescriptor createJobDescWithTwoTasks(String jobStartAt, String oneTaskStartAt, String otherTaskStartAt) {
InternalTaskFlowJob taskFlowJob = new InternalTaskFlowJob("test", JobPriority.NORMAL, OnTaskError.CANCEL_JOB, "");
taskFlowJob.setId(JobIdImpl.makeJobId(Integer.toString(jobId++)));
ArrayList<InternalTask> tasks = new ArrayList<>();
tasks.add(createTask(oneTaskStartAt));
tasks.add(createTask(otherTaskStartAt));
taskFlowJob.addTasks(tasks);
if (jobStartAt != null) {
taskFlowJob.addGenericInformation("START_AT", jobStartAt);
}
return new JobDescriptorImpl(taskFlowJob);
}
use of org.ow2.proactive.scheduler.common.job.TaskFlowJob in project scheduling by ow2-proactive.
the class ByteCompressionUtilsTest method setup.
@Before
public void setup() throws UserException {
job = new TaskFlowJob();
job.setName(this.getClass().getName());
job.addTask(new JavaTask());
jobByte = SerializationUtils.serialize(job);
}
Aggregations