[Swift-devel] localscheduler condor fix
Ben Clifford
benc at hawaga.org.uk
Tue Apr 14 10:19:06 CDT 2009
The localscheduler condor code as of cog r2382 does not behave in such a
way that I can use it to run Swift jobs to a local condor pool on
gwynn.bsd.uchicago.edu.
The attached patch is sufficient (but not all necessary) to make it submit
basic Swift jobs (Swift quoting tests fail, but quoting tests fail for
GRAM2+jobmanager-condor so I'm not overly concerned)
I would like to commit this, but here's a chance to object.
--
-------------- next part --------------
diff --git a/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/condor/CondorExecutor.java b/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/condor/CondorExecutor.java
index eeb1380..1921615 100644
--- a/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/condor/CondorExecutor.java
+++ b/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/condor/CondorExecutor.java
@@ -91,7 +91,7 @@ public class CondorExecutor extends AbstractExecutor {
}
wr.write('\n');
wr.write("notification = Never\n");
- wr.write("+LeaveJobInQueue = TRUE\n");
+ wr.write("leave_in_queue = TRUE\n");
wr.write("queue\n");
wr.close();
}
@@ -103,15 +103,15 @@ public class CondorExecutor extends AbstractExecutor {
TRIGGERS[' '] = true;
TRIGGERS['\n'] = true;
TRIGGERS['\t'] = true;
- TRIGGERS['|'] = true;
TRIGGERS['\\'] = true;
TRIGGERS['>'] = true;
TRIGGERS['<'] = true;
+ TRIGGERS['"'] = true;
}
protected String quote(String s) {
if ("".equals(s)) {
- return "\"\"";
+ return "";
}
boolean quotes = false;
for (int i = 0; i < s.length(); i++) {
@@ -126,6 +126,7 @@ public class CondorExecutor extends AbstractExecutor {
}
StringBuffer sb = new StringBuffer();
if (quotes) {
+ sb.append('\\');
sb.append('"');
}
for (int i = 0; i < s.length(); i++) {
@@ -136,6 +137,7 @@ public class CondorExecutor extends AbstractExecutor {
sb.append(c);
}
if (quotes) {
+ sb.append('\\');
sb.append('"');
}
return sb.toString();
@@ -198,7 +200,7 @@ public class CondorExecutor extends AbstractExecutor {
FileLocation stdErrorLocation, String exitcode,
AbstractExecutor executor) {
return new Job(jobid, stdout, stdOutputLocation, stderr,
- stdErrorLocation, exitcode, executor);
+ stdErrorLocation, null, executor);
}
private static QueuePoller poller;
diff --git a/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/condor/QueuePoller.java b/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/condor/QueuePoller.java
index a94dfa7..2d653c3 100644
--- a/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/condor/QueuePoller.java
+++ b/modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/condor/QueuePoller.java
@@ -39,7 +39,7 @@ public class QueuePoller extends AbstractQueuePoller {
protected void processStdout(InputStream is) throws IOException {
if (logger.isDebugEnabled()) {
- logger.debug("Processing qstat stdout");
+ logger.debug("Processing condor_q stdout");
}
BufferedReader br = new BufferedReader(new InputStreamReader(is));
String line;
More information about the Swift-devel
mailing list