|
From: <ha...@us...> - 2006-10-09 15:05:17
|
Revision: 880
http://svn.sourceforge.net/cogkit/?rev=880&view=rev
Author: hategan
Date: 2006-10-09 08:05:12 -0700 (Mon, 09 Oct 2006)
Log Message:
-----------
oops
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
Modified: trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
===================================================================
--- trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2006-10-09 14:45:15 UTC (rev 879)
+++ trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2006-10-09 15:05:12 UTC (rev 880)
@@ -76,7 +76,9 @@
} catch (Throwable e) {
throw new IllegalSpecException("Cannot parse the given RSL", e);
}
- logger.debug("RSL: " + rsl);
+ if (logger.isDebugEnabled()) {
+ logger.debug("RSL: " + rsl);
+ }
if (rslTree.getOperator() == RslNode.MULTI) {
this.task.setAttribute("jobCount", "multiple");
@@ -114,7 +116,9 @@
if (jobmanager != null) {
server = handleJobManager(server, jobmanager);
}
- logger.debug("Execution server: " + server);
+ if (logger.isDebugEnabled()) {
+ logger.debug("Execution server: " + server);
+ }
boolean limitedDeleg = (securityContext.getDelegation() != GlobusSecurityContextImpl.FULL_DELEGATION);
limitedDeleg &= !spec.isDelegationEnabled();
try {
@@ -122,8 +126,10 @@
// submitted for execution
if (this.task.getStatus().getStatusCode() == Status.UNSUBMITTED) {
this.gramJob.request(server, spec.isBatchJob(), limitedDeleg);
- logger.debug("Submitted job with Globus ID: "
- + this.gramJob.getIDAsString());
+ if (logger.isDebugEnabled()) {
+ logger.debug("Submitted job with Globus ID: "
+ + this.gramJob.getIDAsString());
+ }
this.task.setStatus(Status.SUBMITTED);
if (spec.isBatchJob()) {
this.task.setStatus(Status.COMPLETED);
@@ -200,9 +206,10 @@
boolean limitedDeleg = (securityContext.getDelegation() == GlobusSecurityContextImpl.PARTIAL_DELEGATION);
try {
job.request(rmc, false, limitedDeleg);
- logger
- .debug("Submitted job with Globus ID: "
- + job.getIDAsString());
+ if (logger.isDebugEnabled()) {
+ logger.debug("Submitted job with Globus ID: "
+ + job.getIDAsString());
+ }
} catch (GramException ge) {
Status newStatus = new StatusImpl();
Status oldStatus = this.task.getStatus();
@@ -304,12 +311,10 @@
// sets other parameters
NameOpValue args = new NameOpValue("arguments", NameOpValue.EQ);
if (!spec.getArgumentsAsList().isEmpty()) {
- List arglist = new LinkedList();
Iterator i = spec.getArgumentsAsList().iterator();
while (i.hasNext()) {
- arglist.add(new Value((String) i.next()));
+ args.add((String) i.next());
}
- args.add(arglist);
rsl.add(args);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-02-23 18:23:00
|
Revision: 1589
http://svn.sourceforge.net/cogkit/?rev=1589&view=rev
Author: hategan
Date: 2007-02-23 10:22:52 -0800 (Fri, 23 Feb 2007)
Log Message:
-----------
fixed 4996, 5021, and skipped a useless parsing of the RSL
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
Modified: trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
===================================================================
--- trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2007-02-15 03:49:30 UTC (rev 1588)
+++ trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2007-02-23 18:22:52 UTC (rev 1589)
@@ -19,7 +19,6 @@
import org.globus.cog.abstraction.impl.common.task.InvalidServiceContactException;
import org.globus.cog.abstraction.impl.common.task.TaskSubmissionException;
import org.globus.cog.abstraction.interfaces.DelegatedTaskHandler;
-import org.globus.cog.abstraction.interfaces.ExecutionService;
import org.globus.cog.abstraction.interfaces.JobSpecification;
import org.globus.cog.abstraction.interfaces.ServiceContact;
import org.globus.cog.abstraction.interfaces.Status;
@@ -33,8 +32,8 @@
import org.globus.io.gass.server.JobOutputStream;
import org.globus.rsl.Binding;
import org.globus.rsl.Bindings;
-import org.globus.rsl.ListRslNode;
import org.globus.rsl.NameOpValue;
+import org.globus.rsl.ParseException;
import org.globus.rsl.RSLParser;
import org.globus.rsl.RslNode;
import org.globus.rsl.Value;
@@ -66,27 +65,29 @@
JobSpecification spec;
try {
spec = (JobSpecification) this.task.getSpecification();
- } catch (Exception e) {
+ }
+ catch (Exception e) {
throw new IllegalSpecException(
"Exception while retreiving Job Specification", e);
}
- rsl = prepareSpecification(spec);
RslNode rslTree = null;
try {
- rslTree = RSLParser.parse(rsl);
- } catch (Throwable e) {
+ rslTree = prepareSpecification(spec);
+ }
+ catch (Throwable e) {
throw new IllegalSpecException("Cannot parse the given RSL", e);
}
if (logger.isDebugEnabled()) {
- logger.debug("RSL: " + rsl);
+ logger.debug("RSL: " + rslTree);
}
if (rslTree.getOperator() == RslNode.MULTI) {
this.task.setAttribute("jobCount", "multiple");
submitMultipleJobs(rslTree, spec);
- } else {
+ }
+ else {
this.task.setAttribute("jobCount", "single");
- submitSingleJob(rsl, spec);
+ submitSingleJob(rslTree.toString(), spec);
}
}
@@ -98,7 +99,8 @@
try {
this.gramJob.setCredentials((GSSCredential) securityContext
.getCredentials());
- } catch (IllegalArgumentException iae) {
+ }
+ catch (IllegalArgumentException iae) {
throw new InvalidSecurityContextException(
"Cannot set the SecurityContext twice", iae);
}
@@ -137,7 +139,8 @@
this.task.setStatus(Status.COMPLETED);
}
}
- } catch (GramException ge) {
+ }
+ catch (GramException ge) {
Status newStatus = new StatusImpl();
Status oldStatus = this.task.getStatus();
newStatus.setPrevStatusCode(oldStatus.getStatusCode());
@@ -146,7 +149,8 @@
this.task.setStatus(newStatus);
cleanup();
throw new TaskSubmissionException("Cannot submit job", ge);
- } catch (GSSException gsse) {
+ }
+ catch (GSSException gsse) {
Status newStatus = new StatusImpl();
Status oldStatus = this.task.getStatus();
newStatus.setPrevStatusCode(oldStatus.getStatusCode());
@@ -178,7 +182,8 @@
if (nv == null) {
throw new IllegalSpecException(
"Error: No resource manager contact for job.");
- } else {
+ }
+ else {
Object obj = nv.getFirstValue();
if (obj instanceof Value) {
rmc = ((Value) obj).getValue();
@@ -200,7 +205,8 @@
job
.setCredentials((GSSCredential) securityContext
.getCredentials());
- } catch (IllegalArgumentException iae) {
+ }
+ catch (IllegalArgumentException iae) {
throw new InvalidSecurityContextException(
"Cannot set the SecurityContext twice", iae);
}
@@ -212,7 +218,8 @@
logger.debug("Submitted job with Globus ID: "
+ job.getIDAsString());
}
- } catch (GramException ge) {
+ }
+ catch (GramException ge) {
Status newStatus = new StatusImpl();
Status oldStatus = this.task.getStatus();
newStatus.setPrevStatusCode(oldStatus.getStatusCode());
@@ -221,7 +228,8 @@
this.task.setStatus(newStatus);
listener.failed(true);
throw new TaskSubmissionException("Cannot submit job", ge);
- } catch (GSSException gsse) {
+ }
+ catch (GSSException gsse) {
Status newStatus = new StatusImpl();
Status oldStatus = this.task.getStatus();
newStatus.setPrevStatusCode(oldStatus.getStatusCode());
@@ -259,26 +267,36 @@
GramJob job = (GramJob) iterator.next();
job.cancel();
}
- } else {
+ }
+ else {
this.gramJob.cancel();
}
this.task.setStatus(Status.CANCELED);
- } catch (GramException ge) {
+ }
+ catch (GramException ge) {
cleanup();
throw new TaskSubmissionException("Cannot cancel job", ge);
- } catch (GSSException gsse) {
+ }
+ catch (GSSException gsse) {
cleanup();
throw new InvalidSecurityContextException("Invalid GSSCredentials",
gsse);
}
}
- private String prepareSpecification(JobSpecification spec)
+ private RslNode prepareSpecification(JobSpecification spec)
throws IllegalSpecException, TaskSubmissionException {
- ListRslNode rsl = new ListRslNode(RslNode.AND);
+ RslNode rsl = new RslNode(RslNode.AND);
if (spec.getSpecification() != null) {
- return spec.getSpecification();
- } else {
+ try {
+ return RSLParser.parse(spec.getSpecification());
+ }
+ catch (ParseException e) {
+ throw new IllegalSpecException("Failed to parse specification",
+ e);
+ }
+ }
+ else {
boolean batchJob = spec.isBatchJob();
boolean redirected = spec.isRedirected();
boolean localExecutable = spec.isLocalExecutable();
@@ -301,12 +319,14 @@
if (this.startGassServer && localExecutable) {
rsl.add(new NameOpValue("executable", NameOpValue.EQ,
new VarRef("GLOBUSRUN_GASS_URL", null, new Value(
- spec.getExecutable()))));
- } else {
+ fixAbsPath(spec.getExecutable())))));
+ }
+ else {
rsl.add(new NameOpValue("executable", NameOpValue.EQ, spec
.getExecutable()));
}
- } else {
+ }
+ else {
throw new IllegalSpecException("Missing executable");
}
@@ -346,8 +366,9 @@
if (this.startGassServer && localInput) {
rsl.add(new NameOpValue("stdin", NameOpValue.EQ,
new VarRef("GLOBUSRUN_GASS_URL", null, new Value(
- spec.getStdInput()))));
- } else {
+ fixAbsPath(spec.getStdInput())))));
+ }
+ else {
rsl.add(new NameOpValue("stdin", NameOpValue.EQ, spec
.getStdInput()));
}
@@ -361,12 +382,14 @@
|| (spec.getStdOutput().equals(""))) {
v = new Value("/dev/stdout-"
+ this.task.getIdentity().toString());
- } else {
- v = new Value(spec.getStdOutput());
}
+ else {
+ v = new Value(fixAbsPath(spec.getStdOutput()));
+ }
rsl.add(new NameOpValue("stdout", NameOpValue.EQ, new VarRef(
"GLOBUSRUN_GASS_URL", null, v)));
- } else if (spec.getStdOutput() != null) {
+ }
+ else if (spec.getStdOutput() != null) {
// output on the remote machine
rsl.add(new NameOpValue("stdout", NameOpValue.EQ, spec
.getStdOutput()));
@@ -379,12 +402,14 @@
|| (spec.getStdError().equals(""))) {
v = new Value("/dev/stderr-"
+ this.task.getIdentity().toString());
- } else {
- v = new Value(spec.getStdError());
}
+ else {
+ v = new Value(fixAbsPath(spec.getStdError()));
+ }
rsl.add(new NameOpValue("stderr", NameOpValue.EQ, new VarRef(
"GLOBUSRUN_GASS_URL", null, v)));
- } else if (spec.getStdError() != null) {
+ }
+ else if (spec.getStdError() != null) {
// error on the remote machine
rsl.add(new NameOpValue("stderr", NameOpValue.EQ, spec
.getStdError()));
@@ -396,13 +421,14 @@
String key = (String) i.next();
rsl.add(new NameOpValue(key, NameOpValue.EQ, (String) spec
.getAttribute(key)));
- } catch (Exception e) {
+ }
+ catch (Exception e) {
throw new IllegalSpecException(
"Cannot parse the user defined attributes");
}
}
-
- return rsl.toString();
+
+ return rsl;
}
}
@@ -416,7 +442,8 @@
.getGassServer((GSSCredential) securityContext
.getCredentials());
this.gassServer.registerDefaultDeactivator();
- } catch (Exception e) {
+ }
+ catch (Exception e) {
throw new TaskSubmissionException(
"Problems while creating a Gass Server", e);
}
@@ -478,7 +505,8 @@
String output = this.task.getStdOutput();
if (output == null) {
output = s;
- } else {
+ }
+ else {
output += s;
}
this.task.setStdOutput(output);
@@ -499,20 +527,24 @@
private String handleJobManager(String server, String jobmanager)
throws InvalidServiceContactException {
- if (jobmanager.equalsIgnoreCase(ExecutionService.FORK_JOBMANAGER)
- || jobmanager.equalsIgnoreCase("jobmanager-"
- + ExecutionService.FORK_JOBMANAGER)) {
- logger.debug("Using the FORK jobmanager: " + server
- + "/jobmanager-fork");
- return server + "/jobmanager-fork";
- } else if (jobmanager.equalsIgnoreCase(ExecutionService.PBS_JOBMANAGER)
- || jobmanager.equalsIgnoreCase("jobmanager-"
- + ExecutionService.PBS_JOBMANAGER)) {
- logger.debug("Using the PBS jobmanager: " + server
- + "/jobmanager-pbs");
- return server + "/jobmanager-pbs";
+ if (server.indexOf("/jobmanager-") != -1) {
+ // the jobmanager attribute takes precedence
+ server = server.substring(0, server.lastIndexOf("/jobmanager-"));
}
- throw new InvalidServiceContactException(jobmanager
- + " job manager is not supported by the GT2 provider");
+ String lcjm = jobmanager.toLowerCase();
+ server = server + "/jobmanager-" + lcjm;
+ return server;
}
+
+ private String fixAbsPath(String path) {
+ if (path == null) {
+ return null;
+ }
+ else if (path.startsWith("/") && !path.startsWith("///")) {
+ return "//" + path;
+ }
+ else {
+ return path;
+ }
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-09-19 20:41:47
|
Revision: 1749
http://cogkit.svn.sourceforge.net/cogkit/?rev=1749&view=rev
Author: hategan
Date: 2007-09-19 13:41:43 -0700 (Wed, 19 Sep 2007)
Log Message:
-----------
don't set status if exception is thrown
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
Modified: trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
===================================================================
--- trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2007-09-19 20:40:51 UTC (rev 1748)
+++ trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2007-09-19 20:41:43 UTC (rev 1749)
@@ -145,22 +145,10 @@
}
}
catch (GramException ge) {
- Status newStatus = new StatusImpl();
- Status oldStatus = this.task.getStatus();
- newStatus.setPrevStatusCode(oldStatus.getStatusCode());
- newStatus.setStatusCode(Status.FAILED);
- newStatus.setException(ge);
- this.task.setStatus(newStatus);
cleanup();
throw new TaskSubmissionException("Cannot submit job", ge);
}
catch (GSSException gsse) {
- Status newStatus = new StatusImpl();
- Status oldStatus = this.task.getStatus();
- newStatus.setPrevStatusCode(oldStatus.getStatusCode());
- newStatus.setStatusCode(Status.FAILED);
- newStatus.setException(gsse);
- this.task.setStatus(newStatus);
cleanup();
throw new InvalidSecurityContextException("Invalid GSSCredentials",
gsse);
@@ -224,22 +212,10 @@
}
}
catch (GramException ge) {
- Status newStatus = new StatusImpl();
- Status oldStatus = this.task.getStatus();
- newStatus.setPrevStatusCode(oldStatus.getStatusCode());
- newStatus.setStatusCode(Status.FAILED);
- newStatus.setException(ge);
- this.task.setStatus(newStatus);
listener.failed(true);
throw new TaskSubmissionException("Cannot submit job", ge);
}
catch (GSSException gsse) {
- Status newStatus = new StatusImpl();
- Status oldStatus = this.task.getStatus();
- newStatus.setPrevStatusCode(oldStatus.getStatusCode());
- newStatus.setStatusCode(Status.FAILED);
- newStatus.setException(gsse);
- this.task.setStatus(newStatus);
listener.failed(true);
throw new InvalidSecurityContextException("Invalid GSSCredentials",
gsse);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-10-02 21:19:57
|
Revision: 1771
http://cogkit.svn.sourceforge.net/cogkit/?rev=1771&view=rev
Author: hategan
Date: 2007-10-02 14:19:53 -0700 (Tue, 02 Oct 2007)
Log Message:
-----------
only cleanup once
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
Modified: trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
===================================================================
--- trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2007-10-02 14:37:27 UTC (rev 1770)
+++ trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2007-10-02 21:19:53 UTC (rev 1771)
@@ -54,6 +54,7 @@
private GassServer gassServer = null;
private JobOutputStream stdoutStream;
private JobOutputStream stderrStream;
+ private boolean cleaned;
public void submit(Task task) throws IllegalSpecException,
InvalidSecurityContextException, InvalidServiceContactException,
@@ -280,7 +281,8 @@
boolean batchJob = spec.isBatchJob();
boolean redirected = spec.getStdOutputLocation().overlaps(
FileLocation.MEMORY_AND_LOCAL)
- || spec.getStdErrorLocation().overlaps(FileLocation.MEMORY_AND_LOCAL);
+ || spec.getStdErrorLocation().overlaps(
+ FileLocation.MEMORY_AND_LOCAL);
if (batchJob && redirected) {
throw new IllegalSpecException(
@@ -357,7 +359,8 @@
}
// if output is to be redirected
- if (FileLocation.MEMORY_AND_LOCAL.overlaps(spec.getStdOutputLocation())) {
+ if (FileLocation.MEMORY_AND_LOCAL.overlaps(spec
+ .getStdOutputLocation())) {
Value v;
// if no output file is specified, use the stdout
if (FileLocation.MEMORY.overlaps(spec.getStdOutputLocation())) {
@@ -376,7 +379,8 @@
.getStdOutput()));
}
// if error is to be redirected
- if (FileLocation.MEMORY_AND_LOCAL.overlaps(spec.getStdErrorLocation())) {
+ if (FileLocation.MEMORY_AND_LOCAL.overlaps(spec
+ .getStdErrorLocation())) {
Value v;
// if no error file is specified, use the stdout
if (FileLocation.MEMORY.overlaps(spec.getStdErrorLocation())) {
@@ -473,11 +477,14 @@
}
}
- private void cleanup() {
- this.gramJob.removeListener(this);
- CallbackHandlerManager.decreaseUsageCount(gramJob.getCredentials());
- if (gassServer != null) {
- GassServerFactory.decreaseUsageCount(gassServer);
+ private synchronized void cleanup() {
+ if (!cleaned) {
+ this.gramJob.removeListener(this);
+ CallbackHandlerManager.decreaseUsageCount(gramJob.getCredentials());
+ if (gassServer != null) {
+ GassServerFactory.decreaseUsageCount(gassServer);
+ }
+ cleaned = true;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-10-02 21:27:38
|
Revision: 1772
http://cogkit.svn.sourceforge.net/cogkit/?rev=1772&view=rev
Author: hategan
Date: 2007-10-02 14:27:33 -0700 (Tue, 02 Oct 2007)
Log Message:
-----------
better yet, cleanup failures should only cause warnings
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
Modified: trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
===================================================================
--- trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2007-10-02 21:19:53 UTC (rev 1771)
+++ trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2007-10-02 21:27:33 UTC (rev 1772)
@@ -54,7 +54,6 @@
private GassServer gassServer = null;
private JobOutputStream stdoutStream;
private JobOutputStream stderrStream;
- private boolean cleaned;
public void submit(Task task) throws IllegalSpecException,
InvalidSecurityContextException, InvalidServiceContactException,
@@ -478,14 +477,16 @@
}
private synchronized void cleanup() {
- if (!cleaned) {
+ try {
this.gramJob.removeListener(this);
CallbackHandlerManager.decreaseUsageCount(gramJob.getCredentials());
if (gassServer != null) {
GassServerFactory.decreaseUsageCount(gassServer);
}
- cleaned = true;
}
+ catch (Exception e) {
+ logger.warn("Failed to clean up job", e);
+ }
}
public void outputChanged(String s) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-02-12 20:20:39
|
Revision: 1902
http://cogkit.svn.sourceforge.net/cogkit/?rev=1902&view=rev
Author: hategan
Date: 2008-02-12 12:20:25 -0800 (Tue, 12 Feb 2008)
Log Message:
-----------
fixed npe
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
Modified: trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
===================================================================
--- trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2008-02-12 20:20:02 UTC (rev 1901)
+++ trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2008-02-12 20:20:25 UTC (rev 1902)
@@ -67,7 +67,7 @@
throw new TaskSubmissionException(
"JobSubmissionTaskHandler cannot handle two active jobs simultaneously");
}
- if (this.task.getStatus().getStatusCode() != Status.UNSUBMITTED) {
+ if (task.getStatus().getStatusCode() != Status.UNSUBMITTED) {
throw new TaskSubmissionException("This task is already submitted");
}
this.task = task;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-04-22 03:22:42
|
Revision: 1964
http://cogkit.svn.sourceforge.net/cogkit/?rev=1964&view=rev
Author: hategan
Date: 2008-04-21 20:22:39 -0700 (Mon, 21 Apr 2008)
Log Message:
-----------
properly handle job managers
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
Modified: trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
===================================================================
--- trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2008-04-18 03:30:35 UTC (rev 1963)
+++ trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2008-04-22 03:22:39 UTC (rev 1964)
@@ -20,9 +20,11 @@
import org.globus.cog.abstraction.impl.common.task.TaskSubmissionException;
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.SecurityContext;
+import org.globus.cog.abstraction.interfaces.Service;
import org.globus.cog.abstraction.interfaces.ServiceContact;
import org.globus.cog.abstraction.interfaces.Status;
import org.globus.cog.abstraction.interfaces.Task;
@@ -126,8 +128,11 @@
String server = serviceContact.getContact();
// if the jobmanager attribute is specified, handle it
- String jobmanager = (String) this.task.getService(0).getAttribute(
- "jobmanager");
+ Service service = this.task.getService(0);
+ String jobmanager = null;
+ if (service instanceof ExecutionService) {
+ jobmanager = ((ExecutionService) service).getJobManager();
+ }
if (jobmanager != null) {
server = handleJobManager(server, jobmanager);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-05-12 20:52:49
|
Revision: 2008
http://cogkit.svn.sourceforge.net/cogkit/?rev=2008&view=rev
Author: hategan
Date: 2008-05-12 13:51:34 -0700 (Mon, 12 May 2008)
Log Message:
-----------
properly chain exceptions
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
Modified: trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
===================================================================
--- trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2008-05-12 19:17:59 UTC (rev 2007)
+++ trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2008-05-12 20:51:34 UTC (rev 2008)
@@ -426,7 +426,7 @@
}
catch (Exception e) {
throw new IllegalSpecException(
- "Cannot parse the user defined attributes");
+ "Cannot parse the user defined attributes", e);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <b_...@us...> - 2008-06-17 11:28:13
|
Revision: 2039
http://cogkit.svn.sourceforge.net/cogkit/?rev=2039&view=rev
Author: b_z_c
Date: 2008-06-17 04:28:03 -0700 (Tue, 17 Jun 2008)
Log Message:
-----------
allow specification of condor requirements string
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
Modified: trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
===================================================================
--- trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2008-06-12 22:46:57 UTC (rev 2038)
+++ trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2008-06-17 11:28:03 UTC (rev 2039)
@@ -417,10 +417,21 @@
.getStdError()));
}
+ if (spec.getAttribute("condor_requirements") != null) {
+ String requirementString = (String) spec.getAttribute("condor_requirements");
+ NameOpValue req = new NameOpValue("condorsubmit", NameOpValue.EQ);
+ List l = new LinkedList();
+ l.add(new Value("Requirements"));
+ l.add(new Value(requirementString));
+ req.add(l);
+ rsl.add(req);
+ }
+
Iterator i = spec.getAttributeNames().iterator();
while (i.hasNext()) {
try {
String key = (String) i.next();
+ if(key.equals("condor_requirements")) continue;
rsl.add(new NameOpValue(key, NameOpValue.EQ, (String) spec
.getAttribute(key)));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|