[Swift-commit] r2183 - in trunk: libexec src/org/griphyn/vdl/karajan/lib

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Fri Aug 8 03:25:43 CDT 2008


Author: benc
Date: 2008-08-08 03:25:42 -0500 (Fri, 08 Aug 2008)
New Revision: 2183

Modified:
   trunk/libexec/vdl-int.k
   trunk/src/org/griphyn/vdl/karajan/lib/Execute.java
   trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java
Log:
more states for the progress ticker

Modified: trunk/libexec/vdl-int.k
===================================================================
--- trunk/libexec/vdl-int.k	2008-08-07 19:33:29 UTC (rev 2182)
+++ trunk/libexec/vdl-int.k	2008-08-08 08:25:42 UTC (rev 2183)
@@ -391,7 +391,7 @@
 
 						log(LOG:DEBUG, "JOB_START jobid={jobid} tr={tr}", maybe(" arguments=", arguments), " tmpdir={tmpdir} host={rhost}")
 				
-						vdl:setprogress("Executing")
+						vdl:setprogress("Submitting")
 						vdl:execute("/bin/bash",
 							list("shared/wrapper.sh", jobid,
 								"-jobdir", jobdir,

Modified: trunk/src/org/griphyn/vdl/karajan/lib/Execute.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/Execute.java	2008-08-07 19:33:29 UTC (rev 2182)
+++ trunk/src/org/griphyn/vdl/karajan/lib/Execute.java	2008-08-08 08:25:42 UTC (rev 2183)
@@ -81,13 +81,16 @@
 			if (stack != null) {
 				int c = e.getStatus().getStatusCode();
 				if (c == Status.SUBMITTED) {
+					RuntimeStats.setProgress(stack, "Submitted");
 					getReplicationManager(stack).submitted(task, e.getStatus().getTime());
 				}
 				else if (c == Status.ACTIVE) {
+					RuntimeStats.setProgress(stack, "Active");
 					getReplicationManager(stack).active(task, e.getStatus().getTime());
 					((FutureVariableArguments) A_REPLICATION_CHANNEL.getValue(stack)).close();
 				}
 				else if (c == ReplicationManager.STATUS_NEEDS_REPLICATION) {
+					RuntimeStats.setProgress(stack, "Replicating");
 					((FutureVariableArguments) A_REPLICATION_CHANNEL.getValue(stack)).append(Boolean.TRUE);
 				}
 			}

Modified: trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java	2008-08-07 19:33:29 UTC (rev 2182)
+++ trunk/src/org/griphyn/vdl/karajan/lib/RuntimeStats.java	2008-08-08 08:25:42 UTC (rev 2183)
@@ -25,9 +25,12 @@
 		"Initializing",
 		"Selecting site",
 		"Stage in",
-		"Executing",
+		"Submitting",
+		"Submitted",
+		"Active",
 		"Stage out",
 		"Failed",
+		"Replicating",
 		"Finished successfully"
 	};
 
@@ -48,11 +51,15 @@
 
 
 	public Object vdl_setprogress(VariableStack stack) throws ExecutionException {
+		setProgress(stack, TypeUtil.toString(PA_STATE.getValue(stack)));
+		return null;
+	}
+
+	static public void setProgress(VariableStack stack, String newState) throws ExecutionException {
 		RuntimeProgress rp = (RuntimeProgress)stack.getVar("#swift-runtime-progress");
-		rp.status = TypeUtil.toString(PA_STATE.getValue(stack));
+		rp.status = newState;
 		ProgressTicker p = (ProgressTicker)stack.getVar("#swift-runtime-progress-ticker");
 		p.dumpState();
-		return null;
 	}
 
 	public Object vdl_initprogressstate(VariableStack stack) throws ExecutionException {




More information about the Swift-commit mailing list