[Swift-commit] r2542 - provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Sun Feb 15 16:48:02 CST 2009


Author: benc
Date: 2009-02-15 16:47:59 -0600 (Sun, 15 Feb 2009)
New Revision: 2542

Modified:
   provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky/JobSubmissionTaskHandler.java
Log:
Sort out whitespace in provider-wonky

Modified: provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky/JobSubmissionTaskHandler.java
===================================================================
--- provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky/JobSubmissionTaskHandler.java	2009-02-14 14:17:28 UTC (rev 2541)
+++ provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky/JobSubmissionTaskHandler.java	2009-02-15 22:47:59 UTC (rev 2542)
@@ -41,21 +41,21 @@
 
 public class JobSubmissionTaskHandler extends AbstractDelegatedTaskHandler implements 
         Runnable {
-    private static Logger logger = Logger
-            .getLogger(JobSubmissionTaskHandler.class);
+    private static Logger logger = Logger.getLogger(JobSubmissionTaskHandler.class);
 
-static Random r = new Random();
+    static Random r = new Random();
 
-static List firstJobList = Collections.synchronizedList(new ArrayList());
-static Map siteStates = Collections.synchronizedMap(new HashMap());
+    static List firstJobList = Collections.synchronizedList(new ArrayList());
+    static Map siteStates = Collections.synchronizedMap(new HashMap());
 
-static int globalJobNumber = 0;
-int jobNumber = globalJobNumber++; // racy?
+    static int globalJobNumber = 0;
+    int jobNumber = globalJobNumber++; // racy?
 
-List siteOptions;
+    List siteOptions;
 
-String siteName;
+    String siteName;
 
+
     public static final int BUFFER_SIZE = 1024;
 
     private Thread thread = null;
@@ -75,11 +75,9 @@
 
         logger.debug("Contact is: "+server);
         String[] splitServer = server.split("/");
-    siteName = splitServer[0];
+        siteName = splitServer[0];
         siteOptions = Arrays.asList(splitServer);
 
-
-
         if(!failDelay("submitting")) {
             task.setStatus(Status.FAILED);
             return;
@@ -166,34 +164,34 @@
             if (spec.getDirectory() != null) {
                 dir = new File(spec.getDirectory());
             }
-        logger.info("Wonky job in queue, job number "+jobNumber);
-        String[] cmdarray = buildCmdArray(spec, jobNumber);
-        try {
-            logger.info("wonky site is "+siteName);
-            if(siteOptions.contains("firstfast") && !firstJobList.contains(siteName)) {
-                logger.info("not sleeping - this is the first job on site "+siteName+", "+jobNumber);
-                firstJobList.add(siteName);
-            } else {
-                double qmean=0;
-                double qstddev=0;
+            logger.info("Wonky job in queue, job number "+jobNumber);
+            String[] cmdarray = buildCmdArray(spec, jobNumber);
+            try {
+                logger.info("wonky site is "+siteName);
+                if(siteOptions.contains("firstfast") && !firstJobList.contains(siteName)) {
+                    logger.info("not sleeping - this is the first job on site "+siteName+", "+jobNumber);
+                    firstJobList.add(siteName);
+                } else {
+                    double qmean=0;
+                    double qstddev=0;
 
-                Iterator it = siteOptions.iterator();
-                while(it.hasNext()) {
-                    String op = (String) it.next();
-                    logger.debug("Checking: "+op);
-                    if(op.startsWith("qmean=")) {
-                        qmean = Double.parseDouble(op.substring(6));
-                        logger.debug("qmean = "+qmean);
-                    } else if(op.startsWith("qstddev=")) {
-                        qstddev = Double.parseDouble(op.substring(8));
-                        logger.debug("qstddev = "+qstddev);
+                    Iterator it = siteOptions.iterator();
+                    while(it.hasNext()) {
+                        String op = (String) it.next();
+                        logger.debug("Checking: "+op);
+                        if(op.startsWith("qmean=")) {
+                            qmean = Double.parseDouble(op.substring(6));
+                            logger.debug("qmean = "+qmean);
+                        } else if(op.startsWith("qstddev=")) {
+                            qstddev = Double.parseDouble(op.substring(8));
+                            logger.debug("qstddev = "+qstddev);
+                        }
                     }
-                }
 
-                double qdelay = qmean + qstddev * r.nextGaussian();
+                    double qdelay = qmean + qstddev * r.nextGaussian();
 
-                Thread.sleep((long)(qdelay*1000));
-            }
+                    Thread.sleep((long)(qdelay*1000));
+                }
             } catch(InterruptedException ie) {
                 logger.warn("fake queue delay interrupted for job "+jobNumber);
             }




More information about the Swift-commit mailing list