[Swift-commit] r2091 - trunk/src/org/griphyn/vdl/karajan/lib
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Mon Jul 7 11:55:08 CDT 2008
Author: benc
Date: 2008-07-07 11:55:08 -0500 (Mon, 07 Jul 2008)
New Revision: 2091
Modified:
trunk/src/org/griphyn/vdl/karajan/lib/IsLogged.java
trunk/src/org/griphyn/vdl/karajan/lib/LogVar.java
trunk/src/org/griphyn/vdl/karajan/lib/New.java
Log:
restarts based on variable name rather than filename
Modified: trunk/src/org/griphyn/vdl/karajan/lib/IsLogged.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/IsLogged.java 2008-07-07 16:17:57 UTC (rev 2090)
+++ trunk/src/org/griphyn/vdl/karajan/lib/IsLogged.java 2008-07-07 16:55:08 UTC (rev 2091)
@@ -3,6 +3,7 @@
*/
package org.griphyn.vdl.karajan.lib;
+import java.util.List;
import java.util.Map;
import org.globus.cog.karajan.arguments.Arg;
@@ -10,7 +11,6 @@
import org.globus.cog.karajan.util.TypeUtil;
import org.globus.cog.karajan.workflow.ExecutionException;
import org.globus.cog.karajan.workflow.nodes.restartLog.LogEntry;
-import org.globus.cog.karajan.workflow.nodes.restartLog.MutableInteger;
import org.griphyn.vdl.mapping.DSHandle;
import org.griphyn.vdl.mapping.Path;
@@ -30,13 +30,12 @@
path = Path.parse(TypeUtil.toString(p));
}
path = var.getPathFromRoot().append(path);
- String file = var.getMapper().map(path).toString();
- LogEntry entry = LogEntry.build(file);
+ LogEntry entry = LogEntry.build(var.getRoot().getParam("swift#restartid") + "." + path.stringForm());
Map map = getLogData(stack);
boolean found = false;
synchronized (map) {
- MutableInteger count = (MutableInteger) map.get(entry);
- if (count != null && count.getValue() > 0) {
+ List files = (List) map.get(entry);
+ if (files != null && !files.isEmpty()) {
found = true;
}
}
Modified: trunk/src/org/griphyn/vdl/karajan/lib/LogVar.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/LogVar.java 2008-07-07 16:17:57 UTC (rev 2090)
+++ trunk/src/org/griphyn/vdl/karajan/lib/LogVar.java 2008-07-07 16:55:08 UTC (rev 2091)
@@ -31,7 +31,14 @@
path = Path.parse(TypeUtil.toString(p));
}
path = var.getPathFromRoot().append(path);
- RestartLog.LOG_CHANNEL.ret(stack, var.getMapper().map(path).toString());
+ String annotation;
+ if(var.getMapper() != null) {
+ annotation = "" + var.getMapper().map(path);
+ } else {
+ annotation = "unmapped";
+ }
+ RestartLog.LOG_CHANNEL.ret(stack, var.getRoot().getParam("swift#restartid")
+ + "." + path.stringForm() + "!" + annotation);
return null;
}
}
Modified: trunk/src/org/griphyn/vdl/karajan/lib/New.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/New.java 2008-07-07 16:17:57 UTC (rev 2090)
+++ trunk/src/org/griphyn/vdl/karajan/lib/New.java 2008-07-07 16:55:08 UTC (rev 2091)
@@ -52,6 +52,8 @@
mapping.put("dbgname", dbgname);
}
+ mapping.put("swift#restartid", getThreadPrefix(stack) + ":" + dbgname);
+
if(waitfor != null) {
mapping.put("waitfor", waitfor);
}
More information about the Swift-commit
mailing list