[Swift-commit] r3209 - trunk/libexec

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Sun Jan 24 17:55:28 CST 2010


Author: hategan
Date: 2010-01-24 17:55:28 -0600 (Sun, 24 Jan 2010)
New Revision: 3209

Modified:
   trunk/libexec/vdl-int-staging.k
Log:
better handling of staging methods

Modified: trunk/libexec/vdl-int-staging.k
===================================================================
--- trunk/libexec/vdl-int-staging.k	2010-01-24 23:54:54 UTC (rev 3208)
+++ trunk/libexec/vdl-int-staging.k	2010-01-24 23:55:28 UTC (rev 3209)
@@ -92,10 +92,10 @@
 			)
 		)
 														
-		element(appStageins, [jobid, files, dir]
+		element(appStageins, [jobid, files, dir, stagingMethod]
 			for(file, files
-				//provider := vdl:provider(file)
-				provider := "coaster"
+				protocol := vdl:provider(file)
+				provider := if(protocol == "file", stagingMethod, protocol)
 				srchost := hostname(file)
 				srcdir := dirname(file)
 				destdir := dircat(dir, reldirname(file))
@@ -108,12 +108,12 @@
 			)
 		)
 		
-		element(appStageouts, [jobid, stageouts, dir]
+		element(appStageouts, [jobid, stageouts, dir, stagingMethod]
 			for(pv, stageouts
 				[path, var] := each(pv)
 				file := vdl:absfilename(vdl:getfield(var, path = path))
-				//provider := vdl:provider(file)
-				provider := "coaster"
+				protocol := vdl:provider(file)
+				provider := if(protocol == "file", stagingMethod, protocol)
 				dhost := vdl:hostname(file)
 				rdir := dircat(dir, reldirname(file))
 				bname := basename(file)
@@ -231,20 +231,17 @@
 							replicationChannel = replicationChannel
 							jobid = jobid
 							
-							/*stageIn("copy://localhost/{swift.home}/libexec/{wrapper}", wrapper)
-							appStageins(jobid, stagein, ".")
-							stageOut("wrapper.log", "copy://localhost/{ddir}/{jobid}.info")
-							stageOut("{stdout}", "copy://localhost/{ddir}/{stdout}")
-							stageOut("{stderr}", "copy://localhost/{ddir}/{stderr}")*/
+							stagingMethod := vdl:siteProfile(rhost, "swift:stagingMethod", default="proxy") 	
 							
-							stageIn("file://localhost/{swift.home}/libexec/{wrapper}", wrapper)
-							appStageins(jobid, stagein, ".")
-							stageOut("wrapper.log", "file://localhost/{ddir}/{jobid}.info")
-							stageOut("{stdout}", "file://localhost/{ddir}/{stdout}")
-							stageOut("{stderr}", "file://localhost/{ddir}/{stderr}")
+							stageIn("{stagingMethod}://localhost/{swift.home}/libexec/{wrapper}", wrapper)
+							appStageins(jobid, stagein, ".", stagingMethod)
 							
-							task:cleanUp("") //the whole job directory
-							appStageouts(jobid, stageout, ".")
+							stageOut("wrapper.log", "{stagingMethod}://localhost/{ddir}/{jobid}.info")
+							stageOut("{stdout}", "{stagingMethod}://localhost/{ddir}/{stdout}")
+							stageOut("{stderr}", "{stagingMethod}://localhost/{ddir}/{stderr}")
+							appStageouts(jobid, stageout, ".", stagingMethod)
+							
+							task:cleanUp(".") //the whole job directory
 						)
 						doRestartlog(restartout)
 						log(LOG:DEBUG, "JOB_END jobid={jobid}")




More information about the Swift-commit mailing list