[Swift-commit] r2596 - trunk/src/org/griphyn/vdl/util
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Tue Feb 24 06:45:14 CST 2009
Author: benc
Date: 2009-02-24 06:45:13 -0600 (Tue, 24 Feb 2009)
New Revision: 2596
Modified:
trunk/src/org/griphyn/vdl/util/VDL2Config.java
Log:
Host parameter for getConfig, to facilitate more per-host configuration
options.
Modified: trunk/src/org/griphyn/vdl/util/VDL2Config.java
===================================================================
--- trunk/src/org/griphyn/vdl/util/VDL2Config.java 2009-02-23 15:10:12 UTC (rev 2595)
+++ trunk/src/org/griphyn/vdl/util/VDL2Config.java 2009-02-24 12:45:13 UTC (rev 2596)
@@ -11,9 +11,15 @@
import java.util.List;
import java.util.Properties;
+import org.apache.log4j.Logger;
+
+import org.globus.cog.karajan.util.BoundContact;
import org.globus.common.CoGProperties;
public class VDL2Config extends Properties {
+
+ public static final Logger logger = Logger.getLogger(VDL2Config.class);
+
public static final String CONFIG_FILE_NAME = "swift.properties";
public static final String[] CONFIG_FILE_SEARCH_PATH = new String[] {
System.getProperty("vds.home") + File.separator + "etc" + File.separator
@@ -82,6 +88,7 @@
put("replication.min.queue.time", "60");
put("replication.limit", "3");
put("status.mode", "files");
+ put("wrapper.invocation.mode", "absolute");
}
private VDL2Config(VDL2Config other) {
@@ -205,4 +212,21 @@
return conf;
}
+ public String getProperty(String name, BoundContact bc) {
+System.err.println("getProperty "+name+" with bc="+bc);
+ if(bc!=null) {
+ if(logger.isDebugEnabled()) {
+ logger.debug("Checking BoundContact "+bc+" for property "+name);
+ }
+ String prop = (String) bc.getProperty(name);
+ if(prop != null) {
+ return prop;
+ }
+ }
+ if(logger.isDebugEnabled()) {
+ logger.debug("Getting property "+name+" from global configuration");
+ }
+ return getProperty(name);
+ }
+
}
More information about the Swift-commit
mailing list