[Swift-commit] cog r3531

swift at ci.uchicago.edu swift at ci.uchicago.edu
Sun Dec 30 21:20:06 CST 2012


------------------------------------------------------------------------
r3531 | hategan | 2012-12-30 21:17:41 -0600 (Sun, 30 Dec 2012) | 1 line

added flag to disable idle block cleanup
------------------------------------------------------------------------
Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/BlockQueueProcessor.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/BlockQueueProcessor.java	(revision 3530)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/BlockQueueProcessor.java	(working copy)
@@ -361,6 +361,12 @@
      *
      */
     protected void removeIdleBlocks() {
+    
+    	if (settings.getDisableIdleBlockCleanup()) {
+    		System.out.println("Idle block cleanup disabled");
+    		return;
+    	}
+    
         ArrayList<Block> sorted;
 
         synchronized (blocks) {
Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Settings.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Settings.java	(revision 3530)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Settings.java	(working copy)
@@ -50,7 +50,7 @@
                        "ppn", "ldLibraryPath", "workerCopies",
                        "directory", "useHashBang",
                        "providerAttributes", "parallelism", "pe",
-                       "coresPerNode"};
+                       "coresPerNode", "disableIdleBlockCleanup" };
 
     /**
      * The maximum number of blocks that can be active at one time
@@ -156,6 +156,8 @@
      * A pass-through setting for SGE, parallel environment
     */
     private String pe;
+    
+    private boolean disableIdleBlockCleanup = false;
 
     public Settings() {
         hook = new Hook();
@@ -564,6 +566,14 @@
     public void setUseHashBang(String uhb) {
         this.useHashBang = uhb;
     }
+    
+    public void setDisableIdleBlockCleanup(boolean disableIdleBlockCleanup) {
+    	this.disableIdleBlockCleanup = disableIdleBlockCleanup;
+    }
+    
+    public boolean getDisableIdleBlockCleanup() {
+    	return disableIdleBlockCleanup;
+    }
 
     public void set(String name, String value)
         throws IllegalArgumentException {



More information about the Swift-commit mailing list