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...> - 2007-10-19 20:26:52
|
Revision: 1782
http://cogkit.svn.sourceforge.net/cogkit/?rev=1782&view=rev
Author: hategan
Date: 2007-10-19 13:26:38 -0700 (Fri, 19 Oct 2007)
Log Message:
-----------
added debug option
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 2007-10-11 01:48:54 UTC (rev 1781)
+++ trunk/current/src/cog/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/pbs/PBSExecutor.java 2007-10-19 20:26:38 UTC (rev 1782)
@@ -38,6 +38,11 @@
private ProcessListener listener;
private String stdout, stderr, exitcode;
private File script;
+ private static boolean debug;
+
+ static {
+ debug = "true".equals(Properties.getProperties().getProperty("debug"));
+ }
public PBSExecutor(Task task, ProcessListener listener) {
this.task = task;
@@ -277,14 +282,16 @@
}
protected void cleanup() {
- script.delete();
- new File(exitcode).delete();
- if (spec.getStdOutput() == null && stdout != null) {
- new File(stdout).delete();
+ if (!debug) {
+ script.delete();
+ new File(exitcode).delete();
+ if (spec.getStdOutput() == null && stdout != null) {
+ new File(stdout).delete();
+ }
+ if (spec.getStdError() == null && stderr != null) {
+ new File(stderr).delete();
+ }
}
- if (spec.getStdError() == null && stderr != null) {
- new File(stderr).delete();
- }
}
public void processCompleted(int exitCode) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-10-11 01:48:56
|
Revision: 1781
http://cogkit.svn.sourceforge.net/cogkit/?rev=1781&view=rev
Author: hategan
Date: 2007-10-10 18:48:54 -0700 (Wed, 10 Oct 2007)
Log Message:
-----------
removed -v flag
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-dcache/etc/provider-dcache.properties
Modified: trunk/current/src/cog/modules/provider-dcache/etc/provider-dcache.properties
===================================================================
--- trunk/current/src/cog/modules/provider-dcache/etc/provider-dcache.properties 2007-10-06 19:34:45 UTC (rev 1780)
+++ trunk/current/src/cog/modules/provider-dcache/etc/provider-dcache.properties 2007-10-11 01:48:54 UTC (rev 1781)
@@ -8,4 +8,4 @@
# various command line options to dccp
#
-dccp.options=-v
\ No newline at end of file
+dccp.options=
\ 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-10-06 19:34:49
|
Revision: 1780
http://cogkit.svn.sourceforge.net/cogkit/?rev=1780&view=rev
Author: hategan
Date: 2007-10-06 12:34:45 -0700 (Sat, 06 Oct 2007)
Log Message:
-----------
thread pool threads should be daemon threads
Modified Paths:
--------------
trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/scheduler/submitQueue/NonBlockingSubmit.java
Modified: trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/scheduler/submitQueue/NonBlockingSubmit.java
===================================================================
--- trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/scheduler/submitQueue/NonBlockingSubmit.java 2007-10-04 14:41:30 UTC (rev 1779)
+++ trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/scheduler/submitQueue/NonBlockingSubmit.java 2007-10-06 19:34:45 UTC (rev 1780)
@@ -17,25 +17,28 @@
import edu.emory.mathcs.backport.java.util.concurrent.ExecutorService;
import edu.emory.mathcs.backport.java.util.concurrent.Executors;
+import edu.emory.mathcs.backport.java.util.concurrent.ThreadFactory;
public class NonBlockingSubmit implements Runnable {
private static final Logger logger = Logger.getLogger(NonBlockingSubmit.class);
- private static ExecutorService pool = Executors.newCachedThreadPool();
+ private static ExecutorService pool = Executors.newCachedThreadPool(new DaemonThreadFactory(
+ Executors.defaultThreadFactory()));
+
private final TaskHandler taskHandler;
private final Task task;
private SubmitQueue[] queues;
private int currentQueue;
private int attempts;
- private int id;
-
- private static volatile int sid = 0;
+ private int id;
+ private static volatile int sid = 0;
+
public NonBlockingSubmit(TaskHandler th, Task task, SubmitQueue[] queues) {
this.taskHandler = th;
this.task = task;
this.queues = queues;
- id = sid++;
+ id = sid++;
attempts = 0;
}
@@ -48,7 +51,7 @@
queues[currentQueue++].queue(this);
}
else {
- pool.submit(this);
+ pool.submit(this);
}
}
@@ -68,9 +71,9 @@
logger.warn("Warning: Task handler throws exception and also sets status");
}
else {
- Status ns = new StatusImpl();
- ns.setStatusCode(Status.FAILED);
- ns.setException(ex);
+ Status ns = new StatusImpl();
+ ns.setStatusCode(Status.FAILED);
+ ns.setException(ex);
task.setStatus(ns);
}
}
@@ -106,6 +109,19 @@
public TaskHandler getTaskHandler() {
return taskHandler;
}
-
-
+
+ static class DaemonThreadFactory implements ThreadFactory {
+ private ThreadFactory delegate;
+
+ public DaemonThreadFactory(ThreadFactory delegate) {
+ this.delegate = delegate;
+ }
+
+ public Thread newThread(Runnable r) {
+ Thread t = delegate.newThread(r);
+ t.setDaemon(true);
+ return t;
+ }
+
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 1779
http://cogkit.svn.sourceforge.net/cogkit/?rev=1779&view=rev
Author: hategan
Date: 2007-10-04 07:41:30 -0700 (Thu, 04 Oct 2007)
Log Message:
-----------
oops; added constructor
Modified Paths:
--------------
trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/InvalidSecurityContextException.java
Modified: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/InvalidSecurityContextException.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/InvalidSecurityContextException.java 2007-10-04 00:49:03 UTC (rev 1778)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/common/task/InvalidSecurityContextException.java 2007-10-04 14:41:30 UTC (rev 1779)
@@ -9,6 +9,11 @@
package org.globus.cog.abstraction.impl.common.task;
public class InvalidSecurityContextException extends Exception {
+
+ public InvalidSecurityContextException(Throwable prev) {
+ super(prev);
+ }
+
public InvalidSecurityContextException(String message) {
super(message);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-10-04 00:49:12
|
Revision: 1778
http://cogkit.svn.sourceforge.net/cogkit/?rev=1778&view=rev
Author: hategan
Date: 2007-10-03 17:49:03 -0700 (Wed, 03 Oct 2007)
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 2007-10-04 00:48:45 UTC (rev 1777)
+++ trunk/current/src/cog/modules/karajan/CHANGES.txt 2007-10-04 00:49:03 UTC (rev 1778)
@@ -1,3 +1,7 @@
+(10/03/2007)
+
+*** Converted more things to use the CWD below
+
(09/19/2007)
*** Added hostCount argument to task:execute. This means that, in
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-10-04 00:48:46
|
Revision: 1777
http://cogkit.svn.sourceforge.net/cogkit/?rev=1777&view=rev
Author: hategan
Date: 2007-10-03 17:48:45 -0700 (Wed, 03 Oct 2007)
Log Message:
-----------
cwd stuff
Modified Paths:
--------------
trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/FileWrite.java
trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/functions/Misc.java
Modified: trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/FileWrite.java
===================================================================
--- trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/FileWrite.java 2007-10-04 00:47:48 UTC (rev 1776)
+++ trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/FileWrite.java 2007-10-04 00:48:45 UTC (rev 1777)
@@ -35,8 +35,7 @@
}
protected void partialArgumentsEvaluated(VariableStack stack) throws ExecutionException {
- String fileName = TypeUtil.toString(A_NAME.getValue(stack));
- File file = new File(fileName);
+ File file = TypeUtil.toFile(stack, A_NAME);
try {
final BufferedOutputStream os = new BufferedOutputStream(new FileOutputStream(file,
TypeUtil.toBoolean(A_APPEND.getValue(stack))));
Modified: trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/functions/Misc.java
===================================================================
--- trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/functions/Misc.java 2007-10-04 00:47:48 UTC (rev 1776)
+++ trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/functions/Misc.java 2007-10-04 00:48:45 UTC (rev 1777)
@@ -57,9 +57,9 @@
}
public boolean sys_contains(VariableStack stack) throws ExecutionException {
- String file = TypeUtil.toString(PA_FILE.getValue(stack));
+ File f = TypeUtil.toFile(stack, PA_FILE);
try {
- BufferedReader br = new BufferedReader(new FileReader(file));
+ BufferedReader br = new BufferedReader(new FileReader(f));
String line = null;
String expanded = TypeUtil.toString(PA_VALUE.getValue(stack));
do {
@@ -70,7 +70,7 @@
} while (line != null);
}
catch (Exception e) {
- throw new ExecutionException("Error reading file " + file, e);
+ throw new ExecutionException("Error reading file " + f, e);
}
return false;
}
@@ -112,10 +112,7 @@
public Object sys_readfile(VariableStack stack) throws ExecutionException {
try {
- File f = new File(TypeUtil.toString(PA_FILE.getValue(stack)));
- if (!f.isAbsolute()) {
- f = new File(stack.getExecutionContext().getCwd() + File.separator + f.getPath());
- }
+ File f = TypeUtil.toFile(stack, PA_FILE);
BufferedReader br = new BufferedReader(new FileReader(f));
StringBuffer text = new StringBuffer();
String line = br.readLine();
@@ -139,9 +136,9 @@
}
public Object sys_file_readline(VariableStack stack) throws ExecutionException {
+ File f = TypeUtil.toFile(stack, PA_FILE);
try {
- RandomAccessFile file = new RandomAccessFile(new File(
- TypeUtil.toString(PA_FILE.getValue(stack))), "r");
+ RandomAccessFile file = new RandomAccessFile(f, "r");
try {
file.seek(TypeUtil.toNumber(PA_OFFSET.getValue(stack)).longValue());
return file.readLine();
@@ -219,9 +216,9 @@
public Object sys_outputstream(VariableStack stack) throws ExecutionException {
String type = TypeUtil.toString(PA_TYPE.getValue(stack, null));
if ("file".equalsIgnoreCase(type) || PA_FILE.isPresent(stack)) {
- String file = TypeUtil.toString(PA_FILE.getValue(stack));
+ File f = TypeUtil.toFile(stack, PA_FILE);
try {
- return new PrintStream(new FileOutputStream(new File(file)));
+ return new PrintStream(new FileOutputStream(f));
}
catch (Exception e) {
throw new ExecutionException("Could not open file", e);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-10-04 00:47:49
|
Revision: 1776
http://cogkit.svn.sourceforge.net/cogkit/?rev=1776&view=rev
Author: hategan
Date: 2007-10-03 17:47:48 -0700 (Wed, 03 Oct 2007)
Log Message:
-----------
added toFile to abstract the cwd stuff
Modified Paths:
--------------
trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/util/TypeUtil.java
Modified: trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/util/TypeUtil.java
===================================================================
--- trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/util/TypeUtil.java 2007-10-04 00:46:10 UTC (rev 1775)
+++ trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/util/TypeUtil.java 2007-10-04 00:47:48 UTC (rev 1776)
@@ -12,15 +12,17 @@
package org.globus.cog.karajan.util;
import java.io.ByteArrayOutputStream;
+import java.io.File;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
+import org.globus.cog.karajan.arguments.Arg;
import org.globus.cog.karajan.arguments.VariableArguments;
import org.globus.cog.karajan.parser.ParseTree;
-import org.globus.cog.karajan.stack.Trace;
+import org.globus.cog.karajan.stack.VariableStack;
import org.globus.cog.karajan.workflow.ExecutionException;
import org.globus.cog.karajan.workflow.KarajanRuntimeException;
@@ -315,4 +317,13 @@
buf.append(']');
return buf.toString();
}
+
+ public static File toFile(VariableStack stack, Arg arg) throws ExecutionException {
+ String fileName = TypeUtil.toString(arg.getValue(stack));
+ File file = new File(fileName);
+ if (!file.isAbsolute()) {
+ file = new File(stack.getExecutionContext().getCwd() + File.separator + fileName);
+ }
+ return file;
+ }
}
\ 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-10-04 00:46:12
|
Revision: 1775
http://cogkit.svn.sourceforge.net/cogkit/?rev=1775&view=rev
Author: hategan
Date: 2007-10-03 17:46:10 -0700 (Wed, 03 Oct 2007)
Log Message:
-----------
there are some cases when locks cannot be acquired
Modified Paths:
--------------
trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/restartLog/FlushableLockedFileWriter.java
trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/restartLog/RestartLog.java
Modified: trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/restartLog/FlushableLockedFileWriter.java
===================================================================
--- trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/restartLog/FlushableLockedFileWriter.java 2007-10-03 20:35:19 UTC (rev 1774)
+++ trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/restartLog/FlushableLockedFileWriter.java 2007-10-04 00:46:10 UTC (rev 1775)
@@ -6,11 +6,15 @@
import java.io.OutputStreamWriter;
import java.nio.channels.FileLock;
+import org.apache.log4j.Logger;
+
/**
* A writer that will sync buffers to disks when flush() is called.
*
*/
public class FlushableLockedFileWriter extends OutputStreamWriter {
+ public static final Logger logger = Logger.getLogger(FlushableLockedFileWriter.class);
+
private final FileOutputStream fos;
private File file;
private FileLock lock;
@@ -18,7 +22,12 @@
public FlushableLockedFileWriter(File f, boolean append) throws IOException {
this(new FileOutputStream(f, append));
this.file = f;
- this.lock = fos.getChannel().tryLock();
+ try {
+ this.lock = fos.getChannel().tryLock();
+ }
+ catch (IOException e) {
+ logger.info("Could not acquire lock on " + f, e);
+ }
}
private FlushableLockedFileWriter(FileOutputStream fos) {
@@ -36,11 +45,17 @@
}
public void close() throws IOException {
- lock.release();
+ if (lock != null) {
+ lock.release();
+ }
super.close();
}
public boolean isLocked() {
return lock != null && lock.isValid();
}
+
+ public boolean lockExists() {
+ return lock != null;
+ }
}
\ No newline at end of file
Modified: trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/restartLog/RestartLog.java
===================================================================
--- trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/restartLog/RestartLog.java 2007-10-03 20:35:19 UTC (rev 1774)
+++ trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/restartLog/RestartLog.java 2007-10-04 00:46:10 UTC (rev 1775)
@@ -130,6 +130,10 @@
if (logffw.isLocked()) {
break;
}
+ else if (!logffw.lockExists()) {
+ logger.warn("Failed to acquire exclusive lock on log file.");
+ break;
+ }
}
stack.setVar(LOG_DATA, Collections.EMPTY_MAP);
if (logffw == null) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-10-03 20:35:21
|
Revision: 1774
http://cogkit.svn.sourceforge.net/cogkit/?rev=1774&view=rev
Author: hategan
Date: 2007-10-03 13:35:19 -0700 (Wed, 03 Oct 2007)
Log Message:
-----------
also catch and report errors; they usually end up quietly in a log, so the desire is to make as much noise as possible
Modified Paths:
--------------
trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/events/EventBus.java
Modified: trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/events/EventBus.java
===================================================================
--- trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/events/EventBus.java 2007-10-03 16:12:31 UTC (rev 1773)
+++ trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/events/EventBus.java 2007-10-03 20:35:19 UTC (rev 1774)
@@ -20,6 +20,8 @@
public final class EventBus {
public static final Logger logger = Logger.getLogger(EventBus.class);
+
+ public static final boolean TRACE_EVENTS = false;
private static final EventBus bus = new EventBus();
public volatile static long eventCount;
@@ -116,7 +118,7 @@
public static void send(final EventListener l, final Event event) {
try {
- if (logger.isDebugEnabled()) {
+ if (TRACE_EVENTS) {
logger.debug(event + " -> " + l);
}
if (l != null) {
@@ -143,7 +145,7 @@
logger.fatal("Exception was", e);
}
}
- catch (Exception e) {
+ catch (Throwable e) {
try {
logger.warn("Uncaught exception: " + e.toString() + " in " + l, e);
logger.warn("Event was " + event);
@@ -157,7 +159,7 @@
logger.fatal("Cannot fail element", ee);
}
}
- catch (Exception ee) {
+ catch (Throwable ee) {
logger.warn("Another uncaught exception while handling an uncaught exception.", ee);
logger.warn("The initial exception was", e);
try {
@@ -167,7 +169,7 @@
+ e.toString() + "\n" + ee.toString());
}
}
- catch (Exception eee) {
+ catch (Throwable eee) {
logger.fatal("Cannot fail element", ee);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-10-03 16:12:39
|
Revision: 1773
http://cogkit.svn.sourceforge.net/cogkit/?rev=1773&view=rev
Author: hategan
Date: 2007-10-03 09:12:31 -0700 (Wed, 03 Oct 2007)
Log Message:
-----------
fixed callback issue
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-gt2/CHANGES.txt
trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
Modified: trunk/current/src/cog/modules/provider-gt2/CHANGES.txt
===================================================================
--- trunk/current/src/cog/modules/provider-gt2/CHANGES.txt 2007-10-02 21:27:33 UTC (rev 1772)
+++ trunk/current/src/cog/modules/provider-gt2/CHANGES.txt 2007-10-03 16:12:31 UTC (rev 1773)
@@ -1,3 +1,8 @@
+(10/03/2007)
+
+*** Fixed some issues with the credentials used for the callback
+ handler.
+
(08/20/2007)
*** Updated to use the new redirection stuff
Modified: trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
===================================================================
--- trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2007-10-02 21:27:33 UTC (rev 1772)
+++ trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2007-10-03 16:12:31 UTC (rev 1773)
@@ -22,6 +22,7 @@
import org.globus.cog.abstraction.interfaces.Delegation;
import org.globus.cog.abstraction.interfaces.FileLocation;
import org.globus.cog.abstraction.interfaces.JobSpecification;
+import org.globus.cog.abstraction.interfaces.SecurityContext;
import org.globus.cog.abstraction.interfaces.ServiceContact;
import org.globus.cog.abstraction.interfaces.Status;
import org.globus.cog.abstraction.interfaces.Task;
@@ -40,8 +41,10 @@
import org.globus.rsl.RslNode;
import org.globus.rsl.Value;
import org.globus.rsl.VarRef;
+import org.gridforum.jgss.ExtendedGSSManager;
import org.ietf.jgss.GSSCredential;
import org.ietf.jgss.GSSException;
+import org.ietf.jgss.GSSManager;
public class JobSubmissionTaskHandler implements DelegatedTaskHandler,
GramJobListener, JobOutputListener {
@@ -52,8 +55,10 @@
private Vector jobList = null;
private boolean startGassServer = false;
private GassServer gassServer = null;
+ private SecurityContext securityContext;
private JobOutputStream stdoutStream;
private JobOutputStream stderrStream;
+ private GSSCredential credential;
public void submit(Task task) throws IllegalSpecException,
InvalidSecurityContextException, InvalidServiceContactException,
@@ -63,6 +68,8 @@
"JobSubmissionTaskHandler cannot handle two active jobs simultaneously");
}
this.task = task;
+ this.securityContext = getSecurityContext(task);
+ this.credential = (GSSCredential) securityContext.getCredentials();
String rsl;
JobSpecification spec;
try {
@@ -97,10 +104,8 @@
throws IllegalSpecException, InvalidSecurityContextException,
InvalidServiceContactException, TaskSubmissionException {
this.gramJob = new GramJob(rsl);
- GlobusSecurityContextImpl securityContext = getSecurityContext();
try {
- this.gramJob.setCredentials((GSSCredential) securityContext
- .getCredentials());
+ this.gramJob.setCredentials(this.credential);
}
catch (IllegalArgumentException iae) {
throw new InvalidSecurityContextException(
@@ -108,7 +113,7 @@
}
if (!spec.isBatchJob()) {
- CallbackHandlerManager.increaseUsageCount(gramJob.getCredentials());
+ CallbackHandlerManager.increaseUsageCount(this.credential);
this.gramJob.addListener(this);
}
@@ -125,7 +130,7 @@
if (logger.isDebugEnabled()) {
logger.debug("Execution server: " + server);
}
- boolean limitedDeleg = (securityContext.getDelegation() != Delegation.FULL_DELEGATION);
+ boolean limitedDeleg = isLimitedDelegation(this.securityContext);
if (spec.getDelegation() == Delegation.FULL_DELEGATION) {
limitedDeleg = false;
}
@@ -154,6 +159,15 @@
gsse);
}
}
+
+ private boolean isLimitedDelegation(SecurityContext sc) {
+ if (sc instanceof GlobusSecurityContextImpl) {
+ return ((GlobusSecurityContextImpl) securityContext).getDelegation() != Delegation.FULL_DELEGATION;
+ }
+ else {
+ return true;
+ }
+ }
private void submitMultipleJobs(RslNode rslTree, JobSpecification spec)
throws IllegalSpecException, InvalidSecurityContextException,
@@ -192,18 +206,15 @@
job.addListener(listener);
- GlobusSecurityContextImpl securityContext = getSecurityContext();
try {
- job
- .setCredentials((GSSCredential) securityContext
- .getCredentials());
+ job.setCredentials(this.credential);
}
catch (IllegalArgumentException iae) {
throw new InvalidSecurityContextException(
"Cannot set the SecurityContext twice", iae);
}
- boolean limitedDeleg = (securityContext.getDelegation() == GlobusSecurityContextImpl.PARTIAL_DELEGATION);
+ boolean limitedDeleg = isLimitedDelegation(this.securityContext);
try {
job.request(rmc, false, limitedDeleg);
if (logger.isDebugEnabled()) {
@@ -422,8 +433,7 @@
try {
this.gassServer = GassServerFactory
- .getGassServer((GSSCredential) securityContext
- .getCredentials());
+ .getGassServer(this.credential);
this.gassServer.registerDefaultDeactivator();
}
catch (Exception e) {
@@ -479,7 +489,7 @@
private synchronized void cleanup() {
try {
this.gramJob.removeListener(this);
- CallbackHandlerManager.decreaseUsageCount(gramJob.getCredentials());
+ CallbackHandlerManager.decreaseUsageCount(this.credential);
if (gassServer != null) {
GassServerFactory.decreaseUsageCount(gassServer);
}
@@ -503,14 +513,20 @@
public void outputClosed() {
}
- private GlobusSecurityContextImpl getSecurityContext() {
- GlobusSecurityContextImpl securityContext = (GlobusSecurityContextImpl) this.task
- .getService(0).getSecurityContext();
- if (securityContext == null) {
+ private SecurityContext getSecurityContext(Task task) throws InvalidSecurityContextException {
+ SecurityContext sc = task.getService(0).getSecurityContext();
+ if (sc == null) {
// create default credentials
- securityContext = new GlobusSecurityContextImpl();
+ sc = new GlobusSecurityContextImpl();
+ GSSManager manager = ExtendedGSSManager.getInstance();
+ try {
+ sc.setCredentials(manager.createCredential(GSSCredential.INITIATE_AND_ACCEPT));
+ }
+ catch (GSSException e) {
+ throw new InvalidSecurityContextException(e);
+ }
}
- return securityContext;
+ return sc;
}
private String handleJobManager(String server, String jobmanager)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-10-02 21:27:38
|
Revision: 1772
http://cogkit.svn.sourceforge.net/cogkit/?rev=1772&view=rev
Author: hategan
Date: 2007-10-02 14:27:33 -0700 (Tue, 02 Oct 2007)
Log Message:
-----------
better yet, cleanup failures should only cause warnings
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
Modified: trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
===================================================================
--- trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2007-10-02 21:19:53 UTC (rev 1771)
+++ trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2007-10-02 21:27:33 UTC (rev 1772)
@@ -54,7 +54,6 @@
private GassServer gassServer = null;
private JobOutputStream stdoutStream;
private JobOutputStream stderrStream;
- private boolean cleaned;
public void submit(Task task) throws IllegalSpecException,
InvalidSecurityContextException, InvalidServiceContactException,
@@ -478,14 +477,16 @@
}
private synchronized void cleanup() {
- if (!cleaned) {
+ try {
this.gramJob.removeListener(this);
CallbackHandlerManager.decreaseUsageCount(gramJob.getCredentials());
if (gassServer != null) {
GassServerFactory.decreaseUsageCount(gassServer);
}
- cleaned = true;
}
+ catch (Exception e) {
+ logger.warn("Failed to clean up job", e);
+ }
}
public void outputChanged(String s) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-10-02 21:19:57
|
Revision: 1771
http://cogkit.svn.sourceforge.net/cogkit/?rev=1771&view=rev
Author: hategan
Date: 2007-10-02 14:19:53 -0700 (Tue, 02 Oct 2007)
Log Message:
-----------
only cleanup once
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
Modified: trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
===================================================================
--- trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2007-10-02 14:37:27 UTC (rev 1770)
+++ trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java 2007-10-02 21:19:53 UTC (rev 1771)
@@ -54,6 +54,7 @@
private GassServer gassServer = null;
private JobOutputStream stdoutStream;
private JobOutputStream stderrStream;
+ private boolean cleaned;
public void submit(Task task) throws IllegalSpecException,
InvalidSecurityContextException, InvalidServiceContactException,
@@ -280,7 +281,8 @@
boolean batchJob = spec.isBatchJob();
boolean redirected = spec.getStdOutputLocation().overlaps(
FileLocation.MEMORY_AND_LOCAL)
- || spec.getStdErrorLocation().overlaps(FileLocation.MEMORY_AND_LOCAL);
+ || spec.getStdErrorLocation().overlaps(
+ FileLocation.MEMORY_AND_LOCAL);
if (batchJob && redirected) {
throw new IllegalSpecException(
@@ -357,7 +359,8 @@
}
// if output is to be redirected
- if (FileLocation.MEMORY_AND_LOCAL.overlaps(spec.getStdOutputLocation())) {
+ if (FileLocation.MEMORY_AND_LOCAL.overlaps(spec
+ .getStdOutputLocation())) {
Value v;
// if no output file is specified, use the stdout
if (FileLocation.MEMORY.overlaps(spec.getStdOutputLocation())) {
@@ -376,7 +379,8 @@
.getStdOutput()));
}
// if error is to be redirected
- if (FileLocation.MEMORY_AND_LOCAL.overlaps(spec.getStdErrorLocation())) {
+ if (FileLocation.MEMORY_AND_LOCAL.overlaps(spec
+ .getStdErrorLocation())) {
Value v;
// if no error file is specified, use the stdout
if (FileLocation.MEMORY.overlaps(spec.getStdErrorLocation())) {
@@ -473,11 +477,14 @@
}
}
- private void cleanup() {
- this.gramJob.removeListener(this);
- CallbackHandlerManager.decreaseUsageCount(gramJob.getCredentials());
- if (gassServer != null) {
- GassServerFactory.decreaseUsageCount(gassServer);
+ private synchronized void cleanup() {
+ if (!cleaned) {
+ this.gramJob.removeListener(this);
+ CallbackHandlerManager.decreaseUsageCount(gramJob.getCredentials());
+ if (gassServer != null) {
+ GassServerFactory.decreaseUsageCount(gassServer);
+ }
+ cleaned = true;
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-10-02 14:37:29
|
Revision: 1770
http://cogkit.svn.sourceforge.net/cogkit/?rev=1770&view=rev
Author: hategan
Date: 2007-10-02 07:37:27 -0700 (Tue, 02 Oct 2007)
Log Message:
-----------
I wonder how this commit got lost
Modified Paths:
--------------
trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/scheduler/submitQueue/NonBlockingSubmit.java
Modified: trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/scheduler/submitQueue/NonBlockingSubmit.java
===================================================================
--- trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/scheduler/submitQueue/NonBlockingSubmit.java 2007-10-01 19:15:49 UTC (rev 1769)
+++ trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/scheduler/submitQueue/NonBlockingSubmit.java 2007-10-02 14:37:27 UTC (rev 1770)
@@ -64,12 +64,13 @@
else {
if (ex != null) {
Status st = task.getStatus();
- if (st.getStatusCode() != Status.FAILED) {
- logger.warn("Warning: Task handler throws exception but does not set status",
- ex);
- Status ns = new StatusImpl();
- ns.setStatusCode(Status.FAILED);
- ns.setException(ex);
+ if (st.getStatusCode() == Status.FAILED) {
+ logger.warn("Warning: Task handler throws exception and also sets status");
+ }
+ else {
+ Status ns = new StatusImpl();
+ ns.setStatusCode(Status.FAILED);
+ ns.setException(ex);
task.setStatus(ns);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-10-01 19:15:50
|
Revision: 1769
http://cogkit.svn.sourceforge.net/cogkit/?rev=1769&view=rev
Author: hategan
Date: 2007-10-01 12:15:49 -0700 (Mon, 01 Oct 2007)
Log Message:
-----------
added file info
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-webdav/src/org/globus/cog/abstraction/impl/file/http/FileResourceImpl.java
trunk/current/src/cog/modules/provider-webdav/src/org/globus/cog/abstraction/impl/file/webdav/FileResourceImpl.java
Modified: trunk/current/src/cog/modules/provider-webdav/src/org/globus/cog/abstraction/impl/file/http/FileResourceImpl.java
===================================================================
--- trunk/current/src/cog/modules/provider-webdav/src/org/globus/cog/abstraction/impl/file/http/FileResourceImpl.java 2007-10-01 19:14:56 UTC (rev 1768)
+++ trunk/current/src/cog/modules/provider-webdav/src/org/globus/cog/abstraction/impl/file/http/FileResourceImpl.java 2007-10-01 19:15:49 UTC (rev 1769)
@@ -24,6 +24,7 @@
import org.globus.cog.abstraction.impl.common.task.TaskSubmissionException;
import org.globus.cog.abstraction.impl.file.AbstractFileResource;
import org.globus.cog.abstraction.impl.file.FileResourceException;
+import org.globus.cog.abstraction.impl.file.GridFileImpl;
import org.globus.cog.abstraction.impl.file.IllegalHostException;
import org.globus.cog.abstraction.interfaces.ExecutableObject;
import org.globus.cog.abstraction.interfaces.FileResource;
@@ -177,8 +178,32 @@
}
public GridFile getGridFile(String fileName) throws FileResourceException {
- throw new UnsupportedOperationException("getGridFile");
- // return createGridFile(fileName);
+ HeadMethod m = new HeadMethod(contact + '/' + fileName);
+ try {
+ int code = client.executeMethod(m);
+ try {
+ if (code != HttpStatus.SC_OK) {
+ throw new FileResourceException("Failed to get file information about "
+ + fileName + " from " + contact
+ + ". Server returned " + code + " ("
+ + HttpStatus.getStatusText(code) + ").");
+ }
+ GridFile gf = new GridFileImpl();
+ gf.setName(fileName);
+ Header clh = m.getResponseHeader("Content-Length");
+ gf.setSize(Long.parseLong(clh.getValue()));
+ return gf;
+ }
+ finally {
+ m.releaseConnection();
+ }
+ }
+ catch (FileResourceException e) {
+ throw e;
+ }
+ catch (Exception e) {
+ throw new FileResourceException(e);
+ }
}
public boolean exists(String filename) throws FileResourceException {
Modified: trunk/current/src/cog/modules/provider-webdav/src/org/globus/cog/abstraction/impl/file/webdav/FileResourceImpl.java
===================================================================
--- trunk/current/src/cog/modules/provider-webdav/src/org/globus/cog/abstraction/impl/file/webdav/FileResourceImpl.java 2007-10-01 19:14:56 UTC (rev 1768)
+++ trunk/current/src/cog/modules/provider-webdav/src/org/globus/cog/abstraction/impl/file/webdav/FileResourceImpl.java 2007-10-01 19:15:49 UTC (rev 1769)
@@ -69,9 +69,11 @@
HttpURL hrl = new HttpURL(contact);
PasswordAuthentication credentials = (PasswordAuthentication) getSecurityContext()
.getCredentials();
+
String username = credentials.getUserName();
String password = String.valueOf(credentials.getPassword());
hrl.setUserinfo(username, password);
+
davClient = new WebdavResource(hrl);
setStarted(true);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-10-01 19:15:01
|
Revision: 1768
http://cogkit.svn.sourceforge.net/cogkit/?rev=1768&view=rev
Author: hategan
Date: 2007-10-01 12:14:56 -0700 (Mon, 01 Oct 2007)
Log Message:
-----------
added much needed space
Modified Paths:
--------------
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/file/gridftp/FileResourceImpl.java
===================================================================
--- trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/FileResourceImpl.java 2007-10-01 19:14:39 UTC (rev 1767)
+++ trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/FileResourceImpl.java 2007-10-01 19:14:56 UTC (rev 1768)
@@ -141,7 +141,7 @@
catch (Exception e) {
throw translateException(
"Could not get list of files in " + directory
- + "from server", e);
+ + " from server", e);
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-10-01 19:14:41
|
Revision: 1767
http://cogkit.svn.sourceforge.net/cogkit/?rev=1767&view=rev
Author: hategan
Date: 2007-10-01 12:14:39 -0700 (Mon, 01 Oct 2007)
Log Message:
-----------
fixed file info
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/old/FileResourceImpl.java
Modified: trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/old/FileResourceImpl.java
===================================================================
--- trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/old/FileResourceImpl.java 2007-10-01 19:13:58 UTC (rev 1766)
+++ trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/old/FileResourceImpl.java 2007-10-01 19:14:39 UTC (rev 1767)
@@ -47,6 +47,7 @@
import org.globus.ftp.GridFTPClient;
import org.globus.ftp.GridFTPSession;
import org.globus.ftp.MarkerListener;
+import org.globus.ftp.MlsxEntry;
import org.globus.ftp.Session;
import org.globus.ftp.exception.ServerException;
import org.ietf.jgss.GSSCredential;
@@ -473,27 +474,13 @@
/** get remote file information */
public GridFile getGridFile(String fileName) throws FileResourceException {
-
- String directory = null;
- int endIndex = fileName.lastIndexOf("/");
- if (endIndex < 0) {
- directory = getCurrentDirectory();
+ try {
+ MlsxEntry e = gridFTPClient.mlst(fileName);
+ return createGridFile(e);
}
- else {
- directory = fileName.substring(0, endIndex);
- fileName = fileName.substring(endIndex + 1, fileName.length());
+ catch (Exception e) {
+ throw translateException("Failed to retrieve file information about " + fileName, e);
}
-
- Iterator gridFiles = list(directory).iterator();
-
- while (gridFiles.hasNext()) {
- GridFile gridFile = (GridFile) gridFiles.next();
- if (gridFile.getName().equals(fileName)) {
- return gridFile;
- }
- }
-
- return null;
}
/** change permissions to a remote file */
@@ -557,7 +544,35 @@
return gridFile;
}
+
+ private GridFile createGridFile(MlsxEntry e) throws FileResourceException {
+ GridFile gridFile = new GridFileImpl();
+
+ String directory = getCurrentDirectory();
+ if (directory.endsWith("/")) {
+ gridFile.setAbsolutePathName(directory + e.getFileName());
+ }
+ else {
+ gridFile.setAbsolutePathName(directory + "/" + e.getFileName());
+ }
+
+ gridFile.setLastModified(e.get(MlsxEntry.MODIFY));
+
+ String type = e.get(MlsxEntry.TYPE);
+ if (MlsxEntry.TYPE_FILE.equals(type)) {
+ gridFile.setFileType(GridFile.FILE);
+ }
+ if (MlsxEntry.TYPE_DIR.equals(type) || MlsxEntry.TYPE_PDIR.equals(type) || MlsxEntry.TYPE_CDIR.equals(type)) {
+ gridFile.setFileType(GridFile.DIRECTORY);
+ }
+
+ gridFile.setName(e.getFileName());
+ gridFile.setSize(Long.parseLong(e.get(MlsxEntry.SIZE)));
+
+ return gridFile;
+ }
+
protected Permissions getPermissions(boolean r, boolean w, boolean x) {
Permissions perm = new PermissionsImpl();
perm.setRead(r);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-10-01 19:13:59
|
Revision: 1766
http://cogkit.svn.sourceforge.net/cogkit/?rev=1766&view=rev
Author: hategan
Date: 2007-10-01 12:13:58 -0700 (Mon, 01 Oct 2007)
Log Message:
-----------
misspelled type
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-ws/src/org/globus/cog/abstraction/impl/invocation/ws/TaskHandlerImpl.java
Modified: trunk/current/src/cog/modules/provider-ws/src/org/globus/cog/abstraction/impl/invocation/ws/TaskHandlerImpl.java
===================================================================
--- trunk/current/src/cog/modules/provider-ws/src/org/globus/cog/abstraction/impl/invocation/ws/TaskHandlerImpl.java 2007-10-01 19:12:53 UTC (rev 1765)
+++ trunk/current/src/cog/modules/provider-ws/src/org/globus/cog/abstraction/impl/invocation/ws/TaskHandlerImpl.java 2007-10-01 19:13:58 UTC (rev 1766)
@@ -64,7 +64,7 @@
throw new TaskSubmissionException(
"TaskHandler can only handle unsubmitted tasks");
}
- if (task.getType() != Task.WS_INVOCAION) {
+ if (task.getType() != Task.WS_INVOCATION) {
throw new TaskSubmissionException(
getName()
+ " execution task handler can only handle WS invocation tasks");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-10-01 19:12:56
|
Revision: 1765
http://cogkit.svn.sourceforge.net/cogkit/?rev=1765&view=rev
Author: hategan
Date: 2007-10-01 12:12:53 -0700 (Mon, 01 Oct 2007)
Log Message:
-----------
hmm
Modified Paths:
--------------
trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/examples/invocation/ServiceInvocation.java
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/examples/invocation/ServiceInvocation.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/examples/invocation/ServiceInvocation.java 2007-10-01 19:11:34 UTC (rev 1764)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/examples/invocation/ServiceInvocation.java 2007-10-01 19:12:53 UTC (rev 1765)
@@ -57,7 +57,7 @@
/*
* Create a new job submission task with the given task name.
*/
- this.task = new TaskImpl(this.method, Task.WS_INVOCAION);
+ this.task = new TaskImpl(this.method, Task.WS_INVOCATION);
logger.debug("Task Identity: " + this.task.getIdentity().toString());
/*
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 2007-10-01 19:11:34 UTC (rev 1764)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/interfaces/Task.java 2007-10-01 19:12:53 UTC (rev 1765)
@@ -48,7 +48,7 @@
/**
* Represents a WS invocation task
*/
- public static final int WS_INVOCAION = 5;
+ public static final int WS_INVOCATION = 5;
/**
* Sets the type of this <code>Task</code>. Supported task types include:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 1764
http://cogkit.svn.sourceforge.net/cogkit/?rev=1764&view=rev
Author: hategan
Date: 2007-10-01 12:11:34 -0700 (Mon, 01 Oct 2007)
Log Message:
-----------
don't set status if exception is thrown
Modified Paths:
--------------
trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/CachingDelegatedFileOperationHandler.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 2007-10-01 19:10:51 UTC (rev 1763)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/CachingDelegatedFileOperationHandler.java 2007-10-01 19:11:34 UTC (rev 1764)
@@ -32,7 +32,6 @@
TaskSubmissionException {
Service service = task.getService(0);
if (service == null) {
- setTaskStatus(task, Status.FAILED, null, "Service is not set");
throw new IllegalSpecException("Service is not set");
}
FileResource fr = null;
@@ -42,20 +41,17 @@
setTaskStatus(task, Status.COMPLETED, null, null);
}
catch (TaskSubmissionException e) {
- setTaskStatus(task, Status.FAILED, e, e.getMessage());
throw e;
}
catch (IllegalSpecException e) {
- setTaskStatus(task, Status.FAILED, e, e.getMessage());
throw e;
}
catch (IrrecoverableResourceException e) {
FileResourceCache.getDefault().invalidateResource(resource);
- setTaskStatus(task, Status.FAILED, e, e.getMessage());
+ throw new TaskSubmissionException(e);
}
catch (Exception e) {
- setTaskStatus(task, Status.FAILED, e, e.getMessage());
- throw new TaskSubmissionException(e.getMessage(), e);
+ throw new TaskSubmissionException(e);
}
finally {
stopResources();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-10-01 19:10:59
|
Revision: 1763
http://cogkit.svn.sourceforge.net/cogkit/?rev=1763&view=rev
Author: hategan
Date: 2007-10-01 12:10:51 -0700 (Mon, 01 Oct 2007)
Log Message:
-----------
removed unused import
Modified Paths:
--------------
trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/TaskHandlerImpl.java
Modified: trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/TaskHandlerImpl.java
===================================================================
--- trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/TaskHandlerImpl.java 2007-10-01 14:08:23 UTC (rev 1762)
+++ trunk/current/src/cog/modules/abstraction-common/src/org/globus/cog/abstraction/impl/file/TaskHandlerImpl.java 2007-10-01 19:10:51 UTC (rev 1763)
@@ -20,7 +20,6 @@
import org.globus.cog.abstraction.impl.common.IdentityImpl;
import org.globus.cog.abstraction.impl.common.ProviderMethodException;
import org.globus.cog.abstraction.impl.common.StatusEvent;
-import org.globus.cog.abstraction.impl.common.StatusImpl;
import org.globus.cog.abstraction.impl.common.task.ActiveTaskException;
import org.globus.cog.abstraction.impl.common.task.IllegalSpecException;
import org.globus.cog.abstraction.impl.common.task.InvalidProviderException;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 1762
http://cogkit.svn.sourceforge.net/cogkit/?rev=1762&view=rev
Author: hategan
Date: 2007-10-01 07:08:23 -0700 (Mon, 01 Oct 2007)
Log Message:
-----------
spurious warning
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 2007-09-27 16:54:10 UTC (rev 1761)
+++ trunk/current/src/cog/modules/provider-gt4_0_0/src/org/globus/cog/abstraction/impl/execution/gt4_0_0/JobSubmissionTaskHandler.java 2007-10-01 14:08:23 UTC (rev 1762)
@@ -208,7 +208,7 @@
else if (soTimeout instanceof String) {
job.setTimeOut(Integer.parseInt((String) soTimeout));
}
- else {
+ else if (soTimeout != null) {
logger.warn("Unknown value for socketTimeout attribute ("
+ soTimeout + "). Ignoring.");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-09-27 16:54:16
|
Revision: 1761
http://cogkit.svn.sourceforge.net/cogkit/?rev=1761&view=rev
Author: hategan
Date: 2007-09-27 09:54:10 -0700 (Thu, 27 Sep 2007)
Log Message:
-----------
set identity on both scheduled and unscheduled tasks
Modified Paths:
--------------
trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/grid/AbstractGridNode.java
Modified: trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/grid/AbstractGridNode.java
===================================================================
--- trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/grid/AbstractGridNode.java 2007-09-27 00:12:38 UTC (rev 1760)
+++ trunk/current/src/cog/modules/karajan/src/org/globus/cog/karajan/workflow/nodes/grid/AbstractGridNode.java 2007-09-27 16:54:10 UTC (rev 1761)
@@ -187,8 +187,10 @@
}
}
}
+
public void submitUnscheduled(TaskHandler handler, Task task, VariableStack stack)
throws ExecutionException {
+ setTaskIdentity(stack, task);
task.addStatusListener(this);
stack.setVar(HANDLER, handler);
synchronized (tasks) {
@@ -210,14 +212,10 @@
}
}
}
+
public void submitScheduled(Scheduler scheduler, Task task, VariableStack stack,
Object constraints) {
- try {
- task.setIdentity(new IdentityImpl(ThreadingContext.get(stack).toString()));
- }
- catch (VariableNotFoundException e) {
- // such is life
- }
+ setTaskIdentity(stack, task);
if (logger.isDebugEnabled()) {
logger.debug(task);
logger.debug("Submitting task " + task.getIdentity());
@@ -228,6 +226,15 @@
}
scheduler.enqueue(task, constraints);
}
+
+ protected void setTaskIdentity(VariableStack stack, Task task) {
+ try {
+ task.setIdentity(new IdentityImpl(ThreadingContext.get(stack).toString()));
+ }
+ catch (VariableNotFoundException e) {
+ // such is life
+ }
+ }
public void statusChanged(StatusEvent e) {
try {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-09-27 00:12:41
|
Revision: 1760
http://cogkit.svn.sourceforge.net/cogkit/?rev=1760&view=rev
Author: hategan
Date: 2007-09-26 17:12:38 -0700 (Wed, 26 Sep 2007)
Log Message:
-----------
improved more error messages
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/old/FileResourceImpl.java
Modified: trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/old/FileResourceImpl.java
===================================================================
--- trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/old/FileResourceImpl.java 2007-09-27 00:09:15 UTC (rev 1759)
+++ trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/old/FileResourceImpl.java 2007-09-27 00:12:38 UTC (rev 1760)
@@ -269,7 +269,7 @@
gridFTPClient.deleteDir(directory);
}
catch (Exception e) {
- throw translateException("Cannot delete the given directory", e);
+ throw translateException("Cannot delete " + directory, e);
}
}
@@ -291,7 +291,7 @@
gridFTPClient.get(remoteFileName, sink, mListener);
}
catch (Exception e) {
- throw translateException("Cannot retrieve the given file", e);
+ throw translateException("Cannot retrieve " + remoteFileName, e);
}
}
@@ -303,7 +303,8 @@
gridFTPClient.get(remoteFileName, localFile);
}
catch (Exception e) {
- throw translateException("Cannot retrieve the given file", e);
+ throw translateException("Cannot retrieve " + remoteFileName
+ + " to " + localFile, e);
}
}
@@ -381,7 +382,8 @@
gridFTPClient.put(localFile, remoteFileName, append);
}
catch (Exception e) {
- throw translateException("Cannot transfer the given file", e);
+ throw translateException("Cannot transfer " + localFile + " to "
+ + remoteFileName, e);
}
}
@@ -396,7 +398,7 @@
gridFTPClient.put(remoteFileName, source, mListener);
}
catch (Exception e) {
- throw translateException("Cannot transfer the given file", e);
+ throw translateException("Cannot transfer to " + remoteFileName, e);
}
}
@@ -409,7 +411,8 @@
gridFTPClient.rename(remoteFileName1, remoteFileName2);
}
catch (Exception e) {
- throw translateException("Rename for gridftp failed", e);
+ throw translateException("Renaming of " + remoteFileName1 + " to "
+ + remoteFileName2 + " failed", e);
}
}
@@ -423,7 +426,8 @@
gridFTPClient.site(cmd);
}
catch (Exception e) {
- throw translateException("Cannot change the file permissions.", e);
+ throw translateException("Cannot change the file permissions for "
+ + filename, e);
}
}
@@ -535,7 +539,7 @@
if (fi.isDevice()) {
gridFile.setFileType(GridFile.DEVICE);
}
- //Grr. softlink and all the other ones are orthogonal
+ // Grr. softlink and all the other ones are orthogonal
if (fi.isSoftLink()) {
gridFile.setFileType(GridFile.SOFTLINK);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-09-27 00:09:19
|
Revision: 1759
http://cogkit.svn.sourceforge.net/cogkit/?rev=1759&view=rev
Author: hategan
Date: 2007-09-26 17:09:15 -0700 (Wed, 26 Sep 2007)
Log Message:
-----------
be specific about what file cannot be deleted
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/old/FileResourceImpl.java
Modified: trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/old/FileResourceImpl.java
===================================================================
--- trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/old/FileResourceImpl.java 2007-09-26 16:32:29 UTC (rev 1758)
+++ trunk/current/src/cog/modules/provider-gt2/src/org/globus/cog/abstraction/impl/file/gridftp/old/FileResourceImpl.java 2007-09-27 00:09:15 UTC (rev 1759)
@@ -279,7 +279,7 @@
gridFTPClient.deleteFile(file);
}
catch (Exception e) {
- throw translateException("Cannot delete the given file", e);
+ throw translateException("Cannot delete " + file, e);
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ha...@us...> - 2007-09-26 16:32:35
|
Revision: 1758
http://cogkit.svn.sourceforge.net/cogkit/?rev=1758&view=rev
Author: hategan
Date: 2007-09-26 09:32:29 -0700 (Wed, 26 Sep 2007)
Log Message:
-----------
rounding of int args
Modified Paths:
--------------
trunk/current/src/cog/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/cobalt/CobaltExecutor.java
Modified: trunk/current/src/cog/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/cobalt/CobaltExecutor.java
===================================================================
--- trunk/current/src/cog/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/cobalt/CobaltExecutor.java 2007-09-26 16:31:18 UTC (rev 1757)
+++ trunk/current/src/cog/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/cobalt/CobaltExecutor.java 2007-09-26 16:32:29 UTC (rev 1758)
@@ -124,10 +124,21 @@
protected void addAttr(String attrName, String option, List l) {
addAttr(attrName, option, l, null);
}
+
+ protected void addAttr(String attrName, String option, List l, boolean round) {
+ addAttr(attrName, option, l, null, round);
+ }
+
+ protected void addAttr(String attrName, String option, List l, String defval) {
+ addAttr(attrName, option, l, defval, false);
+ }
- protected void addAttr(String attrName, String option, List l, String defval) {
+ protected void addAttr(String attrName, String option, List l, String defval, boolean round) {
Object value = spec.getAttribute(attrName);
if (value != null) {
+ if (round) {
+ value = round(value);
+ }
l.add(option);
l.add(String.valueOf(value));
}
@@ -136,6 +147,15 @@
l.add(defval);
}
}
+
+ protected Object round(Object value) {
+ if (value instanceof Number) {
+ return new Integer(((Number) value).intValue());
+ }
+ else {
+ return value;
+ }
+ }
protected String[] buildCMDLine(String stdout, String stderr) {
List l = new ArrayList();
@@ -158,8 +178,8 @@
}
addAttr("mode", "-m", l);
// We're gonna treat this as the node count
- addAttr("count", "-c", l);
- addAttr("hostCount", "-n", l, "1");
+ addAttr("count", "-c", l, true);
+ addAttr("hostCount", "-n", l, "1", true);
addAttr("project", "-p", l);
addAttr("queue", "-q", l);
addAttr("kernelprofile", "-k", l);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|