Search in sources :

Example 11 with FileSelector

use of org.objectweb.proactive.extensions.dataspaces.vfs.selector.FileSelector in project scheduling by ow2-proactive.

the class SelectorData method createOutputSelector.

OutputSelector createOutputSelector() {
    if (!type.equals(OUTPUT_TYPE)) {
        throw new IllegalStateException("Not output selector: " + type);
    }
    FileSelector fileSelector = new FileSelector(getIncludes(), getExcludes());
    OutputSelector selector = new OutputSelector(fileSelector, OutputAccessMode.valueOf(getAccessMode()));
    return selector;
}
Also used : OutputSelector(org.ow2.proactive.scheduler.common.task.dataspaces.OutputSelector) FileSelector(org.objectweb.proactive.extensions.dataspaces.vfs.selector.FileSelector)

Example 12 with FileSelector

use of org.objectweb.proactive.extensions.dataspaces.vfs.selector.FileSelector in project scheduling by ow2-proactive.

the class TestDataspaceSelectorsData method testEmptyFileSelector.

@Test
public void testEmptyFileSelector() throws Exception {
    TaskFlowJob jobDef = new TaskFlowJob();
    JavaTask task = createDefaultTask("task1");
    task.addInputFiles(new FileSelector(), InputAccessMode.none);
    task.addOutputFiles(new FileSelector(), OutputAccessMode.none);
    jobDef.addTask(task);
    InternalJob job = defaultSubmitJobAndLoadInternal(true, jobDef);
    InternalTask task1 = job.getTask("task1");
    Assert.assertEquals(1, task1.getInputFilesList().size());
    Assert.assertEquals(InputAccessMode.none, task1.getInputFilesList().get(0).getMode());
    Assert.assertEquals(1, task1.getOutputFilesList().size());
    Assert.assertEquals(OutputAccessMode.none, task1.getOutputFilesList().get(0).getMode());
}
Also used : InternalJob(org.ow2.proactive.scheduler.job.InternalJob) InternalTask(org.ow2.proactive.scheduler.task.internal.InternalTask) TaskFlowJob(org.ow2.proactive.scheduler.common.job.TaskFlowJob) FileSelector(org.objectweb.proactive.extensions.dataspaces.vfs.selector.FileSelector) JavaTask(org.ow2.proactive.scheduler.common.task.JavaTask) Test(org.junit.Test)

Aggregations

FileSelector (org.objectweb.proactive.extensions.dataspaces.vfs.selector.FileSelector)12 Test (org.junit.Test)6 File (java.io.File)5 TaskResult (org.ow2.proactive.scheduler.common.task.TaskResult)5 OutputSelector (org.ow2.proactive.scheduler.common.task.dataspaces.OutputSelector)5 InputSelector (org.ow2.proactive.scheduler.common.task.dataspaces.InputSelector)4 ScriptExecutableContainer (org.ow2.proactive.scheduler.task.containers.ScriptExecutableContainer)4 SimpleScript (org.ow2.proactive.scripting.SimpleScript)4 TaskScript (org.ow2.proactive.scripting.TaskScript)4 TaskFlowJob (org.ow2.proactive.scheduler.common.job.TaskFlowJob)3 JavaTask (org.ow2.proactive.scheduler.common.task.JavaTask)3 NativeTask (org.ow2.proactive.scheduler.common.task.NativeTask)2 InternalJob (org.ow2.proactive.scheduler.job.InternalJob)2 InternalTask (org.ow2.proactive.scheduler.task.internal.InternalTask)2 FileNotFoundException (java.io.FileNotFoundException)1 Map (java.util.Map)1 XMLStreamException (javax.xml.stream.XMLStreamException)1 VerifierConfigurationException (org.iso_relax.verifier.VerifierConfigurationException)1 FileSystemException (org.objectweb.proactive.extensions.dataspaces.exceptions.FileSystemException)1 FileSystemServerDeployer (org.objectweb.proactive.extensions.vfsprovider.FileSystemServerDeployer)1