[Swift-commit] r3571 - trunk/src/org/griphyn/vdl/karajan/lib
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Fri Aug 27 13:42:41 CDT 2010
Author: wozniak
Date: 2010-08-27 13:42:41 -0500 (Fri, 27 Aug 2010)
New Revision: 3571
Modified:
trunk/src/org/griphyn/vdl/karajan/lib/AppStageins.java
Log:
Skip stagein in provider staging for CDM files
Modified: trunk/src/org/griphyn/vdl/karajan/lib/AppStageins.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/AppStageins.java 2010-08-27 18:42:11 UTC (rev 3570)
+++ trunk/src/org/griphyn/vdl/karajan/lib/AppStageins.java 2010-08-27 18:42:41 UTC (rev 3571)
@@ -6,16 +6,21 @@
import java.util.LinkedList;
import java.util.List;
+import org.apache.log4j.Logger;
import org.globus.cog.karajan.arguments.Arg;
import org.globus.cog.karajan.arguments.ArgUtil;
import org.globus.cog.karajan.stack.VariableStack;
import org.globus.cog.karajan.util.TypeUtil;
import org.globus.cog.karajan.workflow.ExecutionException;
import org.globus.cog.karajan.workflow.nodes.AbstractSequentialWithArguments;
+import org.globus.swift.data.Director;
+import org.globus.swift.data.policy.Policy;
import org.griphyn.vdl.mapping.AbsFile;
public class AppStageins extends AbstractSequentialWithArguments {
+ static Logger logger = Logger.getLogger(AppStageins.class);
+
public static final Arg JOBID = new Arg.Positional("jobid");
public static final Arg FILES = new Arg.Positional("files");
public static final Arg DIR = new Arg.Positional("dir");
@@ -31,16 +36,24 @@
List files = TypeUtil.toList(FILES.getValue(stack));
for (Object f : files) {
AbsFile file = new AbsFile(TypeUtil.toString(f));
+ Policy policy = Director.lookup(file.toString());
+ if (policy != Policy.DEFAULT) {
+ logger.debug("will not stage in (CDM): " + file);
+ continue;
+ }
+
String protocol = file.getProtocol();
if (protocol.equals("file")) {
protocol = TypeUtil.toString(STAGING_METHOD.getValue(stack));
}
- String path = file.getDir().equals("") ? file.getName() : file.getDir()
+ String path = file.getDir().equals("") ? file.getName() : file
+ .getDir()
+ "/" + file.getName();
String relpath = path.startsWith("/") ? path.substring(1) : path;
+ logger.debug("will stage in: " + relpath + " via: " + protocol);
ArgUtil.getChannelReturn(stack, STAGEIN).append(
- makeList(protocol + "://" + file.getHost() + "/" + path, TypeUtil.toString(DIR.getValue(stack))
- + "/" + relpath));
+ makeList(protocol + "://" + file.getHost() + "/" + path,
+ TypeUtil.toString(DIR.getValue(stack)) + "/" + relpath));
}
super.post(stack);
}
More information about the Swift-commit
mailing list