[Swift-commit] cog r3656

swift at ci.uchicago.edu swift at ci.uchicago.edu
Wed Apr 24 15:10:10 CDT 2013


------------------------------------------------------------------------
r3656 | davidkelly999 | 2013-04-24 15:08:34 -0500 (Wed, 24 Apr 2013) | 2 lines

Fix to verify rsl attributes

------------------------------------------------------------------------
Index: modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java
===================================================================
--- modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java	(revision 3655)
+++ modules/provider-gt2/src/org/globus/cog/abstraction/impl/execution/gt2/JobSubmissionTaskHandler.java	(working copy)
@@ -11,6 +11,8 @@
 import java.util.Iterator;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.HashSet;
+import java.util.Arrays;
 
 import org.apache.log4j.Logger;
 import org.globus.cog.abstraction.impl.common.AbstractDelegatedTaskHandler;
@@ -376,6 +378,18 @@
 
     private void setOtherAttributes(JobSpecification spec, RslNode rsl)
             throws IllegalSpecException {
+       
+        HashSet<String> RSLAttributes = new HashSet<String>(
+		Arrays.asList("directory", "executable", "arguments", "stdin",
+                              "stdout", "stderr", "count", "environment",
+                              "maxTime", "maxWallTime", "maxCpuTime", "jobType",
+                              "gramMyJob", "queue", "project", "hostCount",
+                              "dryRun", "minMemory", "maxMemory", "save_state",
+                              "two_phase", "restart", "stdout_position",
+                              "stderr_position", "remote_io_url")
+        );
+
+
         for (String key : spec.getAttributeNames()) {
             try {
                 String value = String.valueOf(spec.getAttribute(key));
@@ -385,7 +399,9 @@
                 if (key.equalsIgnoreCase("maxwalltime")) {
                     value = WallTime.normalize(value, jobManager);
                 }
-                rsl.add(new NameOpValue(key, NameOpValue.EQ, value));
+                if(RSLAttributes.contains(key)) {
+                    rsl.add(new NameOpValue(key, NameOpValue.EQ, value));
+                }
             }
             catch (Exception e) {
                 throw new IllegalSpecException(



More information about the Swift-commit mailing list