[Swift-commit] cog r4022

swift at ci.uchicago.edu swift at ci.uchicago.edu
Fri Jul 11 22:50:03 CDT 2014


------------------------------------------------------------------------
r4022 | hategan | 2014-07-11 22:45:10 -0500 (Fri, 11 Jul 2014) | 1 line

avoid passing internal attributes to service
------------------------------------------------------------------------
Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/JobSubmissionTaskHandler.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/JobSubmissionTaskHandler.java	(revision 4021)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/JobSubmissionTaskHandler.java	(working copy)
@@ -40,6 +40,9 @@
 public class JobSubmissionTaskHandler extends AbstractDelegatedTaskHandler implements Callback, ExtendedStatusListener {
     private static Logger logger = Logger.getLogger(JobSubmissionTaskHandler.class);
 
+    private static final String ATTR_CONFIGURING = "#coaster:configuring";
+    private static final String ATTR_CONFIG_ID = "#coaster:configid";
+    
     private static Set<Object> configured, configuring;
     
     private static Map<Service, TaskSubmissionException> checkedServices = 
@@ -53,15 +56,15 @@
     private static String checkConfigured(CoasterChannel channel, Task task) throws InterruptedException {
         Service s = task.getService(0);
         synchronized (s) {
-            while (s.getAttribute("coaster:configuring") != null) {
+            while (s.getAttribute(ATTR_CONFIGURING) != null) {
                 s.wait(100);
             }
-            String configId = (String) s.getAttribute("coaster:configid");
+            String configId = (String) s.getAttribute(ATTR_CONFIG_ID);
             if (configId == null) {
-                s.setAttribute("coaster:configuring", Boolean.TRUE);
+                s.setAttribute(ATTR_CONFIGURING, Boolean.TRUE);
             }
             else {
-                task.setAttribute("coaster:configid", configId);
+                task.setAttribute(ATTR_CONFIG_ID, configId);
             }
             return configId;
         }
@@ -70,8 +73,8 @@
     private static void setConfigured(CoasterChannel channel, Task task, String configId) {
         Service s = task.getService(0);
         synchronized (s) {
-            s.removeAttribute("coaster:configuring");
-            s.setAttribute("coaster:configid", configId);
+            s.removeAttribute(ATTR_CONFIGURING);
+            s.setAttribute(ATTR_CONFIG_ID, configId);
             s.notifyAll();
         }
     }
Index: modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/ServiceConfigurationCommand.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/ServiceConfigurationCommand.java	(revision 4021)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/impl/execution/coaster/ServiceConfigurationCommand.java	(working copy)
@@ -27,6 +27,9 @@
     }
     
     private void add(Service s, String attr) {
+        if (attr.startsWith("#")) {
+            return;
+        }
         Object value = s.getAttribute(attr);
         if (value != null) {
             addOutData(attr + "=" + value.toString());



More information about the Swift-commit mailing list