|
From: <ha...@us...> - 2006-10-18 14:30:45
|
Revision: 994
http://svn.sourceforge.net/cogkit/?rev=994&view=rev
Author: hategan
Date: 2006-10-18 07:30:36 -0700 (Wed, 18 Oct 2006)
Log Message:
-----------
tasks have an initial non-null status
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 2006-10-18 03:29:13 UTC (rev 993)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/CHANGES.txt 2006-10-18 14:30:36 UTC (rev 994)
@@ -1,3 +1,9 @@
+(10/18/2006)
+
+*** Attempt to fix handling of status notifications. There is some
+ oddness in jobs having no initial status (which could cause
+ NPEs on anything that would query details of the status)
+
(04/12/2006) Use the new spec.isDelegationEnabled()
Fixed boot crash when no ip set in cog.properties
Some cleanups
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 2006-10-18 03:29:13 UTC (rev 993)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/src/org/globus/cog/abstraction/impl/execution/gt4_0_0/JobSubmissionTaskHandler.java 2006-10-18 14:30:36 UTC (rev 994)
@@ -11,7 +11,6 @@
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
-import java.util.Vector;
import org.apache.axis.components.uuid.UUIDGenFactory;
import org.apache.axis.message.addressing.EndpointReferenceType;
@@ -252,8 +251,7 @@
desc.setQueue((String) spec.getAttribute("queue"));
}
- Vector v = spec.getArgumentsAsVector();
- desc.setArgument((String[]) v.toArray(new String[0]));
+ desc.setArgument((String[]) spec.getArgumentsAsList().toArray(new String[0]));
boolean batchJob = spec.isBatchJob();
if (spec.isRedirected()) {
@@ -277,7 +275,7 @@
}
desc.setExecutable(spec.getExecutable());
- Collection environment = spec.getEnvironment();
+ Collection environment = spec.getEnvironmentVariableNames();
if (environment != null && environment.size() > 0) {
NameValuePairType[] envVars = new NameValuePairType[environment.size()];
Iterator iterator = environment.iterator();
@@ -304,8 +302,13 @@
newStatus.setPrevStatusCode(oldStatus.getStatusCode());
newStatus.setStatusCode(Status.FAILED);
int errorCode = job.getError();
- newStatus.setMessage("#" + errorCode + " " + job.getFault().getDescription()[0]);
- newStatus.setException((Exception) job.getFault().getCause());
+ if (job.getFault() != null) {
+ newStatus.setMessage("#" + errorCode + " " + job.getFault().getDescription()[0]);
+ newStatus.setException((Exception) job.getFault().getCause());
+ }
+ else {
+ newStatus.setMessage("#" + errorCode);
+ }
this.task.setStatus(newStatus);
cleanup();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2006-12-22 23:15:13
|
Revision: 1484
http://svn.sourceforge.net/cogkit/?rev=1484&view=rev
Author: hategan
Date: 2006-12-22 15:15:12 -0800 (Fri, 22 Dec 2006)
Log Message:
-----------
updated version, changelog
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-gt4_0_0/CHANGES.txt
trunk/current/src/cog/modules/provider-gt4_0_0/project.properties
Modified: trunk/current/src/cog/modules/provider-gt4_0_0/CHANGES.txt
===================================================================
--- trunk/current/src/cog/modules/provider-gt4_0_0/CHANGES.txt 2006-12-22 23:14:47 UTC (rev 1483)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/CHANGES.txt 2006-12-22 23:15:12 UTC (rev 1484)
@@ -1,3 +1,5 @@
+-------------------------------2.4---------------------------------
+
(11/24/2006)
*** Set status to failed if the exit code is not 0
Modified: trunk/current/src/cog/modules/provider-gt4_0_0/project.properties
===================================================================
--- trunk/current/src/cog/modules/provider-gt4_0_0/project.properties 2006-12-22 23:14:47 UTC (rev 1483)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/project.properties 2006-12-22 23:15:12 UTC (rev 1484)
@@ -1,6 +1,6 @@
module.name = provider-gt4_0_0
long.name = GT4.0.0 provider for abstractions
-version = 2.3
+version = 2.4
project = Java CoG Kit
lib.deps = cog-provider-clref*.jar, concurrent.jar, addressing*.jar, axis.jar, axis-url.jar, cog-axis.jar, cog-url.jar, commonj.jar, commons-beanutils.jar, commons-collections*.jar, commons-digester.jar, commons-discovery.jar, globus_delegation_service.jar, globus_delegation_stubs.jar, globus_wsrf_rft_stubs.jar, gram-client.jar, gram-stubs.jar, gram-utils.jar, jaxrpc.jar, naming-common.jar, naming-factory.jar, naming-java.jar, naming-resources.jar, opensaml.jar, saaj.jar, wsdl4j.jar, wsrf_core.jar, wsrf_core_stubs.jar, wsrf_mds_index_stubs.jar, wsrf_mds_usefulrp_schema_stubs.jar, wsrf_provider_jce.jar, wsrf_tools.jar, wss4j.jar, xalan.jar, xercesImpl.jar, xml-apis.jar, xmlsec.jar, globus_wsrf_rendezvous_stubs.jar, globus_wsrf_rendezvous_service.jar, globus_wsrf_mds_aggregator_stubs.jar
debug = true
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-05-17 09:41:36
|
Revision: 1636
http://svn.sourceforge.net/cogkit/?rev=1636&view=rev
Author: hategan
Date: 2007-05-17 02:41:32 -0700 (Thu, 17 May 2007)
Log Message:
-----------
fixed NPE and canceling issues
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-05-02 21:19:49 UTC (rev 1635)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/CHANGES.txt 2007-05-17 09:41:32 UTC (rev 1636)
@@ -1,3 +1,11 @@
+(05/17/2007)
+
+*** Fixed flow issues when canceling a job
+
+*** Fixed a bug that could cause a NPE if WS-GRAM would report a
+ failed job without an attached fault.
+
+
-------------------------------2.4---------------------------------
(11/24/2006)
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-05-02 21:19:49 UTC (rev 1635)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/src/org/globus/cog/abstraction/impl/execution/gt4_0_0/JobSubmissionTaskHandler.java 2007-05-17 09:41:32 UTC (rev 1636)
@@ -23,6 +23,7 @@
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.Delegation;
import org.globus.cog.abstraction.interfaces.ExecutionService;
import org.globus.cog.abstraction.interfaces.JobSpecification;
import org.globus.cog.abstraction.interfaces.Service;
@@ -48,323 +49,367 @@
* @author CoG Team
* @author David Del Vecchio
*/
-public class JobSubmissionTaskHandler implements DelegatedTaskHandler, GramJobListener {
- static Logger logger = Logger.getLogger(JobSubmissionTaskHandler.class.getName());
- private Task task = null;
- private GramJob gramJob;
+public class JobSubmissionTaskHandler implements DelegatedTaskHandler,
+ GramJobListener {
+ static Logger logger = Logger.getLogger(JobSubmissionTaskHandler.class);
+
+ private Task task = null;
+ private GramJob gramJob;
+ private boolean canceling;
- private static Map jmMappings;
+ private static Map jmMappings;
- static {
- jmMappings = new HashMap();
- jmMappings.put("fork", "Fork");
- jmMappings.put("pbs", "PBS");
- jmMappings.put("lsf", "LSF");
- jmMappings.put("condor", "Condor");
- }
+ static {
+ jmMappings = new HashMap();
+ jmMappings.put("fork", "Fork");
+ jmMappings.put("pbs", "PBS");
+ jmMappings.put("lsf", "LSF");
+ jmMappings.put("condor", "Condor");
+ jmMappings.put("sge", "SGE");
+ }
- public void submit(Task task) throws IllegalSpecException, InvalidSecurityContextException,
- InvalidServiceContactException, TaskSubmissionException {
- if (this.task != null) {
- throw new TaskSubmissionException(
- "JobSubmissionTaskHandler cannot handle two active jobs simultaneously");
- }
- else {
- this.task = task;
+ public void submit(Task task) throws IllegalSpecException,
+ InvalidSecurityContextException, InvalidServiceContactException,
+ TaskSubmissionException {
+ if (this.task != null) {
+ throw new TaskSubmissionException(
+ "JobSubmissionTaskHandler cannot handle two active jobs simultaneously");
+ }
+ else {
+ this.task = task;
- JobDescriptionType rsl;
- JobSpecification spec;
- try {
- spec = (JobSpecification) this.task.getSpecification();
- }
- catch (Exception e) {
- throw new IllegalSpecException("Exception while retreiving Job Specification", e);
- }
+ JobDescriptionType rsl;
+ JobSpecification spec;
+ try {
+ spec = (JobSpecification) this.task.getSpecification();
+ }
+ catch (Exception e) {
+ throw new IllegalSpecException(
+ "Exception while retreiving Job Specification", e);
+ }
- Service service = this.task.getService(0);
- ServiceContact serviceContact = service.getServiceContact();
- String server = serviceContact.getContact();
+ Service service = this.task.getService(0);
+ ServiceContact serviceContact = service.getServiceContact();
+ String server = serviceContact.getContact();
- String factoryType = ManagedJobFactoryConstants.DEFAULT_FACTORY_TYPE;
- if (service instanceof ExecutionService) {
- String jobManager = ((ExecutionService) service).getJobManager();
- if (logger.isDebugEnabled()) {
- logger.debug("Requested job manager: " + jobManager);
- }
- if (jobManager != null) {
- String lc = jobManager.toLowerCase();
- if (lc.startsWith("jobmanager-")) {
- lc = lc.substring(11);
- }
- if (jmMappings.containsKey(lc)) {
- jobManager = (String) jmMappings.get(lc);
- }
- factoryType = jobManager;
- }
- if (logger.isDebugEnabled()) {
- logger.debug("Actual job manager: " + factoryType);
- }
- }
+ String factoryType = ManagedJobFactoryConstants.DEFAULT_FACTORY_TYPE;
+ if (service instanceof ExecutionService) {
+ String jobManager = ((ExecutionService) service)
+ .getJobManager();
+ if (logger.isDebugEnabled()) {
+ logger.debug("Requested job manager: " + jobManager);
+ }
+ if (jobManager != null) {
+ String lc = jobManager.toLowerCase();
+ if (lc.startsWith("jobmanager-")) {
+ lc = lc.substring(11);
+ }
+ if (jmMappings.containsKey(lc)) {
+ jobManager = (String) jmMappings.get(lc);
+ }
+ factoryType = jobManager;
+ }
+ if (logger.isDebugEnabled()) {
+ logger.debug("Actual job manager: " + factoryType);
+ }
+ }
- EndpointReferenceType factoryEndpoint;
- URL factoryURL;
+ EndpointReferenceType factoryEndpoint;
+ URL factoryURL;
- try {
- factoryURL = ManagedJobFactoryClientHelper.getServiceURL(server).getURL();
-
+ try {
+ factoryURL = ManagedJobFactoryClientHelper
+ .getServiceURL(server).getURL();
+
// Fix (hack) for the above returning the wrong default port
if (server.indexOf(':') == -1) {
factoryURL = new URL(factoryURL.getProtocol(), factoryURL
.getHost(), 8443, factoryURL.getFile());
}
- factoryEndpoint = ManagedJobFactoryClientHelper.getFactoryEndpoint(factoryURL,
- factoryType);
- }
- catch (Exception e) {
- throw new IllegalSpecException("Invalid service factory", e);
- }
+ factoryEndpoint = ManagedJobFactoryClientHelper
+ .getFactoryEndpoint(factoryURL, factoryType);
+ }
+ catch (Exception e) {
+ throw new IllegalSpecException("Invalid service factory", e);
+ }
- if (spec.getSpecification() != null) {
- try {
- this.gramJob = new GramJob(spec.getSpecification());
- }
- catch (RSLParseException e) {
- throw new IllegalSpecException(e.getMessage(), e);
- }
- }
- else {
- rsl = prepareSpecification(spec, server);
- this.gramJob = new GramJob(rsl);
- }
+ if (spec.getSpecification() != null) {
+ try {
+ this.gramJob = new GramJob(spec.getSpecification());
+ }
+ catch (RSLParseException e) {
+ throw new IllegalSpecException(e.getMessage(), e);
+ }
+ }
+ else {
+ rsl = prepareSpecification(spec, server);
+ this.gramJob = new GramJob(rsl);
+ }
- GlobusSecurityContextImpl securityContext = (GlobusSecurityContextImpl) this.task.getService(
- 0).getSecurityContext();
+ GlobusSecurityContextImpl securityContext = (GlobusSecurityContextImpl) this.task
+ .getService(0).getSecurityContext();
- try {
- this.gramJob.setCredentials((GSSCredential) securityContext.getCredentials());
- }
- catch (IllegalArgumentException iae) {
- throw new InvalidSecurityContextException("Cannot set the SecurityContext twice",
- iae);
- }
+ try {
+ this.gramJob.setCredentials((GSSCredential) securityContext
+ .getCredentials());
+ }
+ catch (IllegalArgumentException iae) {
+ throw new InvalidSecurityContextException(
+ "Cannot set the SecurityContext twice", iae);
+ }
- Authorization authorization = getAuthorization(securityContext);
- this.gramJob.setAuthorization(authorization);
+ Authorization authorization = getAuthorization(securityContext);
+ this.gramJob.setAuthorization(authorization);
- switch (securityContext.getXMLSec()) {
- case GlobusSecurityContextImpl.XML_ENCRYPTION:
- this.gramJob.setMessageProtectionType(Constants.ENCRYPTION);
- break;
- default:
- this.gramJob.setMessageProtectionType(Constants.SIGNATURE);
- break;
- }
+ switch (securityContext.getXMLSec()) {
+ case GlobusSecurityContextImpl.XML_ENCRYPTION:
+ this.gramJob.setMessageProtectionType(Constants.ENCRYPTION);
+ break;
+ default:
+ this.gramJob.setMessageProtectionType(Constants.SIGNATURE);
+ break;
+ }
- if (!spec.isBatchJob()) {
- this.gramJob.addListener(this);
- }
+ if (!spec.isBatchJob()) {
+ this.gramJob.addListener(this);
+ }
- this.gramJob.setDelegationEnabled(spec.isDelegationEnabled());
+ this.gramJob
+ .setDelegationEnabled(spec.getDelegation() != Delegation.NO_DELEGATION);
- try {
- this.gramJob.submit(factoryEndpoint, spec.isBatchJob(), true, "uuid:"
- + UUIDGenFactory.getUUIDGen().nextUUID());
- logger.info("Job submitted");
- if (spec.isBatchJob()) {
- this.task.setStatus(Status.COMPLETED);
- }
- }
- catch (Exception e) {
- Status newStatus = new StatusImpl();
- Status oldStatus = this.task.getStatus();
- newStatus.setPrevStatusCode(oldStatus.getStatusCode());
- newStatus.setStatusCode(Status.FAILED);
- newStatus.setException(e);
- this.task.setStatus(newStatus);
- cleanup();
- throw new TaskSubmissionException("Cannot submit job: " + e.getMessage(), e);
- }
- }
- }
+ try {
+ this.gramJob.submit(factoryEndpoint, spec.isBatchJob(), spec
+ .getDelegation() == Delegation.LIMITED_DELEGATION,
+ "uuid:" + UUIDGenFactory.getUUIDGen().nextUUID());
+ logger.info("Job submitted");
+ if (spec.isBatchJob()) {
+ this.task.setStatus(Status.COMPLETED);
+ }
+ }
+ catch (Exception e) {
+ Status newStatus = new StatusImpl();
+ Status oldStatus = this.task.getStatus();
+ newStatus.setPrevStatusCode(oldStatus.getStatusCode());
+ newStatus.setStatusCode(Status.FAILED);
+ newStatus.setException(e);
+ this.task.setStatus(newStatus);
+ cleanup();
+ throw new TaskSubmissionException("Cannot submit job: "
+ + e.getMessage(), e);
+ }
+ }
+ }
- public void suspend() throws InvalidSecurityContextException, TaskSubmissionException {
- throw new UnsupportedOperationException("suspend");
- }
+ public void suspend() throws InvalidSecurityContextException,
+ TaskSubmissionException {
+ throw new UnsupportedOperationException("suspend");
+ }
- public void resume() throws InvalidSecurityContextException, TaskSubmissionException {
- throw new UnsupportedOperationException("resume");
- }
+ public void resume() throws InvalidSecurityContextException,
+ TaskSubmissionException {
+ throw new UnsupportedOperationException("resume");
+ }
- public void cancel() throws InvalidSecurityContextException, TaskSubmissionException {
- try {
- this.gramJob.cancel();
- this.task.setStatus(Status.CANCELED);
- }
- catch (Exception e) {
- throw new TaskSubmissionException("Cannot cancel job", e);
- }
- finally {
- cleanup();
- }
- }
+ public void cancel() throws InvalidSecurityContextException,
+ TaskSubmissionException {
+ try {
+ synchronized (task) {
+ canceling = true;
+ }
+ this.gramJob.cancel();
+ //no cleanup since cancel() calls destroy()
+ }
+ catch (Exception e) {
+ throw new TaskSubmissionException("Cannot cancel job", e);
+ }
+ }
- private JobDescriptionType prepareSpecification(JobSpecification spec, String server)
- throws IllegalSpecException, TaskSubmissionException {
- // if the job specification is explicitly specified
- JobDescriptionType desc = new JobDescriptionType();
+ private JobDescriptionType prepareSpecification(JobSpecification spec,
+ String server) throws IllegalSpecException, TaskSubmissionException {
+ // if the job specification is explicitly specified
+ JobDescriptionType desc = new JobDescriptionType();
- if (spec.getDirectory() != null) {
- desc.setDirectory(spec.getDirectory());
- }
- if (spec.getAttribute("count") != null) {
- desc.setCount(new PositiveInteger(spec.getAttribute("count").toString()));
- }
- if (spec.getStdInput() != null) {
- desc.setStdin(spec.getStdInput());
- }
- if (spec.getAttribute("maxCpuTime") != null) {
- desc.setMaxCpuTime(new Long(spec.getAttribute("maxCpuTime").toString()));
- }
- if (spec.getAttribute("hostCount") != null) {
- desc.setHostCount(new PositiveInteger(spec.getAttribute("hostCount").toString()));
- }
- if (spec.getAttribute("jobType") != null) {
- desc.setJobType(JobTypeEnumeration.fromString(spec.getAttribute("jobType").toString()));
- }
- if (spec.getAttribute("maxMemory") != null) {
- desc.setMaxMemory(new NonNegativeInteger(spec.getAttribute("maxMemory").toString()));
- }
- if (spec.getAttribute("maxTime") != null) {
- desc.setMaxTime(new Long(spec.getAttribute("maxTime").toString()));
- }
- if (spec.getAttribute("maxWallTime") != null) {
- desc.setMaxWallTime(new Long(spec.getAttribute("maxWallTime").toString()));
- }
- if (spec.getAttribute("minMemory") != null) {
- desc.setMinMemory(new NonNegativeInteger(spec.getAttribute("minMemory").toString()));
- }
- if (spec.getAttribute("project") != null) {
- desc.setProject((String) spec.getAttribute("project"));
- }
- if (spec.getAttribute("queue") != null) {
- desc.setQueue((String) spec.getAttribute("queue"));
- }
+ if (spec.getDirectory() != null) {
+ desc.setDirectory(spec.getDirectory());
+ }
+ if (spec.getAttribute("count") != null) {
+ desc.setCount(new PositiveInteger(spec.getAttribute("count")
+ .toString()));
+ }
+ if (spec.getStdInput() != null) {
+ desc.setStdin(spec.getStdInput());
+ }
+ if (spec.getAttribute("maxCpuTime") != null) {
+ desc.setMaxCpuTime(new Long(spec.getAttribute("maxCpuTime")
+ .toString()));
+ }
+ if (spec.getAttribute("hostCount") != null) {
+ desc.setHostCount(new PositiveInteger(spec
+ .getAttribute("hostCount").toString()));
+ }
+ if (spec.getAttribute("jobType") != null) {
+ desc.setJobType(JobTypeEnumeration.fromString(spec.getAttribute(
+ "jobType").toString()));
+ }
+ if (spec.getAttribute("maxMemory") != null) {
+ desc.setMaxMemory(new NonNegativeInteger(spec.getAttribute(
+ "maxMemory").toString()));
+ }
+ if (spec.getAttribute("maxTime") != null) {
+ desc.setMaxTime(new Long(spec.getAttribute("maxTime").toString()));
+ }
+ if (spec.getAttribute("maxWallTime") != null) {
+ desc.setMaxWallTime(new Long(spec.getAttribute("maxWallTime")
+ .toString()));
+ }
+ if (spec.getAttribute("minMemory") != null) {
+ desc.setMinMemory(new NonNegativeInteger(spec.getAttribute(
+ "minMemory").toString()));
+ }
+ if (spec.getAttribute("project") != null) {
+ desc.setProject((String) spec.getAttribute("project"));
+ }
+ if (spec.getAttribute("queue") != null) {
+ desc.setQueue((String) spec.getAttribute("queue"));
+ }
- desc.setArgument((String[]) spec.getArgumentsAsList().toArray(new String[0]));
+ desc.setArgument((String[]) spec.getArgumentsAsList().toArray(
+ new String[0]));
- boolean batchJob = spec.isBatchJob();
- if (spec.isRedirected()) {
- throw new IllegalSpecException("The gt4.0.0 provider does not support redirection");
- }
- else {
- if (spec.getStdInput() != null) {
- desc.setStdin(spec.getStdInput());
- }
- if (spec.getStdOutput() != null) {
- desc.setStdout(spec.getStdOutput());
- }
- if (spec.getStdError() != null) {
- desc.setStderr(spec.getStdError());
- }
- }
+ boolean batchJob = spec.isBatchJob();
+ if (spec.isRedirected()) {
+ throw new IllegalSpecException(
+ "The gt4.0.0 provider does not support redirection");
+ }
+ else {
+ if (spec.getStdInput() != null) {
+ desc.setStdin(spec.getStdInput());
+ }
+ if (spec.getStdOutput() != null) {
+ desc.setStdout(spec.getStdOutput());
+ }
+ if (spec.getStdError() != null) {
+ desc.setStderr(spec.getStdError());
+ }
+ }
- if (spec.isLocalExecutable()) {
- throw new IllegalSpecException(
- "The gt4.0.0 provider does not support local executables");
- }
- desc.setExecutable(spec.getExecutable());
+ if (spec.isLocalExecutable()) {
+ throw new IllegalSpecException(
+ "The gt4.0.0 provider does not support local executables");
+ }
+ desc.setExecutable(spec.getExecutable());
- Collection environment = spec.getEnvironmentVariableNames();
- if (environment != null && environment.size() > 0) {
- NameValuePairType[] envVars = new NameValuePairType[environment.size()];
- Iterator iterator = environment.iterator();
- int i = 0;
- while (iterator.hasNext()) {
- String name = (String) iterator.next();
- String value = spec.getEnvironmentVariable(name);
- envVars[i++] = new NameValuePairType(name, value);
- }
- desc.setEnvironment(envVars);
- }
+ Collection environment = spec.getEnvironmentVariableNames();
+ if (environment != null && environment.size() > 0) {
+ NameValuePairType[] envVars = new NameValuePairType[environment
+ .size()];
+ Iterator iterator = environment.iterator();
+ int i = 0;
+ while (iterator.hasNext()) {
+ String name = (String) iterator.next();
+ String value = spec.getEnvironmentVariable(name);
+ envVars[i++] = new NameValuePairType(name, value);
+ }
+ desc.setEnvironment(envVars);
+ }
- return desc;
- }
+ return desc;
+ }
- public void stateChanged(GramJob job) {
- StateEnumeration state = job.getState();
- if (state.equals(StateEnumeration.Active)) {
- this.task.setStatus(Status.ACTIVE);
- }
- else if (state.equals(StateEnumeration.Failed)) {
- Status newStatus = new StatusImpl();
- Status oldStatus = this.task.getStatus();
- newStatus.setPrevStatusCode(oldStatus.getStatusCode());
- newStatus.setStatusCode(Status.FAILED);
- int errorCode = job.getError();
- if (job.getFault() != null) {
- failTask("#" + errorCode + " " + job.getFault().getDescription()[0], (Exception) job.getFault().getCause());
- }
- else {
- failTask("#" + errorCode + " " + job.getFault().getDescription()[0], null);
- }
- this.task.setStatus(newStatus);
- cleanup();
- }
- else if (state.equals(StateEnumeration.Done)) {
- if (job.getExitCode() != 0) {
- failTask("Job failed with an exit code of " + job.getExitCode(), null);
- }
- else {
- this.task.setStatus(Status.COMPLETED);
- }
- cleanup();
- }
- else if (state.equals(StateEnumeration.Suspended)) {
- this.task.setStatus(Status.SUSPENDED);
- }
- else if (state.equals(StateEnumeration.Pending)) {
- this.task.setStatus(Status.SUBMITTED);
- }
- else {
- logger.debug("Unknown status: " + state.getValue());
- }
- }
-
- private void failTask(String message, Exception exception) {
- Status newStatus = new StatusImpl();
- Status oldStatus = this.task.getStatus();
- newStatus.setPrevStatusCode(oldStatus.getStatusCode());
- newStatus.setStatusCode(Status.FAILED);
- newStatus.setMessage(message);
- newStatus.setException(exception);
- this.task.setStatus(newStatus);
- }
+ public void stateChanged(GramJob job) {
+ StateEnumeration state = job.getState();
+ if (state.equals(StateEnumeration.Active)) {
+ this.task.setStatus(Status.ACTIVE);
+ }
+ else if (state.equals(StateEnumeration.Failed)) {
+ boolean canceled = false;
+ synchronized (task) {
+ if (canceling) {
+ canceled = true;
+ }
+ }
+ if (canceled) {
+ this.task.setStatus(Status.CANCELED);
+ gramJob.removeListener(this);
+ }
+ else {
+ Status newStatus = new StatusImpl();
+ Status oldStatus = this.task.getStatus();
+ newStatus.setPrevStatusCode(oldStatus.getStatusCode());
+ newStatus.setStatusCode(Status.FAILED);
+ int errorCode = job.getError();
+ if (job.getFault() != null) {
+ failTask("#" + errorCode + " "
+ + job.getFault().getDescription()[0],
+ (Exception) job.getFault().getCause());
+ }
+ else {
+ failTask("#" + errorCode, null);
+ }
+ this.task.setStatus(newStatus);
+ cleanup();
+ }
+ }
+ else if (state.equals(StateEnumeration.Done)) {
+ if (job.getExitCode() != 0) {
+ failTask(
+ "Job failed with an exit code of " + job.getExitCode(),
+ null);
+ }
+ else {
+ this.task.setStatus(Status.COMPLETED);
+ }
+ cleanup();
+ }
+ else if (state.equals(StateEnumeration.Suspended)) {
+ this.task.setStatus(Status.SUSPENDED);
+ }
+ else if (state.equals(StateEnumeration.Pending)) {
+ this.task.setStatus(Status.SUBMITTED);
+ }
+ else {
+ logger.debug("Unknown status: " + state.getValue());
+ }
+ }
- private void cleanup() {
- this.gramJob.removeListener(this);
- logger.debug("Destroying remote service for task " + this.task.getIdentity().toString());
- try {
- gramJob.release();
- this.gramJob.destroy();
- }
- catch (Exception e) {
- logger.warn("Unable to destroy remote service for task "
- + this.task.getIdentity().toString(), e);
- }
- }
+ private void failTask(String message, Exception exception) {
+ Status newStatus = new StatusImpl();
+ Status oldStatus = this.task.getStatus();
+ newStatus.setPrevStatusCode(oldStatus.getStatusCode());
+ newStatus.setStatusCode(Status.FAILED);
+ newStatus.setMessage(message);
+ newStatus.setException(exception);
+ this.task.setStatus(newStatus);
+ }
- private Authorization getAuthorization(GlobusSecurityContextImpl securityContext) {
- Authorization authorization = HostAuthorization.getInstance();
+ private void cleanup() {
+ this.gramJob.removeListener(this);
+ logger.debug("Destroying remote service for task "
+ + this.task.getIdentity().toString());
+ try {
+ gramJob.release();
+ gramJob.destroy();
+ }
+ catch (Exception e) {
+ logger.warn("Unable to destroy remote service for task "
+ + this.task.getIdentity().toString(), e);
+ }
+ }
- org.globus.gsi.gssapi.auth.Authorization auth = securityContext.getAuthorization();
- // map to GT4 authorization
- if (auth instanceof org.globus.gsi.gssapi.auth.SelfAuthorization) {
- authorization = SelfAuthorization.getInstance();
- }
- else if (auth instanceof org.globus.gsi.gssapi.auth.HostAuthorization) {
- authorization = HostAuthorization.getInstance();
- }
- return authorization;
- }
+ private Authorization getAuthorization(
+ GlobusSecurityContextImpl securityContext) {
+ Authorization authorization = HostAuthorization.getInstance();
+
+ org.globus.gsi.gssapi.auth.Authorization auth = securityContext
+ .getAuthorization();
+ // map to GT4 authorization
+ if (auth instanceof org.globus.gsi.gssapi.auth.SelfAuthorization) {
+ authorization = SelfAuthorization.getInstance();
+ }
+ else if (auth instanceof org.globus.gsi.gssapi.auth.HostAuthorization) {
+ authorization = HostAuthorization.getInstance();
+ }
+ return authorization;
+ }
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-05-18 09:51:18
|
Revision: 1639
http://svn.sourceforge.net/cogkit/?rev=1639&view=rev
Author: hategan
Date: 2007-05-18 02:51:16 -0700 (Fri, 18 May 2007)
Log Message:
-----------
updates; read changelog for details.
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-05-17 12:32:53 UTC (rev 1638)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/CHANGES.txt 2007-05-18 09:51:16 UTC (rev 1639)
@@ -1,3 +1,16 @@
+(05/18/2007)
+
+*** Failure to destroy a resource causes a warning only if the
+ job is completed, but not when the submission process fails.
+ It's impossible (I can't figure out an easy way with my
+ current knowledge) to know whether the submit call has
+ succeeded in creating the resource or not.
+
+*** Don't clean up after a failure. WS-GRAM seems to do that
+ automatically
+
+*** Removed a spurious failure state change
+
(05/17/2007)
*** Fixed flow issues when canceling a job
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-05-17 12:32:53 UTC (rev 1638)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/src/org/globus/cog/abstraction/impl/execution/gt4_0_0/JobSubmissionTaskHandler.java 2007-05-18 09:51:16 UTC (rev 1639)
@@ -52,7 +52,7 @@
public class JobSubmissionTaskHandler implements DelegatedTaskHandler,
GramJobListener {
static Logger logger = Logger.getLogger(JobSubmissionTaskHandler.class);
-
+
private Task task = null;
private GramJob gramJob;
private boolean canceling;
@@ -188,13 +188,14 @@
}
}
catch (Exception e) {
- Status newStatus = new StatusImpl();
- Status oldStatus = this.task.getStatus();
- newStatus.setPrevStatusCode(oldStatus.getStatusCode());
- newStatus.setStatusCode(Status.FAILED);
- newStatus.setException(e);
- this.task.setStatus(newStatus);
- cleanup();
+ failTask(e.getMessage(), e);
+ try {
+ cleanup();
+ }
+ catch (Exception ex) {
+ logger.info("Unable to destroy remote service for task "
+ + this.task.getIdentity().toString(), ex);
+ }
throw new TaskSubmissionException("Cannot submit job: "
+ e.getMessage(), e);
}
@@ -218,7 +219,7 @@
canceling = true;
}
this.gramJob.cancel();
- //no cleanup since cancel() calls destroy()
+ // no cleanup since cancel() calls destroy()
}
catch (Exception e) {
throw new TaskSubmissionException("Cannot cancel job", e);
@@ -331,13 +332,8 @@
}
if (canceled) {
this.task.setStatus(Status.CANCELED);
- gramJob.removeListener(this);
}
else {
- Status newStatus = new StatusImpl();
- Status oldStatus = this.task.getStatus();
- newStatus.setPrevStatusCode(oldStatus.getStatusCode());
- newStatus.setStatusCode(Status.FAILED);
int errorCode = job.getError();
if (job.getFault() != null) {
failTask("#" + errorCode + " "
@@ -347,9 +343,8 @@
else {
failTask("#" + errorCode, null);
}
- this.task.setStatus(newStatus);
- cleanup();
}
+ gramJob.removeListener(this);
}
else if (state.equals(StateEnumeration.Done)) {
if (job.getExitCode() != 0) {
@@ -360,7 +355,13 @@
else {
this.task.setStatus(Status.COMPLETED);
}
- cleanup();
+ try {
+ cleanup();
+ }
+ catch (Exception e) {
+ logger.warn("Unable to destroy remote service for task "
+ + this.task.getIdentity().toString(), e);
+ }
}
else if (state.equals(StateEnumeration.Suspended)) {
this.task.setStatus(Status.SUSPENDED);
@@ -383,18 +384,14 @@
this.task.setStatus(newStatus);
}
- private void cleanup() {
+ private void cleanup() throws Exception {
this.gramJob.removeListener(this);
- logger.debug("Destroying remote service for task "
- + this.task.getIdentity().toString());
- try {
- gramJob.release();
- gramJob.destroy();
+ if (logger.isDebugEnabled()) {
+ logger.debug("Destroying remote service for task "
+ + this.task.getIdentity().toString());
}
- catch (Exception e) {
- logger.warn("Unable to destroy remote service for task "
- + this.task.getIdentity().toString(), e);
- }
+ gramJob.release();
+ gramJob.destroy();
}
private Authorization getAuthorization(
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-05-20 11:05:43
|
Revision: 1650
http://svn.sourceforge.net/cogkit/?rev=1650&view=rev
Author: hategan
Date: 2007-05-20 04:05:38 -0700 (Sun, 20 May 2007)
Log Message:
-----------
better cleanup
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-05-18 13:18:08 UTC (rev 1649)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/CHANGES.txt 2007-05-20 11:05:38 UTC (rev 1650)
@@ -1,3 +1,7 @@
+(05/20/2007)
+
+*** Corrected instances in which cleanup is done
+
(05/18/2007)
*** Failure to destroy a resource causes a warning only if the
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-05-18 13:18:08 UTC (rev 1649)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/src/org/globus/cog/abstraction/impl/execution/gt4_0_0/JobSubmissionTaskHandler.java 2007-05-20 11:05:38 UTC (rev 1650)
@@ -189,13 +189,9 @@
}
catch (Exception e) {
failTask(e.getMessage(), e);
- try {
- cleanup();
- }
- catch (Exception ex) {
- logger.info("Unable to destroy remote service for task "
- + this.task.getIdentity().toString(), ex);
- }
+ //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);
}
@@ -319,6 +315,7 @@
}
public void stateChanged(GramJob job) {
+ boolean cleanup = false;
StateEnumeration state = job.getState();
if (state.equals(StateEnumeration.Active)) {
this.task.setStatus(Status.ACTIVE);
@@ -332,6 +329,7 @@
}
if (canceled) {
this.task.setStatus(Status.CANCELED);
+ this.gramJob.removeListener(this);
}
else {
int errorCode = job.getError();
@@ -343,8 +341,8 @@
else {
failTask("#" + errorCode, null);
}
+ cleanup = true;
}
- gramJob.removeListener(this);
}
else if (state.equals(StateEnumeration.Done)) {
if (job.getExitCode() != 0) {
@@ -355,13 +353,7 @@
else {
this.task.setStatus(Status.COMPLETED);
}
- try {
- cleanup();
- }
- catch (Exception e) {
- logger.warn("Unable to destroy remote service for task "
- + this.task.getIdentity().toString(), e);
- }
+ cleanup = true;
}
else if (state.equals(StateEnumeration.Suspended)) {
this.task.setStatus(Status.SUSPENDED);
@@ -372,6 +364,15 @@
else {
logger.debug("Unknown status: " + state.getValue());
}
+ if (cleanup) {
+ try {
+ cleanup();
+ }
+ catch (Exception e) {
+ logger.warn("Unable to destroy remote service for task "
+ + this.task.getIdentity().toString(), e);
+ }
+ }
}
private void failTask(String message, Exception exception) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
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.
|
|
From: <ha...@us...> - 2008-02-06 21:43:42
|
Revision: 1874
http://cogkit.svn.sourceforge.net/cogkit/?rev=1874&view=rev
Author: hategan
Date: 2008-02-06 13:43:25 -0800 (Wed, 06 Feb 2008)
Log Message:
-----------
better error messages(?)
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 2008-02-06 00:27:11 UTC (rev 1873)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/CHANGES.txt 2008-02-06 21:43:25 UTC (rev 1874)
@@ -1,3 +1,10 @@
+(02/06/2008)
+
+*** Slightly better (I believe) error message propagation from
+ GRAM. Unfortunately the exact inner workings of the WS-GRAM
+ fault types don't seem to match any existing model I know of,
+ so the whole thing is a bit of a guess.
+
(08/20/2007)
*** Updated to use new redirection stuff
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 2008-02-06 00:27:11 UTC (rev 1873)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/src/org/globus/cog/abstraction/impl/execution/gt4_0_0/JobSubmissionTaskHandler.java 2008-02-06 21:43:25 UTC (rev 1874)
@@ -33,6 +33,7 @@
import org.globus.cog.abstraction.interfaces.Task;
import org.globus.exec.client.GramJob;
import org.globus.exec.client.GramJobListener;
+import org.globus.exec.generated.FaultType;
import org.globus.exec.generated.JobDescriptionType;
import org.globus.exec.generated.JobTypeEnumeration;
import org.globus.exec.generated.NameValuePairType;
@@ -179,14 +180,17 @@
setMiscJobParams(spec, this.gramJob);
try {
- if (logger.isDebugEnabled()) {
- logger.debug("Submitting task: " + task);
- }
+ if (logger.isInfoEnabled()) {
+ logger.info("Submitting task: " + task);
+ if (logger.isDebugEnabled()) {
+ logger.debug("Rsl is " + this.gramJob.toString());
+ }
+ }
this.gramJob.submit(factoryEndpoint, spec.isBatchJob(), spec
.getDelegation() == Delegation.LIMITED_DELEGATION,
"uuid:" + UUIDGenFactory.getUUIDGen().nextUUID());
- if (logger.isDebugEnabled()) {
- logger.debug("Task submitted: " + task);
+ if (logger.isInfoEnabled()) {
+ logger.info("Task submitted: " + task);
}
if (spec.isBatchJob()) {
this.task.setStatus(Status.COMPLETED);
@@ -357,13 +361,12 @@
this.gramJob.removeListener(this);
}
else {
- int errorCode = job.getError();
if (job.getFault() != null) {
- failTask("#" + errorCode + " "
- + job.getFault().getDescription()[0],
- (Exception) job.getFault().getCause());
+ failTask(job.getFault().getDescription()[0] + ", "
+ + getCauses(job.getFault()), null);
}
else {
+ int errorCode = job.getError();
failTask("#" + errorCode, null);
}
cleanup = true;
@@ -400,6 +403,15 @@
}
}
+ private String getCauses(FaultType f) {
+ StringBuffer sb = new StringBuffer();
+ for (int i = 1; i < f.getFaultCause().length; i++) {
+ sb.append(f.getFaultCause(i).getDescription()[0]);
+ sb.append("\n");
+ }
+ return sb.toString();
+ }
+
private void failTask(String message, Exception exception) {
Status newStatus = new StatusImpl();
Status oldStatus = this.task.getStatus();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-02-11 19:29:59
|
Revision: 1876
http://cogkit.svn.sourceforge.net/cogkit/?rev=1876&view=rev
Author: hategan
Date: 2008-02-11 11:29:56 -0800 (Mon, 11 Feb 2008)
Log Message:
-----------
updated gram jars
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-gt4_0_0/CHANGES.txt
trunk/current/src/cog/modules/provider-gt4_0_0/lib-gt4_0_0/gram-client.jar
trunk/current/src/cog/modules/provider-gt4_0_0/lib-gt4_0_0/gram-utils.jar
Modified: trunk/current/src/cog/modules/provider-gt4_0_0/CHANGES.txt
===================================================================
--- trunk/current/src/cog/modules/provider-gt4_0_0/CHANGES.txt 2008-02-11 19:27:41 UTC (rev 1875)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/CHANGES.txt 2008-02-11 19:29:56 UTC (rev 1876)
@@ -1,3 +1,7 @@
+(02/11/2008)
+
+*** Updated gram jars to 4.0.6 plus a scalability patch.
+
(02/06/2008)
*** Slightly better (I believe) error message propagation from
Modified: trunk/current/src/cog/modules/provider-gt4_0_0/lib-gt4_0_0/gram-client.jar
===================================================================
(Binary files differ)
Modified: trunk/current/src/cog/modules/provider-gt4_0_0/lib-gt4_0_0/gram-utils.jar
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-03-06 12:06:27
|
Revision: 1934
http://cogkit.svn.sourceforge.net/cogkit/?rev=1934&view=rev
Author: hategan
Date: 2008-03-06 04:06:19 -0800 (Thu, 06 Mar 2008)
Log Message:
-----------
added host_types support
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 2008-02-28 17:42:14 UTC (rev 1933)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/CHANGES.txt 2008-03-06 12:06:19 UTC (rev 1934)
@@ -1,3 +1,7 @@
+(03/06/2008)
+
+*** Added support for host_types attribute (patch from benc)
+
(02/28/2008)
*** The previous axis update had a bug with the UUID generator.
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 2008-02-28 17:42:14 UTC (rev 1933)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/src/org/globus/cog/abstraction/impl/execution/gt4_0_0/JobSubmissionTaskHandler.java 2008-03-06 12:06:19 UTC (rev 1934)
@@ -13,6 +13,7 @@
import java.util.Map;
import org.apache.axis.components.uuid.UUIDGenFactory;
+import org.apache.axis.message.MessageElement;
import org.apache.axis.message.addressing.EndpointReferenceType;
import org.apache.axis.types.NonNegativeInteger;
import org.apache.axis.types.PositiveInteger;
@@ -33,6 +34,7 @@
import org.globus.cog.abstraction.interfaces.Task;
import org.globus.exec.client.GramJob;
import org.globus.exec.client.GramJobListener;
+import org.globus.exec.generated.ExtensionsType;
import org.globus.exec.generated.FaultType;
import org.globus.exec.generated.JobDescriptionType;
import org.globus.exec.generated.JobTypeEnumeration;
@@ -300,6 +302,15 @@
desc.setQueue((String) spec.getAttribute("queue"));
}
+ if (spec.getAttribute("host_types") != null) {
+ MessageElement nodesMessageElement = new MessageElement("",
+ "nodes", spec.getAttribute("host_types"));
+ MessageElement[] messageElements = new MessageElement[] { nodesMessageElement };
+ ExtensionsType extensions = new ExtensionsType();
+ extensions.set_any(messageElements);
+ desc.setExtensions(extensions);
+ }
+
desc.setArgument((String[]) spec.getArgumentsAsList().toArray(
new String[0]));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-04-30 15:26:56
|
Revision: 1993
http://cogkit.svn.sourceforge.net/cogkit/?rev=1993&view=rev
Author: hategan
Date: 2008-04-30 08:26:38 -0700 (Wed, 30 Apr 2008)
Log Message:
-----------
only print warning when redirection requested
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 2008-04-30 02:28:21 UTC (rev 1992)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/CHANGES.txt 2008-04-30 15:26:38 UTC (rev 1993)
@@ -1,3 +1,10 @@
+(04/30/2008)
+
+*** Print a warning instead of failing when redirection is
+ requested. Redirection requests will be silently ignored.
+ This can be overriden by saying "fail.on.redirect=true"
+ in the provider properties file.
+
(03/06/2008)
*** Added support for host_types attribute (patch from benc)
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 2008-04-30 02:28:21 UTC (rev 1992)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/src/org/globus/cog/abstraction/impl/execution/gt4_0_0/JobSubmissionTaskHandler.java 2008-04-30 15:26:38 UTC (rev 1993)
@@ -18,8 +18,10 @@
import org.apache.axis.types.NonNegativeInteger;
import org.apache.axis.types.PositiveInteger;
import org.apache.log4j.Logger;
+import org.globus.cog.abstraction.impl.common.AbstractionProperties;
import org.globus.cog.abstraction.impl.common.StatusImpl;
import org.globus.cog.abstraction.impl.common.task.IllegalSpecException;
+import org.globus.cog.abstraction.impl.common.task.InvalidProviderException;
import org.globus.cog.abstraction.impl.common.task.InvalidSecurityContextException;
import org.globus.cog.abstraction.impl.common.task.InvalidServiceContactException;
import org.globus.cog.abstraction.impl.common.task.TaskSubmissionException;
@@ -317,8 +319,7 @@
boolean batchJob = spec.isBatchJob();
if (FileLocation.MEMORY_AND_LOCAL.overlaps(spec.getStdOutputLocation()
.and(spec.getStdErrorLocation()))) {
- throw new IllegalSpecException(
- "The gt4.0.0 provider does not support redirection");
+ complainAboutRedirection();
}
else {
if (spec.getStdInput() != null) {
@@ -355,6 +356,33 @@
return desc;
}
+ private static boolean redirectionWarning;
+
+ private static void complainAboutRedirection() throws IllegalSpecException,
+ TaskSubmissionException {
+ try {
+ if ("true".equals(AbstractionProperties.getProperties("gt4")
+ .getProperty("fail.on.redirect"))) {
+ throw new IllegalSpecException(
+ "The gt4.0.0 provider does not support redirection");
+ }
+ else {
+ synchronized (JobSubmissionTaskHandler.class) {
+ if (!redirectionWarning) {
+ redirectionWarning = true;
+ logger
+ .warn("The GT4 provider does not support redirection. "
+ + "Redirection requests will be ignored without further warnings.");
+ }
+ }
+ }
+ }
+ catch (InvalidProviderException e) {
+ throw new TaskSubmissionException("Cannot get provider properties",
+ e);
+ }
+ }
+
public void stateChanged(GramJob job) {
boolean cleanup = false;
StateEnumeration state = job.getState();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-05-13 13:53:36
|
Revision: 2018
http://cogkit.svn.sourceforge.net/cogkit/?rev=2018&view=rev
Author: hategan
Date: 2008-05-13 06:53:17 -0700 (Tue, 13 May 2008)
Log Message:
-----------
reverted 2016 and committed forgotten boot class
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-gt4_0_0/resources/cog-provider.properties
trunk/current/src/cog/modules/provider-gt4_0_0/src/org/globus/cog/abstraction/impl/execution/gt4_0_0/Boot.java
Modified: trunk/current/src/cog/modules/provider-gt4_0_0/resources/cog-provider.properties
===================================================================
--- trunk/current/src/cog/modules/provider-gt4_0_0/resources/cog-provider.properties 2008-05-13 13:51:34 UTC (rev 2017)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/resources/cog-provider.properties 2008-05-13 13:53:17 UTC (rev 2018)
@@ -25,7 +25,7 @@
provider=gt4
#this is where client-server-config.wsdd will be looked for
-config.path=${user.home}/.globus/cog-provider-gt4_0_0-2/etc/
+config.path=${user.home}/.globus/cog-provider-gt4_0_0-2/
#this is where ogsa.properties will be looked for
globus.location=${user.home}/.globus/cog-provider-gt4_0_0-2/
@@ -73,7 +73,7 @@
provider=gt4ft
#this is where client-server-config.wsdd will be looked for
-config.path=${user.home}/.globus/cog-provider-gt4_0_0-2/etc/
+config.path=${user.home}/.globus/cog-provider-gt4_0_0-2/
#this is where ogsa.properties will be looked for
globus.location=${user.home}/.globus/cog-provider-gt4_0_0-2/
Modified: trunk/current/src/cog/modules/provider-gt4_0_0/src/org/globus/cog/abstraction/impl/execution/gt4_0_0/Boot.java
===================================================================
--- trunk/current/src/cog/modules/provider-gt4_0_0/src/org/globus/cog/abstraction/impl/execution/gt4_0_0/Boot.java 2008-05-13 13:51:34 UTC (rev 2017)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/src/org/globus/cog/abstraction/impl/execution/gt4_0_0/Boot.java 2008-05-13 13:53:17 UTC (rev 2018)
@@ -27,23 +27,21 @@
System.setProperty("GLOBUS_LOCATION", globusLocation);
System.setProperty("org.globus.wsrf.container.webroot", configPath);
ContainerConfig.getConfig().setOption(ContainerConfig.WSRF_LOCATION, globusLocation);
- String ip = CoGProperties.getDefault().getIPAddress();
- if (ip != null) {
- ContainerConfig.getConfig().setOption(ContainerConfig.LOGICAL_HOST, ip);
- // ??
- CoGProperties.getDefault().setHostName(ip);
- }
+ String hostname = CoGProperties.getDefault().getHostName();
+ if (hostname != null) {
+ ContainerConfig.getConfig().setOption(ContainerConfig.LOGICAL_HOST, hostname);
+ }
ContainerConfig.getConfig().setOption(ContainerConfig.INTERNAL_WEB_ROOT_PROPERTY,
AbstractionProperties.getProperties("gt4.0.0").getProperty("server.webroot"));
AxisProperties.setProperty(EngineConfigurationFactoryDefault.OPTION_CLIENT_CONFIG_FILE,
- configPath + File.separator + "client-config.wsdd");
+ configPath + File.separator + "etc" + File.separator + "client-config.wsdd");
BootUtil.checkConfigDir(configPath, "config-gt4_0_0.index", Boot.class.getClassLoader());
}
catch (Exception e) {
- logger.error("Error booting gt4.0.0", e);
+ logger.error("Error booting the GT4.0.x provider", e);
}
catch (Error e) {
- logger.fatal("Java Error caught; this is bad", e);
+ logger.fatal("Java Error caught; this may indicate a problem with the class loading mechanism.", e);
throw e;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|