[Swift-commit] cog r3547

swift at ci.uchicago.edu swift at ci.uchicago.edu
Fri Jan 11 13:20:05 CST 2013


------------------------------------------------------------------------
r3547 | davidkelly999 | 2013-01-11 13:16:59 -0600 (Fri, 11 Jan 2013) | 2 lines

Regenerate squeue command at every poll (fix for the stampede multijob problem)

------------------------------------------------------------------------
Index: modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/slurm/QueuePoller.java
===================================================================
--- modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/slurm/QueuePoller.java	(revision 3546)
+++ modules/provider-localscheduler/src/org/globus/cog/abstraction/impl/scheduler/slurm/QueuePoller.java	(working copy)
@@ -30,26 +30,24 @@
 	private static String[] CMDARRAY;
 
 	protected synchronized String[] getCMDArray() {
-		if(CMDARRAY == null) {
-			if (getJobs().size() <= FULL_LIST_THRESHOLD) {
-				CMDARRAY = new String[4];
-				CMDARRAY[0] = getProperties().getPollCommand();
-				CMDARRAY[1] = "--noheader";
-				CMDARRAY[2] = "--jobs";
-				boolean first=true;
-				for (Job j : getJobs().values()) {
-					if(first) {
-						CMDARRAY[3] = j.getJobID();
-						first=false;
-					} else { 
-						CMDARRAY[3] += "," + j.getJobID();
-					}
+		if (getJobs().size() <= FULL_LIST_THRESHOLD) {
+			CMDARRAY = new String[4];
+			CMDARRAY[0] = getProperties().getPollCommand();
+			CMDARRAY[1] = "--noheader";
+			CMDARRAY[2] = "--jobs";
+			boolean first = true;
+			for (Job j : getJobs().values()) {
+				if (first) {
+					CMDARRAY[3] = j.getJobID();
+					first = false;
+				} else {
+					CMDARRAY[3] += "," + j.getJobID();
 				}
-			} else {
-				CMDARRAY = new String[] { getProperties().getPollCommand(), "--noheader" };
-			}			
+			}
+		} else {
+			CMDARRAY = new String[] { getProperties().getPollCommand(),
+					"--noheader" };
 		}
-		
 		return CMDARRAY;
 	}
 



More information about the Swift-commit mailing list