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;
}
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());
}
Aggregations