[Swift-commit] r3473 - trunk/libexec
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Fri Jul 23 23:42:31 CDT 2010
Author: hategan
Date: 2010-07-23 23:42:31 -0500 (Fri, 23 Jul 2010)
New Revision: 3473
Modified:
trunk/libexec/vdl-int-staging.k
trunk/libexec/vdl-int.k
Log:
use the java definitions; string expansion is faster than concat()
Modified: trunk/libexec/vdl-int-staging.k
===================================================================
--- trunk/libexec/vdl-int-staging.k 2010-07-24 04:38:17 UTC (rev 3472)
+++ trunk/libexec/vdl-int-staging.k 2010-07-24 04:42:31 UTC (rev 3473)
@@ -13,35 +13,6 @@
namespace("vdl"
export(
- element(isDone, [stageout]
- sys:and(
- for(pv, stageout
- [path, var] := each(pv)
- vdl:isLogged(var, path)
- )
- sys:not(isEmpty(stageout))
- )
- )
-
- element(mark, [restarts, err, optional(mapping)]
- if(
- err for(pv, restarts
- [path, var] := each(pv)
- vdl:setFutureFault(var, path=path, mapping=mapping)
- )
- )
- )
-
- element(flatten, [...]
- if (
- isEmpty(...) ""
-
- concat(
- for(i, butLast(...), if(isList(i) flatten(i) i), "|") last(...)
- )
- )
- )
-
element(initDDir, []
ddir := "{VDL:SCRIPTNAME}-{VDL:RUNID}.d"
once(ddir
@@ -52,37 +23,10 @@
ddir
)
- element(inFileDirs, [stageins]
- for(file, stageins
- reldirname(file)
- )
- )
-
- element(outFileDirs, [stageouts]
- for(pv, stageouts
- [path, var] := each(pv)
-
- file := vdl:filename(vdl:getfield(var, path = path))
-
- vdl:dirname(file)
- )
- )
-
element(inFiles, [stageins]
pathnames(stageins)
)
-
- element(outFiles, [stageouts]
- for(pv, stageouts
- [path, var] := each(pv)
-
- file := vdl:filename(vdl:getfield(var, path = path))
-
- file
- )
- )
-
element(fileDirs, [stageins, stageouts]
list(
unique(
@@ -91,13 +35,6 @@
)
)
)
-
- element(doRestartlog, [restartouts]
- uParallelFor(f, restartouts,
- [path, var] := each(f)
- vdl:logvar(var, path)
- )
- )
element(graphStuff, [tr, stagein, stageout, err, optional(args)]
if(
@@ -150,7 +87,7 @@
uid := uid()
jobdir := substring(uid, from=0, to=1)
- jobid := concat(tr, "-", uid)
+ jobid := "{tr}-{uid}"
fileDirs := fileDirs(stagein, stageout)
@@ -164,7 +101,7 @@
vdl:setprogress("Stage in")
wfdir := "{VDL:SCRIPTNAME}-{VDL:RUNID}"
- tmpdir := dircat(concat(wfdir, "/jobs/", jobdir), jobid)
+ tmpdir := dircat("{wfdir}/jobs/{jobdir}", jobid)
try(
sequential(
Modified: trunk/libexec/vdl-int.k
===================================================================
--- trunk/libexec/vdl-int.k 2010-07-24 04:38:17 UTC (rev 3472)
+++ trunk/libexec/vdl-int.k 2010-07-24 04:42:31 UTC (rev 3473)
@@ -15,7 +15,7 @@
export(
element(rmdir, [dir, host]
parallelFor(entry, file:list(dir, host=host)
- epath := concat(dir, "/", entry)
+ epath := "{dir}/{entry}"
if(
file:isDirectory(epath, host=host) rmdir(epath, host)
file:remove(epath, host=host)
@@ -30,35 +30,7 @@
dir:make(dc, host=host)
)
-
- element(isDone, [stageout]
- sys:and(
- for(pv, stageout
- [path, var] := each(pv)
- vdl:isLogged(var, path)
- )
- sys:not(isEmpty(stageout))
- )
- )
-
- element(mark, [restarts, err, optional(mapping)]
- if(
- err for(pv, restarts
- [path, var] := each(pv)
- vdl:setFutureFault(var, path=path, mapping=mapping)
- )
- )
- )
- element(flatten, [...]
- if (
- isEmpty(...) ""
-
- concat(
- for(i, butLast(...), if(isList(i) flatten(i) i), "|") last(...)
- )
- )
- )
element(checkJobStatus, [rhost, wfdir, jobid, tr, jobdir]
log(LOG:DEBUG, "START jobid={jobid}")
@@ -135,37 +107,11 @@
)
ddir
)
-
- element(inFileDirs, [stageins]
- for(file, stageins
- reldirname(file)
- )
- )
-
- element(outFileDirs, [stageouts]
- for(pv, stageouts
- [path, var] := each(pv)
-
- file := vdl:filename(vdl:getfield(var, path = path))
- vdl:dirname(file)
- )
- )
-
element(inFiles, [stageins]
pathnames(stageins)
)
-
- element(outFiles, [stageouts]
- for(pv, stageouts
- [path, var] := each(pv)
-
- file := vdl:filename(vdl:getfield(var, path = path))
- file
- )
- )
-
element(fileDirs, [stageins, stageouts]
list(
unique(
@@ -361,13 +307,6 @@
)
log(LOG:INFO, "END jobid={jobid} - Staging out finished")
)
-
- element(doRestartlog, [restartouts]
- uParallelFor(f, restartouts,
- [path, var] := each(f)
- vdl:logvar(var, path)
- )
- )
element(graphStuff, [tr, stagein, stageout, err, optional(args)]
if(
@@ -428,7 +367,7 @@
element(transferKickstartRec, [rhost, wfdir, jobid, jobdir]
recfile := "{jobid}-kickstart.xml"
- srcdir := dircat(concat(wfdir, "/kickstart/"), jobdir)
+ srcdir := dircat("{wfdir}/kickstart/", jobdir)
try(
task:transfer(srchost=rhost, srcdir=srcdir, srcfile=recfile, destdir="{VDL:SCRIPTNAME}-{VDL:RUNID}.d/")
(
@@ -441,7 +380,7 @@
element(transferWrapperLog, [rhost, wfdir, jobid, jobdir]
recfile := "{jobid}-info"
- srcdir := dircat(concat(wfdir, "/info/"), jobdir)
+ srcdir := dircat("{wfdir}/info/", jobdir)
try(
task:transfer(srchost=rhost, srcdir=srcdir, srcfile=recfile, destdir="{VDL:SCRIPTNAME}-{VDL:RUNID}.d/")
(
@@ -467,7 +406,7 @@
uid := uid()
jobdir := substring(uid, from=0, to=1)
- jobid := concat(tr, "-", uid)
+ jobid := "{tr}-{uid}"
log(LOG:DEBUG, "THREAD_ASSOCIATION jobid={jobid} thread={#thread} host={rhost} replicationGroup={replicationGroup}")
@@ -503,7 +442,7 @@
)
vdl:setprogress("Stage in")
- tmpdir := dircat(concat(wfdir, "/jobs/", jobdir), jobid)
+ tmpdir := dircat("{wfdir}/jobs/{jobdir}", jobid)
More information about the Swift-commit
mailing list