Search in sources :

Example 46 with SelectionScript

use of org.ow2.proactive.scripting.SelectionScript in project scheduling by ow2-proactive.

the class TestJobSchedulingStarvationAndPriority method createJobHighSelectFalse.

/*
     * Job high priority with one task, task's selection script always returns 'false' so task can't
     * start
     */
private TaskFlowJob createJobHighSelectFalse() throws Exception {
    TaskFlowJob job = new TaskFlowJob();
    job.setName(this.getClass().getSimpleName() + "_High_SelectFalse");
    job.setPriority(JobPriority.HIGHEST);
    JavaTask javaTask = new JavaTask();
    javaTask.setExecutableClassName(EmptyTask.class.getName());
    javaTask.setName("taskSelectFalse");
    SelectionScript selScript = new SelectionScript("selected = false;", "js");
    javaTask.setSelectionScript(selScript);
    job.addTask(javaTask);
    return job;
}
Also used : SelectionScript(org.ow2.proactive.scripting.SelectionScript) TaskFlowJob(org.ow2.proactive.scheduler.common.job.TaskFlowJob) JavaTask(org.ow2.proactive.scheduler.common.task.JavaTask) EmptyTask(org.ow2.proactive.scheduler.examples.EmptyTask)

Aggregations

SelectionScript (org.ow2.proactive.scripting.SelectionScript)42 Test (org.junit.Test)18 File (java.io.File)13 RMFunctionalTest (functionaltests.utils.RMFunctionalTest)10 NodeSet (org.ow2.proactive.utils.NodeSet)10 ResourceManager (org.ow2.proactive.resourcemanager.frontend.ResourceManager)9 TaskFlowJob (org.ow2.proactive.scheduler.common.job.TaskFlowJob)9 JavaTask (org.ow2.proactive.scheduler.common.task.JavaTask)9 RMNode (org.ow2.proactive.resourcemanager.rmnode.RMNode)8 ArrayList (java.util.ArrayList)7 HashMap (java.util.HashMap)7 RMNodeEvent (org.ow2.proactive.resourcemanager.common.event.RMNodeEvent)6 SelectionManager (org.ow2.proactive.resourcemanager.selection.SelectionManager)6 SelectionManagerTest (org.ow2.proactive.resourcemanager.selection.SelectionManagerTest)6 SimpleScript (org.ow2.proactive.scripting.SimpleScript)6 TestNode (functionaltests.utils.TestNode)5 Criteria (org.ow2.proactive.utils.Criteria)4 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)3 HashSet (java.util.HashSet)3 Node (org.objectweb.proactive.core.node.Node)3