[Swift-commit] r5677 - in trunk: bin src/org/griphyn/vdl/karajan/lib/swiftscript

davidk at ci.uchicago.edu davidk at ci.uchicago.edu
Sat Feb 25 03:06:15 CST 2012


Author: davidk
Date: 2012-02-25 03:06:14 -0600 (Sat, 25 Feb 2012)
New Revision: 5677

Modified:
   trunk/bin/start-coaster-service
   trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java
Log:
@toint, @tostring, and @tofloat were giving deprecated warnings, but their alternatives, @toInt, @toString, and @toFloat weren't defined.
They should all be working now

start-coaster-service now forwards agents when starting workers through a relay-host


Modified: trunk/bin/start-coaster-service
===================================================================
--- trunk/bin/start-coaster-service	2012-02-24 20:09:31 UTC (rev 5676)
+++ trunk/bin/start-coaster-service	2012-02-25 09:06:14 UTC (rev 5677)
@@ -213,7 +213,7 @@
    fi
 
    if [ -n "$WORKER_RELAY_HOST" ]; then
-      scp $SWIFT_BIN/$WORKER $WORKER_USERNAME@$WORKER_RELAY_HOST:/tmp > /dev/null 2>&1
+      scp -A $SWIFT_BIN/$WORKER $WORKER_USERNAME@$WORKER_RELAY_HOST:/tmp > /dev/null 2>&1
    fi
 
    for MACHINE in $WORKER_HOSTS
@@ -226,10 +226,10 @@
 
       # Use a relay host
       if [ -n "$WORKER_RELAY_HOST" ]; then
-         ssh $WORKER_USERNAME@$WORKER_RELAY_HOST ssh $MACHINE mkdir -p $WORKER_LOCATION > /dev/null 2>&1
-         ssh $WORKER_USERNAME@$WORKER_RELAY_HOST "scp /tmp/$WORKER $WORKER_USERNAME@$MACHINE:$WORKER_LOCATION" > /dev/null 2>&1
+         ssh -A $WORKER_USERNAME@$WORKER_RELAY_HOST ssh $MACHINE mkdir -p $WORKER_LOCATION > /dev/null 2>&1
+         ssh -A $WORKER_USERNAME@$WORKER_RELAY_HOST "scp /tmp/$WORKER $WORKER_USERNAME@$MACHINE:$WORKER_LOCATION" > /dev/null 2>&1
          echo Starting worker on $MACHINE
-         ssh $WORKER_USERNAME@$WORKER_RELAY_HOST ssh $WORKER_USERNAME@$MACHINE "WORKER_LOGGING_LEVEL=$WORKER_LOGGING_LEVEL $WORKER_LOCATION/$WORKER $EXECUTION_URL $MACHINE $WORKER_LOG_DIR" &
+         ssh -A $WORKER_USERNAME@$WORKER_RELAY_HOST ssh $WORKER_USERNAME@$MACHINE "WORKER_LOGGING_LEVEL=$WORKER_LOGGING_LEVEL $WORKER_LOCATION/$WORKER $EXECUTION_URL $MACHINE $WORKER_LOG_DIR" &
          echo $! >> $PID_FILE
       # Connect directly
       else

Modified: trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java
===================================================================
--- trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java	2012-02-24 20:09:31 UTC (rev 5676)
+++ trunk/src/org/griphyn/vdl/karajan/lib/swiftscript/Misc.java	2012-02-25 09:06:14 UTC (rev 5677)
@@ -51,21 +51,25 @@
 	public static final SwiftArg PA_ARRAY = new SwiftArg.Positional("array");
 
 	static {
+        setArguments("swiftscript_dirname", new Arg[] { PA_FILE });
+	    setArguments("swiftscript_exists", new Arg[] { Arg.VARGS });
+        setArguments("swiftscript_existsfile", new Arg[] { PA_FILE });
+        setArguments("swiftscript_format", new Arg[] { PA_INPUT, PA_TRANSFORM });
+        setArguments("swiftscript_length", new Arg[] { PA_ARRAY });
+        setArguments("swiftscript_pad", new Arg[] { PA_INPUT, PA_TRANSFORM });
+        setArguments("swiftscript_regexp", new Arg[] { PA_INPUT, PA_PATTERN, PA_TRANSFORM });
+        setArguments("swiftscript_strcat",  new Arg[] { Arg.VARGS });
+        setArguments("swiftscript_strcut", new Arg[] { PA_INPUT, PA_PATTERN });
+        setArguments("swiftscript_strsplit", new Arg[] { PA_INPUT, PA_PATTERN });
+        setArguments("swiftscript_strstr", new Arg[] { PA_INPUT, PA_PATTERN });
 		setArguments("swiftscript_trace", new Arg[] { Arg.VARGS });
-		setArguments("swiftscript_strcat",  new Arg[] { Arg.VARGS });
-		setArguments("swiftscript_exists", new Arg[] { Arg.VARGS });
-		setArguments("swiftscript_strcut", new Arg[] { PA_INPUT, PA_PATTERN });
-		setArguments("swiftscript_strstr", new Arg[] { PA_INPUT, PA_PATTERN });
-		setArguments("swiftscript_strsplit", new Arg[] { PA_INPUT, PA_PATTERN });
-		setArguments("swiftscript_regexp", new Arg[] { PA_INPUT, PA_PATTERN, PA_TRANSFORM });
+        setArguments("swiftscript_to_int", new Arg[] { PA_INPUT });
 		setArguments("swiftscript_toint", new Arg[] { PA_INPUT });
+        setArguments("swiftscript_to_float", new Arg[] { PA_INPUT });
 		setArguments("swiftscript_tofloat", new Arg[] { PA_INPUT });
-		setArguments("swiftscript_format", new Arg[] { PA_INPUT, PA_TRANSFORM });
-		setArguments("swiftscript_pad", new Arg[] { PA_INPUT, PA_TRANSFORM });
-		setArguments("swiftscript_tostring", new Arg[] { PA_INPUT });
-		setArguments("swiftscript_dirname", new Arg[] { PA_FILE });
-		setArguments("swiftscript_length", new Arg[] { PA_ARRAY });
-		setArguments("swiftscript_existsfile", new Arg[] { PA_FILE });
+        setArguments("swiftscript_to_string", new Arg[] { PA_INPUT });
+        setArguments("swiftscript_tostring", new Arg[] { PA_INPUT });
+
 	}
 
 	private static final Logger traceLogger =
@@ -293,8 +297,13 @@
 		return handle;
 	}
 
-	public DSHandle swiftscript_toint(VariableStack stack)
+	public DSHandle swiftscript_toint(VariableStack stack) 
 	throws ExecutionException {
+	    return swiftscript_to_int(stack);
+	}
+	
+	public DSHandle swiftscript_to_int(VariableStack stack)
+	throws ExecutionException {
 		String inputString = TypeUtil.toString(PA_INPUT.getValue(stack));
 		int i = inputString.indexOf(".");
 		if( i >= 0 )
@@ -321,6 +330,11 @@
 
 	public DSHandle swiftscript_tofloat(VariableStack stack)
 	throws ExecutionException {
+	    return swiftscript_to_float(stack);
+	}
+
+	public DSHandle swiftscript_to_float(VariableStack stack)
+	throws ExecutionException {
 		String inputString = TypeUtil.toString(PA_INPUT.getValue(stack));
 		DSHandle handle = new RootDataNode(Types.FLOAT);
 
@@ -386,6 +400,11 @@
 
 	public DSHandle swiftscript_tostring(VariableStack stack)
 	throws ExecutionException {
+	    return swiftscript_to_string(stack);
+	}
+	
+	public DSHandle swiftscript_to_string(VariableStack stack)
+	throws ExecutionException {
 	    Object input = PA_INPUT.getValue(stack);
 	    DSHandle handle = new RootDataNode(Types.STRING);
 	    if (input instanceof DSHandle) {




More information about the Swift-commit mailing list