You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
(39) |
May
(165) |
Jun
(164) |
Jul
(127) |
Aug
(81) |
Sep
(146) |
Oct
(375) |
Nov
(241) |
Dec
(77) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(42) |
Feb
(38) |
Mar
(30) |
Apr
(6) |
May
(17) |
Jun
|
Jul
(15) |
Aug
(59) |
Sep
(31) |
Oct
(44) |
Nov
(30) |
Dec
(12) |
| 2008 |
Jan
(9) |
Feb
(63) |
Mar
(18) |
Apr
(43) |
May
(28) |
Jun
(32) |
Jul
(61) |
Aug
(5) |
Sep
(72) |
Oct
(48) |
Nov
(6) |
Dec
|
|
From: <ha...@us...> - 2008-02-12 17:35:17
|
Revision: 1896
http://cogkit.svn.sourceforge.net/cogkit/?rev=1896&view=rev
Author: hategan
Date: 2008-02-12 09:35:15 -0800 (Tue, 12 Feb 2008)
Log Message:
-----------
added method to access task constraints
Modified Paths:
--------------
trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/scheduler/AbstractScheduler.java
trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/scheduler/Scheduler.java
Modified: trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/scheduler/AbstractScheduler.java
===================================================================
--- trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/scheduler/AbstractScheduler.java 2008-02-12 17:33:40 UTC (rev 1895)
+++ trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/scheduler/AbstractScheduler.java 2008-02-12 17:35:15 UTC (rev 1896)
@@ -221,13 +221,13 @@
return combined;
}
- protected void setConstraints(Task task, Object constraint) {
+ public void setConstraints(Task task, Object constraint) {
synchronized (constraints) {
constraints.put(task, constraint);
}
}
- protected Object getConstraints(Task task) {
+ public Object getConstraints(Task task) {
synchronized (constraints) {
return constraints.get(task);
}
Modified: trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/scheduler/Scheduler.java
===================================================================
--- trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/scheduler/Scheduler.java 2008-02-12 17:33:40 UTC (rev 1895)
+++ trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/scheduler/Scheduler.java 2008-02-12 17:35:15 UTC (rev 1896)
@@ -102,4 +102,6 @@
* Allows handling task failures at the scheduler level
*/
void addFailureHandler(FailureHandler handler);
+
+ Object getConstraints(Task task);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-02-12 17:33:43
|
Revision: 1895
http://cogkit.svn.sourceforge.net/cogkit/?rev=1895&view=rev
Author: hategan
Date: 2008-02-12 09:33:40 -0800 (Tue, 12 Feb 2008)
Log Message:
-----------
the same weirdness, propagated from the dawn of time
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-ssh/src/org/globus/cog/abstraction/impl/ssh/execution/JobSubmissionTaskHandler.java
Modified: trunk/current/src/cog/modules/provider-ssh/src/org/globus/cog/abstraction/impl/ssh/execution/JobSubmissionTaskHandler.java
===================================================================
--- trunk/current/src/cog/modules/provider-ssh/src/org/globus/cog/abstraction/impl/ssh/execution/JobSubmissionTaskHandler.java 2008-02-12 17:32:32 UTC (rev 1894)
+++ trunk/current/src/cog/modules/provider-ssh/src/org/globus/cog/abstraction/impl/ssh/execution/JobSubmissionTaskHandler.java 2008-02-12 17:33:40 UTC (rev 1895)
@@ -80,12 +80,11 @@
SSHRunner r = new SSHRunner(s, exec);
r.addListener(this);
- // check if the task has not been canceled after it was submitted
- // for execution
- if (this.task.getStatus().getStatusCode() == Status.UNSUBMITTED) {
- this.task.setStatus(Status.SUBMITTED);
- r.startRun(exec);
- this.task.setStatus(Status.ACTIVE);
+ synchronized(this) {
+ if (this.task.getStatus().getStatusCode() != Status.CANCELED) {
+ r.startRun(exec);
+ this.task.setStatus(Status.ACTIVE);
+ }
}
}
}
@@ -100,8 +99,9 @@
// not implemented yet
}
- public void cancel() throws InvalidSecurityContextException,
+ public synchronized void cancel() throws InvalidSecurityContextException,
TaskSubmissionException {
+ //TODO implement me
}
private String prepareSpecification(JobSpecification spec)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-02-12 17:32:36
|
Revision: 1894
http://cogkit.svn.sourceforge.net/cogkit/?rev=1894&view=rev
Author: hategan
Date: 2008-02-12 09:32:32 -0800 (Tue, 12 Feb 2008)
Log Message:
-----------
fixed some weirdness with the handlers
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/cobalt/execution/JobSubmissionTaskHandler.java
trunk/current/src/cog/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/pbs/execution/JobSubmissionTaskHandler.java
Modified: trunk/current/src/cog/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/cobalt/execution/JobSubmissionTaskHandler.java
===================================================================
--- trunk/current/src/cog/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/cobalt/execution/JobSubmissionTaskHandler.java 2008-02-12 17:32:00 UTC (rev 1893)
+++ trunk/current/src/cog/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/cobalt/execution/JobSubmissionTaskHandler.java 2008-02-12 17:32:32 UTC (rev 1894)
@@ -41,6 +41,7 @@
}
else {
this.task = task;
+ task.setStatus(Status.SUBMITTING);
try {
spec = (JobSpecification) this.task.getSpecification();
}
@@ -57,13 +58,15 @@
}
try {
- new CobaltExecutor(task, this).start();
- // check if the task has not been canceled after it was
- // submitted for execution
- if (this.task.getStatus().getStatusCode() == Status.UNSUBMITTED) {
- this.task.setStatus(Status.SUBMITTED);
- if (spec.isBatchJob()) {
- this.task.setStatus(Status.COMPLETED);
+ synchronized(this) {
+ // check if the task has not been canceled after it was
+ // submitted for execution
+ if (this.task.getStatus().getStatusCode() != Status.CANCELED) {
+ new CobaltExecutor(task, this).start();
+ this.task.setStatus(Status.SUBMITTED);
+ if (spec.isBatchJob()) {
+ this.task.setStatus(Status.COMPLETED);
+ }
}
}
}
@@ -87,8 +90,9 @@
TaskSubmissionException {
}
- public void cancel() throws InvalidSecurityContextException,
+ public synchronized void cancel() throws InvalidSecurityContextException,
TaskSubmissionException {
+ //TODO qdel?
this.task.setStatus(Status.CANCELED);
}
Modified: trunk/current/src/cog/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/pbs/execution/JobSubmissionTaskHandler.java
===================================================================
--- trunk/current/src/cog/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/pbs/execution/JobSubmissionTaskHandler.java 2008-02-12 17:32:00 UTC (rev 1893)
+++ trunk/current/src/cog/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/pbs/execution/JobSubmissionTaskHandler.java 2008-02-12 17:32:32 UTC (rev 1894)
@@ -41,6 +41,7 @@
}
else {
this.task = task;
+ task.setStatus(Status.SUBMITTING);
try {
spec = (JobSpecification) this.task.getSpecification();
}
@@ -57,13 +58,13 @@
}
try {
- new PBSExecutor(task, this).start();
- // check if the task has not been canceled after it was
- // submitted for execution
- if (this.task.getStatus().getStatusCode() == Status.UNSUBMITTED) {
- this.task.setStatus(Status.SUBMITTED);
- if (spec.isBatchJob()) {
- this.task.setStatus(Status.COMPLETED);
+ synchronized(this) {
+ if (this.task.getStatus().getStatusCode() != Status.CANCELED) {
+ new PBSExecutor(task, this).start();
+ this.task.setStatus(Status.SUBMITTED);
+ if (spec.isBatchJob()) {
+ this.task.setStatus(Status.COMPLETED);
+ }
}
}
}
@@ -87,8 +88,9 @@
TaskSubmissionException {
}
- public void cancel() throws InvalidSecurityContextException,
+ public synchronized void cancel() throws InvalidSecurityContextException,
TaskSubmissionException {
+ //TODO actually cancel the job
this.task.setStatus(Status.CANCELED);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-02-12 17:32:05
|
Revision: 1893
http://cogkit.svn.sourceforge.net/cogkit/?rev=1893&view=rev
Author: hategan
Date: 2008-02-12 09:32:00 -0800 (Tue, 12 Feb 2008)
Log Message:
-----------
attempt to make this behave better if the job directory is invalid
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/pbs/PBSExecutor.java
Modified: trunk/current/src/cog/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/pbs/PBSExecutor.java
===================================================================
--- trunk/current/src/cog/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/pbs/PBSExecutor.java 2008-02-12 17:29:05 UTC (rev 1892)
+++ trunk/current/src/cog/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/pbs/PBSExecutor.java 2008-02-12 17:32:00 UTC (rev 1893)
@@ -143,9 +143,6 @@
writeAttr("count", "-l nodes=", wr);
writeAttr("maxwalltime", "-l walltime=", wr);
writeAttr("queue", "-q ", wr);
- if (spec.getDirectory() != null) {
- wr.write("#PBS -d " + quote(spec.getDirectory()) + '\n');
- }
if (spec.getStdInput() != null) {
throw new IOException("The PBSlocal provider cannot redirect STDIN");
}
@@ -178,6 +175,9 @@
logger.debug("Wrapper after variable substitution: " + wrapper);
}
}
+ if (spec.getDirectory() != null) {
+ wr.write("cd " + quote(spec.getDirectory()) + " && ");
+ }
wr.write(quote(spec.getExecutable()));
List args = spec.getArgumentsAsList();
if (args != null && args.size() > 0) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-02-12 17:29:15
|
Revision: 1892
http://cogkit.svn.sourceforge.net/cogkit/?rev=1892&view=rev
Author: hategan
Date: 2008-02-12 09:29:05 -0800 (Tue, 12 Feb 2008)
Log Message:
-----------
fixed cancelling and weird status checks: if you want to see if it was canceled then don't check if it's unsubmitted; those are two different things
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java
Modified: trunk/current/src/cog/modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java
===================================================================
--- trunk/current/src/cog/modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java 2008-02-12 17:27:23 UTC (rev 1891)
+++ trunk/current/src/cog/modules/provider-local/src/org/globus/cog/abstraction/impl/execution/local/JobSubmissionTaskHandler.java 2008-02-12 17:29:05 UTC (rev 1892)
@@ -54,8 +54,13 @@
if (this.task != null) {
throw new TaskSubmissionException(
"JobSubmissionTaskHandler cannot handle two active jobs simultaneously");
- } else {
+ }
+ else if (this.task.getStatus().getStatusCode() != Status.UNSUBMITTED) {
+ throw new TaskSubmissionException("Task is not in unsubmitted state");
+ }
+ else {
this.task = task;
+ task.setStatus(Status.SUBMITTING);
JobSpecification spec;
try {
spec = (JobSpecification) this.task.getSpecification();
@@ -72,14 +77,14 @@
if (logger.isInfoEnabled()) {
logger.info("Submitting task " + task);
}
- this.thread = new Thread(this);
- // check if the task has not been canceled after it was
- // submitted for execution
- if (this.task.getStatus().getStatusCode() == Status.UNSUBMITTED) {
- this.task.setStatus(Status.SUBMITTED);
- this.thread.start();
- if (spec.isBatchJob()) {
- this.task.setStatus(Status.COMPLETED);
+ synchronized(this) {
+ this.thread = new Thread(this);
+ if (this.task.getStatus().getStatusCode() != Status.CANCELED) {
+ this.task.setStatus(Status.SUBMITTED);
+ this.thread.start();
+ if (spec.isBatchJob()) {
+ this.task.setStatus(Status.COMPLETED);
+ }
}
}
} catch (Exception e) {
@@ -98,9 +103,11 @@
public void cancel() throws InvalidSecurityContextException,
TaskSubmissionException {
- killed = true;
- process.destroy();
- this.task.setStatus(Status.CANCELED);
+ synchronized(this) {
+ killed = true;
+ process.destroy();
+ this.task.setStatus(Status.CANCELED);
+ }
}
private static final FileLocation REDIRECT_LOCATION = FileLocation.MEMORY
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 1891
http://cogkit.svn.sourceforge.net/cogkit/?rev=1891&view=rev
Author: hategan
Date: 2008-02-12 09:27:23 -0800 (Tue, 12 Feb 2008)
Log Message:
-----------
added a bit of an extra state
Modified Paths:
--------------
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/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-12 17:26:21 UTC (rev 1890)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/src/org/globus/cog/abstraction/impl/execution/gt4_0_0/JobSubmissionTaskHandler.java 2008-02-12 17:27:23 UTC (rev 1891)
@@ -79,6 +79,7 @@
}
else {
this.task = task;
+ task.setStatus(Status.SUBMITTING);
JobDescriptionType rsl;
JobSpecification spec;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-02-12 17:26:36
|
Revision: 1890
http://cogkit.svn.sourceforge.net/cogkit/?rev=1890&view=rev
Author: hategan
Date: 2008-02-12 09:26:21 -0800 (Tue, 12 Feb 2008)
Log Message:
-----------
removed gt2ft provider; it has been unmaintained. If sufficient interest exists for it, the features should be integrated in the gt2 provider
Removed Paths:
-------------
trunk/current/src/cog/modules/provider-gt2ft/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-02-12 17:23:54
|
Revision: 1889
http://cogkit.svn.sourceforge.net/cogkit/?rev=1889&view=rev
Author: hategan
Date: 2008-02-12 09:23:51 -0800 (Tue, 12 Feb 2008)
Log Message:
-----------
changes
Modified Paths:
--------------
trunk/current/src/cog/modules/abstraction-common/CHANGES.txt
Modified: trunk/current/src/cog/modules/abstraction-common/CHANGES.txt
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/CHANGES.txt 2008-02-12 17:21:34 UTC (rev 1888)
+++ trunk/current/src/cog/modules/abstraction-common/CHANGES.txt 2008-02-12 17:23:51 UTC (rev 1889)
@@ -1,3 +1,10 @@
+(02/12/2008)
+
+*** Finally fixed the notification order. A task is now
+ guaranteed to go through the complete status lifecycle
+ and that no out-of-order status events will occur (e.g.
+ no Active after Completed).
+
(11/23/2007)
*** Fixed broken isDirectory file operation
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-02-12 17:21:37
|
Revision: 1888
http://cogkit.svn.sourceforge.net/cogkit/?rev=1888&view=rev
Author: hategan
Date: 2008-02-12 09:21:34 -0800 (Tue, 12 Feb 2008)
Log Message:
-----------
updated gt2 provider
Modified Paths:
--------------
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/file/gridftp/FileResourceImpl.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 17:20:25 UTC (rev 1887)
+++ trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2008-02-12 17:21:34 UTC (rev 1888)
@@ -67,7 +67,11 @@
throw new TaskSubmissionException(
"JobSubmissionTaskHandler cannot handle two active jobs simultaneously");
}
+ if (this.task.getStatus().getStatusCode() != Status.UNSUBMITTED) {
+ throw new TaskSubmissionException("This task is already submitted");
+ }
this.task = task;
+ this.task.setStatus(Status.SUBMITTING);
this.securityContext = getSecurityContext(task);
this.credential = (GSSCredential) securityContext.getCredentials();
String rsl;
@@ -137,17 +141,16 @@
try {
// check if the task has not been canceled after it was
// submitted for execution
- if (this.task.getStatus().getStatusCode() == Status.UNSUBMITTED) {
- this.gramJob.request(server, spec.isBatchJob(), limitedDeleg);
- 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);
- }
+
+ this.gramJob.request(server, spec.isBatchJob(), limitedDeleg);
+ 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);
+ }
}
catch (GramException ge) {
cleanup();
@@ -159,10 +162,11 @@
gsse);
}
}
-
+
private boolean isLimitedDelegation(SecurityContext sc) {
if (sc instanceof GlobusSecurityContextImpl) {
- return ((GlobusSecurityContextImpl) securityContext).getDelegation() != Delegation.FULL_DELEGATION;
+ return ((GlobusSecurityContextImpl) securityContext)
+ .getDelegation() != Delegation.FULL_DELEGATION;
}
else {
return true;
@@ -432,8 +436,7 @@
String gassURL = null;
try {
- this.gassServer = GassServerFactory
- .getGassServer(this.credential);
+ this.gassServer = GassServerFactory.getGassServer(this.credential);
this.gassServer.registerDefaultDeactivator();
}
catch (Exception e) {
@@ -513,14 +516,16 @@
public void outputClosed() {
}
- private SecurityContext getSecurityContext(Task task) throws InvalidSecurityContextException {
+ private SecurityContext getSecurityContext(Task task)
+ throws InvalidSecurityContextException {
SecurityContext sc = task.getService(0).getSecurityContext();
if (sc == null) {
// create default credentials
sc = new GlobusSecurityContextImpl();
GSSManager manager = ExtendedGSSManager.getInstance();
try {
- sc.setCredentials(manager.createCredential(GSSCredential.INITIATE_AND_ACCEPT));
+ sc.setCredentials(manager
+ .createCredential(GSSCredential.INITIATE_AND_ACCEPT));
}
catch (GSSException e) {
throw new InvalidSecurityContextException(e);
Modified: trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/FileResourceImpl.java
===================================================================
--- trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/FileResourceImpl.java 2008-02-12 17:20:25 UTC (rev 1887)
+++ trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/FileResourceImpl.java 2008-02-12 17:21:34 UTC (rev 1888)
@@ -24,7 +24,6 @@
import org.globus.cog.abstraction.interfaces.GridFile;
import org.globus.cog.abstraction.interfaces.SecurityContext;
import org.globus.cog.abstraction.interfaces.ServiceContact;
-import org.globus.ftp.GridFTPSession;
import org.globus.ftp.MlsxEntry;
import org.globus.ftp.exception.ClientException;
import org.globus.ftp.exception.ServerException;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-02-12 17:20:34
|
Revision: 1887
http://cogkit.svn.sourceforge.net/cogkit/?rev=1887&view=rev
Author: hategan
Date: 2008-02-12 09:20:25 -0800 (Tue, 12 Feb 2008)
Log Message:
-----------
is anybody using this stuff?
Modified Paths:
--------------
trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskGraphMarshaller.java
trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskGraphUnmarshaller.java
trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskMarshaller.java
trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskUnmarshaller.java
Modified: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskGraphMarshaller.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskGraphMarshaller.java 2008-02-12 17:11:11 UTC (rev 1886)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskGraphMarshaller.java 2008-02-12 17:20:25 UTC (rev 1887)
@@ -118,6 +118,9 @@
case Status.SUBMITTED :
return "Submitted";
+
+ case Status.SUBMITTING :
+ return "Submitting";
case Status.SUSPENDED :
return "Suspended";
Modified: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskGraphUnmarshaller.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskGraphUnmarshaller.java 2008-02-12 17:11:11 UTC (rev 1886)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskGraphUnmarshaller.java 2008-02-12 17:20:25 UTC (rev 1887)
@@ -167,6 +167,8 @@
return Status.FAILED;
} else if (statusString.equalsIgnoreCase("Resumed")) {
return Status.RESUMED;
+ } else if (statusString.equalsIgnoreCase("Submitting")) {
+ return Status.SUBMITTING;
} else if (statusString.equalsIgnoreCase("Submitted")) {
return Status.SUBMITTED;
} else if (statusString.equalsIgnoreCase("Suspended")) {
Modified: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskMarshaller.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskMarshaller.java 2008-02-12 17:11:11 UTC (rev 1886)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskMarshaller.java 2008-02-12 17:20:25 UTC (rev 1887)
@@ -97,16 +97,6 @@
// set the task status
xmlTask.setStatus(task.getStatus().getStatusString());
-
- // set the task submitted and completed time
- Calendar submittedTime = task.getSubmittedTime();
- Calendar completedTime = task.getCompletedTime();
- if (submittedTime != null) {
- xmlTask.setSubmittedTime(submittedTime.getTime());
- }
- if (completedTime != null) {
- xmlTask.setCompletedTime(completedTime.getTime());
- }
}
private static void setServices(
Modified: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskUnmarshaller.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskUnmarshaller.java 2008-02-12 17:11:11 UTC (rev 1886)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/xml/TaskUnmarshaller.java 2008-02-12 17:20:25 UTC (rev 1887)
@@ -299,6 +299,8 @@
return Status.FAILED;
} else if (statusString.equalsIgnoreCase("Resumed")) {
return Status.RESUMED;
+ } else if (statusString.equalsIgnoreCase("Submitting")) {
+ return Status.SUBMITTING;
} else if (statusString.equalsIgnoreCase("Submitted")) {
return Status.SUBMITTED;
} else if (statusString.equalsIgnoreCase("Suspended")) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-02-12 17:11:15
|
Revision: 1886
http://cogkit.svn.sourceforge.net/cogkit/?rev=1886&view=rev
Author: hategan
Date: 2008-02-12 09:11:11 -0800 (Tue, 12 Feb 2008)
Log Message:
-----------
...
Modified Paths:
--------------
trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/CachingDelegatedFileOperationHandler.java
trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/fileTransfer/DelegatedFileTransferHandler.java
Modified: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/CachingDelegatedFileOperationHandler.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/CachingDelegatedFileOperationHandler.java 2008-02-12 17:10:23 UTC (rev 1885)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/CachingDelegatedFileOperationHandler.java 2008-02-12 17:11:11 UTC (rev 1886)
@@ -30,6 +30,7 @@
public synchronized void submit(Task task) throws IllegalSpecException,
InvalidSecurityContextException, InvalidServiceContactException,
TaskSubmissionException {
+ task.setStatus(Status.SUBMITTING);
Service service = task.getService(0);
if (service == null) {
throw new IllegalSpecException("Service is not set");
Modified: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/fileTransfer/DelegatedFileTransferHandler.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/fileTransfer/DelegatedFileTransferHandler.java 2008-02-12 17:10:23 UTC (rev 1885)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/fileTransfer/DelegatedFileTransferHandler.java 2008-02-12 17:11:11 UTC (rev 1886)
@@ -10,7 +10,6 @@
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.Enumeration;
-import java.util.GregorianCalendar;
import org.apache.log4j.Logger;
import org.globus.cog.abstraction.impl.common.AbstractionFactory;
@@ -467,6 +466,7 @@
}
public void run() {
+ this.task.setStatus(Status.ACTIVE);
// todo retreive progress markers
if (this.thirdparty) {
doThirdPartyTransfer();
@@ -583,7 +583,6 @@
status.setPrevStatusCode(this.task.getStatus().getStatusCode());
status.setStatusCode(Status.FAILED);
status.setException(e);
- status.setTime(new GregorianCalendar());
this.task.setStatus(status);
stopResources();
if (logger.isDebugEnabled()) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-02-12 17:10:28
|
Revision: 1885
http://cogkit.svn.sourceforge.net/cogkit/?rev=1885&view=rev
Author: hategan
Date: 2008-02-12 09:10:23 -0800 (Tue, 12 Feb 2008)
Log Message:
-----------
removed time tracking
Modified Paths:
--------------
trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/taskgraph/TaskGraphImpl.java
Modified: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/taskgraph/TaskGraphImpl.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/taskgraph/TaskGraphImpl.java 2008-02-12 17:09:13 UTC (rev 1884)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/taskgraph/TaskGraphImpl.java 2008-02-12 17:10:23 UTC (rev 1885)
@@ -133,12 +133,6 @@
public void setStatus(Status status) {
this.status = status;
- if (this.status.getStatusCode() == Status.SUBMITTED) {
- this.submittedTime = this.status.getTime();
- } else if (this.status.getStatusCode() == Status.COMPLETED) {
- this.completedTime = this.status.getTime();
- }
-
if (this.statusListeners == null) {
return;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-02-12 17:09:17
|
Revision: 1884
http://cogkit.svn.sourceforge.net/cogkit/?rev=1884&view=rev
Author: hategan
Date: 2008-02-12 09:09:13 -0800 (Tue, 12 Feb 2008)
Log Message:
-----------
ensure proper ordering of events, and that all events are reported (even if by guessing)
Modified Paths:
--------------
trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/TaskImpl.java
Added Paths:
-----------
trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/StatusOrder.java
Added: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/StatusOrder.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/StatusOrder.java (rev 0)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/StatusOrder.java 2008-02-12 17:09:13 UTC (rev 1884)
@@ -0,0 +1,53 @@
+//----------------------------------------------------------------------
+//This code is developed as part of the Java CoG Kit project
+//The terms of the license can be found at http://www.cogkit.org/license
+//This message may not be removed or altered.
+//----------------------------------------------------------------------
+
+/*
+ * Created on Feb 11, 2008
+ */
+package org.globus.cog.abstraction.impl.common.task;
+
+import org.globus.cog.abstraction.interfaces.Status;
+
+public class StatusOrder {
+
+ /**
+ * Returns the predecessor of a status code or -1 if the code
+ * does not have one
+ */
+ public static int pred(int code) {
+ switch (code) {
+ case Status.CANCELED:
+ case Status.FAILED:
+ case Status.COMPLETED:
+ return Status.ACTIVE;
+ case Status.SUBMITTING:
+ return Status.UNSUBMITTED;
+ case Status.SUBMITTED:
+ return Status.SUBMITTING;
+ case Status.ACTIVE:
+ return Status.SUBMITTED;
+ case Status.RESUMED:
+ return Status.SUSPENDED;
+ default:
+ return -1;
+ }
+ }
+
+ /**
+ * Returns true code1 is greater than code2 in the status
+ * order. The two need not be comparable (in which case false
+ * will be returned).
+ */
+ public static boolean greaterThan(int code1, int code2) {
+ int prev = pred(code1);
+ if (prev == -1) {
+ return false;
+ }
+ else {
+ return prev == code2 || greaterThan(prev, code2);
+ }
+ }
+}
Modified: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/TaskImpl.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/TaskImpl.java 2008-02-12 17:04:05 UTC (rev 1883)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/TaskImpl.java 2008-02-12 17:09:13 UTC (rev 1884)
@@ -8,11 +8,10 @@
import java.io.File;
import java.util.ArrayList;
-import java.util.Calendar;
import java.util.Collection;
-import java.util.Enumeration;
-import java.util.Hashtable;
+import java.util.HashMap;
import java.util.Iterator;
+import java.util.Map;
import org.apache.log4j.Logger;
import org.globus.cog.abstraction.impl.common.IdentityImpl;
@@ -46,17 +45,16 @@
private CopyOnWriteHashSet statusListeners, outputListeners;
- private Hashtable attributes = null;
- private Calendar submittedTime = null;
- private Calendar completedTime = null;
- private ArrayList serviceList = null;
+ private Map attributes;
+
+ private ArrayList serviceList;
private int requiredServices = 0;
private boolean anythingWaiting;
public TaskImpl() {
this.id = new IdentityImpl();
- this.attributes = new Hashtable();
+ this.attributes = new HashMap();
this.serviceList = new ArrayList();
this.status = new StatusImpl();
statusListeners = new CopyOnWriteHashSet();
@@ -196,19 +194,39 @@
}
public void setStatus(Status status) {
- if (logger.isDebugEnabled()) {
- logger.debug(this + " setting status to " + status);
+ int next = status.getStatusCode();
+ int pred = StatusOrder.pred(next);
+ boolean missing = false;
+ boolean discard = false;
+ synchronized (this) {
+ int crt = this.status.getStatusCode();
+ if (StatusOrder.greaterThan(crt, next) || crt == next) {
+ // discard late arrivals
+ discard = true;
+ }
+ else if (pred != crt && pred != -1) {
+ missing = true;
+ }
}
- this.status = status;
-
- if (this.status.getStatusCode() == Status.SUBMITTED) {
- this.submittedTime = this.status.getTime();
+ if (missing) {
+ setStatus(pred);
}
- else if (this.status.getStatusCode() == Status.COMPLETED) {
- this.completedTime = this.status.getTime();
+ if (!discard) {
+ // not much choice left
+ if (logger.isDebugEnabled()) {
+ logger.debug(this + " setting status to " + status);
+ }
+ synchronized(this) {
+ this.status = status;
+ }
+ notifyListeners(status);
}
+ // Now prove that this works correctly with concurrent updates.
+ // I will pay $20 for the first one.
+ }
- StatusEvent event = new StatusEvent(this, this.status);
+ protected void notifyListeners(Status status) {
+ StatusEvent event = new StatusEvent(this, status);
Iterator i = statusListeners.iterator();
try {
while (i.hasNext()) {
@@ -245,8 +263,8 @@
return this.attributes.get(name.toLowerCase());
}
- public Enumeration getAllAttributes() {
- return this.attributes.keys();
+ public Collection getAttributeNames() {
+ return this.attributes.keySet();
}
public void addStatusListener(StatusListener listener) {
@@ -272,14 +290,19 @@
public String toString() {
return "Task(type=" + typeString(type) + ", identity=" + id + ")";
}
-
+
public static String typeString(int type) {
switch (type) {
- case JOB_SUBMISSION: return "JOB_SUBMISSION";
- case FILE_TRANSFER: return "FILE_TRANSFER";
- case FILE_OPERATION: return "FILE_OPERATION";
- case INFORMATION_QUERY: return "INFORMATION_QUERY";
- default: return "UNKNOWN";
+ case JOB_SUBMISSION:
+ return "JOB_SUBMISSION";
+ case FILE_TRANSFER:
+ return "FILE_TRANSFER";
+ case FILE_OPERATION:
+ return "FILE_OPERATION";
+ case INFORMATION_QUERY:
+ return "INFORMATION_QUERY";
+ default:
+ return "UNKNOWN";
}
}
@@ -307,14 +330,6 @@
return (this.status.getStatusCode() == Status.CANCELED);
}
- public Calendar getSubmittedTime() {
- return this.submittedTime;
- }
-
- public Calendar getCompletedTime() {
- return this.completedTime;
- }
-
public boolean equals(Object object) {
return this.id.equals(((ExecutableObject) object).getIdentity());
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-02-12 17:04:08
|
Revision: 1883
http://cogkit.svn.sourceforge.net/cogkit/?rev=1883&view=rev
Author: hategan
Date: 2008-02-12 09:04:05 -0800 (Tue, 12 Feb 2008)
Log Message:
-----------
added status
Modified Paths:
--------------
trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/FileOperationTaskHandler.java
Modified: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/FileOperationTaskHandler.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/FileOperationTaskHandler.java 2008-02-12 17:00:38 UTC (rev 1882)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/FileOperationTaskHandler.java 2008-02-12 17:04:05 UTC (rev 1883)
@@ -14,6 +14,7 @@
import org.globus.cog.abstraction.impl.common.AbstractionFactory;
import org.globus.cog.abstraction.impl.common.ProviderMethodException;
+import org.globus.cog.abstraction.interfaces.Status;
import org.globus.cog.abstraction.interfaces.Task;
import org.globus.cog.abstraction.interfaces.TaskHandler;
@@ -73,6 +74,7 @@
InvalidSecurityContextException, InvalidServiceContactException,
TaskSubmissionException {
TaskHandler taskHandler;
+ task.setStatus(Status.SUBMITTING);
try {
taskHandler = getOrCreateHandler(task);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-02-12 17:00:42
|
Revision: 1882
http://cogkit.svn.sourceforge.net/cogkit/?rev=1882&view=rev
Author: hategan
Date: 2008-02-12 09:00:38 -0800 (Tue, 12 Feb 2008)
Log Message:
-----------
updated implementation
Modified Paths:
--------------
trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/StatusImpl.java
Modified: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/StatusImpl.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/StatusImpl.java 2008-02-12 16:59:41 UTC (rev 1881)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/StatusImpl.java 2008-02-12 17:00:38 UTC (rev 1882)
@@ -6,8 +6,7 @@
package org.globus.cog.abstraction.impl.common;
-import java.util.Calendar;
-import java.util.GregorianCalendar;
+import java.util.Date;
import org.globus.cog.abstraction.interfaces.Status;
@@ -16,23 +15,22 @@
private int prevStatus;
private Exception exception = null;
private String message = null;
- private Calendar time = null;
+ private Date time;
public StatusImpl() {
this.curStatus = Status.UNSUBMITTED;
this.prevStatus = Status.UNSUBMITTED;
- this.time = new GregorianCalendar();
+ this.time = new Date();
}
public StatusImpl(int curStatus) {
+ this();
this.curStatus = curStatus;
- this.prevStatus = Status.UNSUBMITTED;
- this.time = new GregorianCalendar();
}
public void setStatusCode(int status) {
this.curStatus = status;
- this.time = new GregorianCalendar();
+ this.time = new Date();
}
public int getStatusCode() {
@@ -63,18 +61,22 @@
return this.message;
}
- public void setTime(Calendar time) {
+ public void setTime(Date time) {
this.time = time;
}
- public Calendar getTime() {
+ public Date getTime() {
return this.time;
}
public boolean isTerminal() {
- return curStatus == COMPLETED || curStatus == FAILED
- || curStatus == CANCELED;
+ return isTerminal(curStatus);
}
+
+ public static boolean isTerminal(int status) {
+ return status == COMPLETED || status == FAILED
+ || status == CANCELED;
+ }
public String getStatusString() {
return code2String(this.curStatus);
@@ -104,6 +106,9 @@
case Status.SUBMITTED:
return "Submitted";
+ case Status.SUBMITTING:
+ return "Submitting";
+
case Status.SUSPENDED:
return "Suspended";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-02-12 16:59:44
|
Revision: 1881
http://cogkit.svn.sourceforge.net/cogkit/?rev=1881&view=rev
Author: hategan
Date: 2008-02-12 08:59:41 -0800 (Tue, 12 Feb 2008)
Log Message:
-----------
removed time tracking of events from task; changed attribute name accessor
Modified Paths:
--------------
trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/interfaces/Task.java
Modified: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/interfaces/Task.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/interfaces/Task.java 2008-02-12 16:57:52 UTC (rev 1880)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/interfaces/Task.java 2008-02-12 16:59:41 UTC (rev 1881)
@@ -7,9 +7,7 @@
package org.globus.cog.abstraction.interfaces;
import java.io.File;
-import java.util.Calendar;
import java.util.Collection;
-import java.util.Enumeration;
import org.globus.cog.abstraction.xml.MarshalException;
@@ -232,7 +230,7 @@
* @return an enumeration of all the attribute names. null if no attribute
* available
*/
- public Enumeration getAllAttributes();
+ public Collection getAttributeNames();
/**
* Adds a listener to recieve the output events associated with this
@@ -292,23 +290,6 @@
* Returns a boolean indicating if the task is canceled.
*/
public boolean isCanceled();
-
- /**
- * Returns the time when this <code>Task</code> was submitted to the
- * remote service.
- *
- * @return the <code>Task</code> submission time. null, if this
- * <code>Task</code> is not yet submitted
- */
- public Calendar getSubmittedTime();
-
- /**
- * Returns the time when this <code>Task</code> was completed.
- *
- * @return the <code>Task</code> completion time. null, if this
- * <code>Task</code> is not yet complete.
- */
- public Calendar getCompletedTime();
/**
* Blocks until the task reaches one of the terminal states (completed, failed or canceled)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-02-12 16:57:53
|
Revision: 1880
http://cogkit.svn.sourceforge.net/cogkit/?rev=1880&view=rev
Author: hategan
Date: 2008-02-12 08:57:52 -0800 (Tue, 12 Feb 2008)
Log Message:
-----------
added submitting state; changed timestamp implementation from Calendar to Date
Modified Paths:
--------------
trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/interfaces/ExecutableObject.java
trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/interfaces/Status.java
Modified: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/interfaces/ExecutableObject.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/interfaces/ExecutableObject.java 2008-02-11 20:10:43 UTC (rev 1879)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/interfaces/ExecutableObject.java 2008-02-12 16:57:52 UTC (rev 1880)
@@ -75,7 +75,7 @@
/**
* Sets the current status of this <code>ExecutableObject</code>.
* Supported status are:
- * {@link Status#UNSUBMITTED}, {@link Status#SUBMITTED}, {@link Status#ACTIVE},
+ * {@link Status#UNSUBMITTED}, {@link Status#SUBMITTING}, {@link Status#SUBMITTED}, {@link Status#ACTIVE},
* {@link Status#SUSPENDED},{@link Status#RESUMED},{@link Status#FAILED},
* {@link Status#CANCELED},{@link Status#COMPLETED},
* {@link Status#UNKNOWN}
Modified: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/interfaces/Status.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/interfaces/Status.java 2008-02-11 20:10:43 UTC (rev 1879)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/interfaces/Status.java 2008-02-12 16:57:52 UTC (rev 1880)
@@ -6,7 +6,7 @@
package org.globus.cog.abstraction.interfaces;
-import java.util.Calendar;
+import java.util.Date;
/**
* An execution status associated with an <code>ExecutableObject</code>.
@@ -18,6 +18,11 @@
* service.
*/
public static final int UNSUBMITTED = 0;
+
+ /**
+ * This is set right before submission.
+ */
+ public static final int SUBMITTING = 8;
/**
* The <code>ExecutableObject</code> is submitted to the remote service
@@ -116,12 +121,12 @@
/**
* Sets the time when the current status changed
*/
- public void setTime(Calendar time);
+ public void setTime(Date time);
/**
* Returns the time when the current status changed.
*/
- public Calendar getTime();
+ public Date getTime();
/**
* Returns <code>true</code> if this status is a terminal
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-02-11 20:10:45
|
Revision: 1879
http://cogkit.svn.sourceforge.net/cogkit/?rev=1879&view=rev
Author: hategan
Date: 2008-02-11 12:10:43 -0800 (Mon, 11 Feb 2008)
Log Message:
-----------
small updates
Modified Paths:
--------------
trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/scheduler/LateBindingScheduler.java
Modified: trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/scheduler/LateBindingScheduler.java
===================================================================
--- trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/scheduler/LateBindingScheduler.java 2008-02-11 19:33:06 UTC (rev 1878)
+++ trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/scheduler/LateBindingScheduler.java 2008-02-11 20:10:43 UTC (rev 1879)
@@ -471,7 +471,7 @@
for (int i = 0; i < contacts.length; i++) {
if (!(contacts[i] instanceof BoundContact)) {
throw new TaskSubmissionException(
- "submitBoundToServices called but at least a contact is not bound");
+ "submitBoundToServices called but at least a contact is not bound (" + contacts[i] + ")");
}
BoundContact c = (BoundContact) contacts[i];
c.setActiveTasks(c.getActiveTasks() + 1);
@@ -596,7 +596,6 @@
synchronized (taskContacts) {
taskContacts.remove(task);
}
- removeConstraints(task);
for (int i = 0; i < contacts.length; i++) {
BoundContact c = (BoundContact) contacts[i];
@@ -639,6 +638,7 @@
return;
}
}
+ removeConstraints(task);
}
}
catch (Exception ee) {
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:33:17
|
Revision: 1878
http://cogkit.svn.sourceforge.net/cogkit/?rev=1878&view=rev
Author: hategan
Date: 2008-02-11 11:33:06 -0800 (Mon, 11 Feb 2008)
Log Message:
-----------
changes
Modified Paths:
--------------
trunk/current/src/cog/modules/karajan/CHANGES.txt
Modified: trunk/current/src/cog/modules/karajan/CHANGES.txt
===================================================================
--- trunk/current/src/cog/modules/karajan/CHANGES.txt 2008-02-11 19:32:02 UTC (rev 1877)
+++ trunk/current/src/cog/modules/karajan/CHANGES.txt 2008-02-11 19:33:06 UTC (rev 1878)
@@ -1,3 +1,8 @@
+(02/11/2008)
+
+*** Added some code to store stack frames of less than 5 elements
+ in a less memory consuming structure that HashMap.
+
(10/03/2007)
*** Converted more things to use the CWD below
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:32:10
|
Revision: 1877
http://cogkit.svn.sourceforge.net/cogkit/?rev=1877&view=rev
Author: hategan
Date: 2008-02-11 11:32:02 -0800 (Mon, 11 Feb 2008)
Log Message:
-----------
added experimental code to make typical stack frames eat less memory
Modified Paths:
--------------
trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/stack/DefaultStackFrame.java
trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/stack/LinkedStack.java
Added Paths:
-----------
trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/stack/ListMap.java
Modified: trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/stack/DefaultStackFrame.java
===================================================================
--- trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/stack/DefaultStackFrame.java 2008-02-11 19:29:56 UTC (rev 1876)
+++ trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/stack/DefaultStackFrame.java 2008-02-11 19:32:02 UTC (rev 1877)
@@ -33,9 +33,14 @@
public void setVar(final String name, final Object value) {
if (map.size() == 0) {
- map = new HashMap(4, 1f);
+ map = new ListMap();
}
- map.put(name, value);
+ int osz = map.size();
+ Object old = map.put(name, value);
+ if (osz == 4 && old == null) {
+ map = new HashMap(map);
+ map.put(name, value);
+ }
}
public void rename(final String oldName, final String newName) {
Modified: trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/stack/LinkedStack.java
===================================================================
--- trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/stack/LinkedStack.java 2008-02-11 19:29:56 UTC (rev 1876)
+++ trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/stack/LinkedStack.java 2008-02-11 19:32:02 UTC (rev 1877)
@@ -9,6 +9,8 @@
import java.util.EmptyStackException;
import java.util.LinkedList;
import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
import org.apache.log4j.Logger;
import org.globus.cog.karajan.util.TypeUtil;
Added: trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/stack/ListMap.java
===================================================================
--- trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/stack/ListMap.java (rev 0)
+++ trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/stack/ListMap.java 2008-02-11 19:32:02 UTC (rev 1877)
@@ -0,0 +1,198 @@
+//----------------------------------------------------------------------
+//This code is developed as part of the Java CoG Kit project
+//The terms of the license can be found at http://www.cogkit.org/license
+//This message may not be removed or altered.
+//----------------------------------------------------------------------
+
+/*
+ * Created on Feb 11, 2008
+ */
+package org.globus.cog.karajan.stack;
+
+import java.util.AbstractList;
+import java.util.AbstractSet;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+public class ListMap implements Map {
+ private Map.Entry[] map;
+ private int next;
+
+ public ListMap() {
+ map = new Map.Entry[4];
+ }
+
+ public void clear() {
+ next = 0;
+ }
+
+ public boolean containsKey(Object key) {
+ return keyIndex(key) != -1;
+ }
+
+ private int keyIndex(Object key) {
+ for (int i = 0; i < next; i++) {
+ if (map[i].getKey().equals(key)) {
+ return i;
+ }
+ }
+ return -1;
+ }
+
+ public boolean containsValue(Object value) {
+ for (int i = 0; i < next; i++) {
+ if ((value == null && map[i].getValue() == null) || map[i].getValue().equals(value)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ public Set entrySet() {
+ return new AbstractSet() {
+
+ public Iterator iterator() {
+ return new Iterator() {
+ private int n;
+
+ public boolean hasNext() {
+ return n < next;
+ }
+
+ public Object next() {
+ return map[n++];
+ }
+
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+ };
+ }
+
+ public int size() {
+ return next;
+ }
+
+ };
+ }
+
+ public Object get(Object key) {
+ int ki = keyIndex(key);
+ if (ki != -1) {
+ return map[ki].getValue();
+ }
+ else {
+ return null;
+ }
+ }
+
+ public boolean isEmpty() {
+ return next == 0;
+ }
+
+ public Set keySet() {
+ return new AbstractSet() {
+
+ public Iterator iterator() {
+ return new Iterator() {
+ private int n;
+
+ public boolean hasNext() {
+ return n < next;
+ }
+
+ public Object next() {
+ return map[n++].getKey();
+ }
+
+ public void remove() {
+ throw new UnsupportedOperationException();
+ }
+ };
+ }
+
+ public int size() {
+ return next;
+ }
+ };
+ }
+
+ public Object put(Object key, Object value) {
+ int ki = keyIndex(key);
+ if (ki == -1) {
+ if (next < map.length) {
+ map[next] = new Entry(key, value);
+ next++;
+ }
+ return null;
+ }
+ else {
+ return map[ki].setValue(value);
+ }
+ }
+
+ public void putAll(Map t) {
+ Iterator i = t.entrySet().iterator();
+ while (i.hasNext()) {
+ Map.Entry e = (Map.Entry) i.next();
+ put(e.getKey(), e.getValue());
+ }
+ }
+
+ public Object remove(Object key) {
+ int ki = keyIndex(key);
+ if (ki == -1) {
+ return null;
+ }
+ else {
+ Object old = map[ki].getValue();
+ for (int i = ki; i < next - 1; i++) {
+ map[i] = map[i + 1];
+ }
+ next--;
+ return old;
+ }
+ }
+
+ public int size() {
+ return next;
+ }
+
+ public Collection values() {
+ return new AbstractList() {
+ public Object get(int index) {
+ return map[index].getValue();
+ }
+
+ public int size() {
+ return next;
+ }
+ };
+ }
+
+ private static class Entry implements Map.Entry {
+ private final Object key;
+ private Object value;
+
+ public Entry(Object key, Object value) {
+ this.key = key;
+ this.value = value;
+ }
+
+ public Object getKey() {
+ return key;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public Object setValue(Object value) {
+ Object old = this.value;
+ this.value = value;
+ return old;
+ }
+ }
+}
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-02-11 19:27:45
|
Revision: 1875
http://cogkit.svn.sourceforge.net/cogkit/?rev=1875&view=rev
Author: hategan
Date: 2008-02-11 11:27:41 -0800 (Mon, 11 Feb 2008)
Log Message:
-----------
fixed some channel reuse issues
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-gt2/CHANGES.txt
trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/FileResourceImpl.java
Modified: trunk/current/src/cog/modules/provider-gt2/CHANGES.txt
===================================================================
--- trunk/current/src/cog/modules/provider-gt2/CHANGES.txt 2008-02-06 21:43:25 UTC (rev 1874)
+++ trunk/current/src/cog/modules/provider-gt2/CHANGES.txt 2008-02-11 19:27:41 UTC (rev 1875)
@@ -1,3 +1,7 @@
+(02/11/2008)
+
+*** The last commit broke things (mlst seems picky).
+
(02/01/2008)
*** Missed some spots on the data channel reuse.
Modified: trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/FileResourceImpl.java
===================================================================
--- trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/FileResourceImpl.java 2008-02-06 21:43:25 UTC (rev 1874)
+++ trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/FileResourceImpl.java 2008-02-11 19:27:41 UTC (rev 1875)
@@ -24,6 +24,7 @@
import org.globus.cog.abstraction.interfaces.GridFile;
import org.globus.cog.abstraction.interfaces.SecurityContext;
import org.globus.cog.abstraction.interfaces.ServiceContact;
+import org.globus.ftp.GridFTPSession;
import org.globus.ftp.MlsxEntry;
import org.globus.ftp.exception.ClientException;
import org.globus.ftp.exception.ServerException;
@@ -155,7 +156,7 @@
* It's twice as fast as doing a cwd
*/
try {
- initializeDataChannel();
+ this.getGridFTPClient().setPassiveMode(false);
MlsxEntry me = this.getGridFTPClient().mlst(dirName);
return me.get("type").endsWith("dir");
}
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.
|
Revision: 1873
http://cogkit.svn.sourceforge.net/cogkit/?rev=1873&view=rev
Author: hategan
Date: 2008-02-05 16:27:11 -0800 (Tue, 05 Feb 2008)
Log Message:
-----------
added a bit more logging
Modified Paths:
--------------
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/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-04 23:42:54 UTC (rev 1872)
+++ 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)
@@ -179,10 +179,15 @@
setMiscJobParams(spec, this.gramJob);
try {
+ if (logger.isDebugEnabled()) {
+ logger.debug("Submitting task: " + task);
+ }
this.gramJob.submit(factoryEndpoint, spec.isBatchJob(), spec
.getDelegation() == Delegation.LIMITED_DELEGATION,
"uuid:" + UUIDGenFactory.getUUIDGen().nextUUID());
- logger.info("Job submitted");
+ if (logger.isDebugEnabled()) {
+ logger.debug("Task submitted: " + task);
+ }
if (spec.isBatchJob()) {
this.task.setStatus(Status.COMPLETED);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2008-02-04 23:42:59
|
Revision: 1872
http://cogkit.svn.sourceforge.net/cogkit/?rev=1872&view=rev
Author: hategan
Date: 2008-02-04 15:42:54 -0800 (Mon, 04 Feb 2008)
Log Message:
-----------
updated jglobus
Modified Paths:
--------------
trunk/current/src/cog/modules/jglobus/project.properties
Added Paths:
-----------
trunk/current/src/cog/modules/jglobus/lib/cog-jglobus-dev-080204.jar
trunk/current/src/cog/modules/jglobus/lib/cog-jobmanager-dev-080204.jar
Removed Paths:
-------------
trunk/current/src/cog/modules/jglobus/lib/cog-jglobus-dev-071203.jar
trunk/current/src/cog/modules/jglobus/lib/cog-jobmanager-dev-071203.jar
Deleted: trunk/current/src/cog/modules/jglobus/lib/cog-jglobus-dev-071203.jar
===================================================================
(Binary files differ)
Added: trunk/current/src/cog/modules/jglobus/lib/cog-jglobus-dev-080204.jar
===================================================================
(Binary files differ)
Property changes on: trunk/current/src/cog/modules/jglobus/lib/cog-jglobus-dev-080204.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/current/src/cog/modules/jglobus/lib/cog-jobmanager-dev-071203.jar
===================================================================
(Binary files differ)
Added: trunk/current/src/cog/modules/jglobus/lib/cog-jobmanager-dev-080204.jar
===================================================================
(Binary files differ)
Property changes on: trunk/current/src/cog/modules/jglobus/lib/cog-jobmanager-dev-080204.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/current/src/cog/modules/jglobus/project.properties
===================================================================
--- trunk/current/src/cog/modules/jglobus/project.properties 2008-02-01 18:37:39 UTC (rev 1871)
+++ trunk/current/src/cog/modules/jglobus/project.properties 2008-02-04 23:42:54 UTC (rev 1872)
@@ -1,6 +1,6 @@
module.name = jglobus
long.name = JGlobus
-version = dev-071203
+version = dev-080204
project = Java CoG Kit
no.javadoc.compile = true
lib.deps = cog-jglobus-*.*,cryptix.*,cryptix32.*,jgss.*,jce-jdk13-131.*,cryptix-asn1.*,junit.*,puretls.*,log4j*.*,commons-logging*.*
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|