|
From: <ha...@us...> - 2007-08-20 22:28:10
|
Revision: 1692
http://cogkit.svn.sourceforge.net/cogkit/?rev=1692&view=rev
Author: hategan
Date: 2007-08-20 15:28:02 -0700 (Mon, 20 Aug 2007)
Log Message:
-----------
updated redirection stuff
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-gt4_0_0/CHANGES.txt
trunk/current/src/cog/modules/provider-gt4_0_0/src/org/globus/cog/abstraction/impl/execution/gt4_0_0/JobSubmissionTaskHandler.java
Modified: trunk/current/src/cog/modules/provider-gt4_0_0/CHANGES.txt
===================================================================
--- trunk/current/src/cog/modules/provider-gt4_0_0/CHANGES.txt 2007-08-20 22:27:42 UTC (rev 1691)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/CHANGES.txt 2007-08-20 22:28:02 UTC (rev 1692)
@@ -1,3 +1,7 @@
+(08/20/2007)
+
+*** Updated to use new redirection stuff
+
(05/20/2007)
*** Corrected instances in which cleanup is done
Modified: trunk/current/src/cog/modules/provider-gt4_0_0/src/org/globus/cog/abstraction/impl/execution/gt4_0_0/JobSubmissionTaskHandler.java
===================================================================
--- trunk/current/src/cog/modules/provider-gt4_0_0/src/org/globus/cog/abstraction/impl/execution/gt4_0_0/JobSubmissionTaskHandler.java 2007-08-20 22:27:42 UTC (rev 1691)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/src/org/globus/cog/abstraction/impl/execution/gt4_0_0/JobSubmissionTaskHandler.java 2007-08-20 22:28:02 UTC (rev 1692)
@@ -25,6 +25,7 @@
import org.globus.cog.abstraction.interfaces.DelegatedTaskHandler;
import org.globus.cog.abstraction.interfaces.Delegation;
import org.globus.cog.abstraction.interfaces.ExecutionService;
+import org.globus.cog.abstraction.interfaces.FileLocation;
import org.globus.cog.abstraction.interfaces.JobSpecification;
import org.globus.cog.abstraction.interfaces.Service;
import org.globus.cog.abstraction.interfaces.ServiceContact;
@@ -189,8 +190,8 @@
}
catch (Exception e) {
failTask(e.getMessage(), e);
- //No need for cleanup. Reportedly no resource has been created
- //if an exception is thrown
+ // No need for cleanup. Reportedly no resource has been created
+ // if an exception is thrown
gramJob.removeListener(this);
throw new TaskSubmissionException("Cannot submit job: "
+ e.getMessage(), e);
@@ -222,6 +223,9 @@
}
}
+ private static final FileLocation REDIRECT_LOCATION = FileLocation.MEMORY
+ .and(FileLocation.LOCAL);
+
private JobDescriptionType prepareSpecification(JobSpecification spec,
String server) throws IllegalSpecException, TaskSubmissionException {
// if the job specification is explicitly specified
@@ -275,7 +279,8 @@
new String[0]));
boolean batchJob = spec.isBatchJob();
- if (spec.isRedirected()) {
+ if (FileLocation.MEMORY_AND_LOCAL.overlaps(spec.getStdOutputLocation()
+ .and(spec.getStdErrorLocation()))) {
throw new IllegalSpecException(
"The gt4.0.0 provider does not support redirection");
}
@@ -291,7 +296,7 @@
}
}
- if (spec.isLocalExecutable()) {
+ if (FileLocation.LOCAL.overlaps(spec.getExecutableLocation())) {
throw new IllegalSpecException(
"The gt4.0.0 provider does not support local executables");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|