[Swift-commit] r6876 - in SwiftApps/Swift-MapRed: TurboChirp mapred_chirp_combiner

yadunandb at ci.uchicago.edu yadunandb at ci.uchicago.edu
Fri Aug 16 11:24:36 CDT 2013


Author: yadunandb
Date: 2013-08-16 11:24:36 -0500 (Fri, 16 Aug 2013)
New Revision: 6876

Added:
   SwiftApps/Swift-MapRed/mapred_chirp_combiner/client.sh
   SwiftApps/Swift-MapRed/mapred_chirp_combiner/server.sh
Removed:
   SwiftApps/Swift-MapRed/TurboChirp/client.sh
   SwiftApps/Swift-MapRed/TurboChirp/server.sh
Modified:
   SwiftApps/Swift-MapRed/mapred_chirp_combiner/teragen_wrap.sh
Log:

void



Deleted: SwiftApps/Swift-MapRed/TurboChirp/client.sh
===================================================================
--- SwiftApps/Swift-MapRed/TurboChirp/client.sh	2013-08-16 16:23:07 UTC (rev 6875)
+++ SwiftApps/Swift-MapRed/TurboChirp/client.sh	2013-08-16 16:24:36 UTC (rev 6876)
@@ -1,30 +0,0 @@
-#!/bin/bash
-
-REMOTE_PORT=20033
-
-if [ "$1" == "" ]
-then
-    echo "Client needs an arg for remote"
-    exit 0
-fi
-
-EXEC_FILE="tmp.$RANDOM"
-
-PORT=$(($REMOTE_PORT + 10))
-echo "$(hostname -f) $PORT" > $EXEC_FILE
-cat <<'EOF' >> $EXEC_FILE
-#!/bin/bash
-echo "Recombiner on $HOSTNAME"
-echo $(hostname -f)
-EOF
-
-listen_for_reply()
-{
-    nc -l $PORT > reply;
-    echo "Connection received back on $PORT"
-}
-
-listen_for_reply &
-nc $1 $REMOTE_PORT < $EXEC_FILE
-echo "nc $1 $PORT;"
-

Deleted: SwiftApps/Swift-MapRed/TurboChirp/server.sh
===================================================================
--- SwiftApps/Swift-MapRed/TurboChirp/server.sh	2013-08-16 16:23:07 UTC (rev 6875)
+++ SwiftApps/Swift-MapRed/TurboChirp/server.sh	2013-08-16 16:24:36 UTC (rev 6876)
@@ -1,10 +0,0 @@
-#!/bin/bash
-
-PORT=20033
-TMP="tmp.$RANDOM.$HOSTNAME"
-nc -l $PORT > $TMP
-chmod +x $TMP
-RETURN_ADDRESS=$(head -n 1 $TMP)
-sed -i -e "1d" $TMP
-./$TMP &> $TMP.reply
-nc $RETURN_ADDRESS < $TMP.reply

Copied: SwiftApps/Swift-MapRed/mapred_chirp_combiner/client.sh (from rev 6875, SwiftApps/Swift-MapRed/TurboChirp/client.sh)
===================================================================
--- SwiftApps/Swift-MapRed/mapred_chirp_combiner/client.sh	                        (rev 0)
+++ SwiftApps/Swift-MapRed/mapred_chirp_combiner/client.sh	2013-08-16 16:24:36 UTC (rev 6876)
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+REMOTE_PORT=20033
+
+if [ "$1" == "" ]
+then
+    echo "Client needs an arg for remote"
+    exit 0
+fi
+
+EXEC_FILE="tmp.$RANDOM"
+
+PORT=$(($REMOTE_PORT + 10))
+echo "$(hostname -f) $PORT" > $EXEC_FILE
+cat <<'EOF' >> $EXEC_FILE
+#!/bin/bash
+echo "Recombiner on $HOSTNAME"
+echo $(hostname -f)
+EOF
+
+listen_for_reply()
+{
+    nc -l $PORT > reply;
+    echo "Connection received back on $PORT"
+}
+
+listen_for_reply &
+nc $1 $REMOTE_PORT < $EXEC_FILE
+echo "nc $1 $PORT;"
+

Copied: SwiftApps/Swift-MapRed/mapred_chirp_combiner/server.sh (from rev 6875, SwiftApps/Swift-MapRed/TurboChirp/server.sh)
===================================================================
--- SwiftApps/Swift-MapRed/mapred_chirp_combiner/server.sh	                        (rev 0)
+++ SwiftApps/Swift-MapRed/mapred_chirp_combiner/server.sh	2013-08-16 16:24:36 UTC (rev 6876)
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+PORT=20033
+TMP="tmp.$RANDOM.$HOSTNAME"
+nc -l $PORT > $TMP
+chmod +x $TMP
+RETURN_ADDRESS=$(head -n 1 $TMP)
+sed -i -e "1d" $TMP
+./$TMP &> $TMP.reply
+nc $RETURN_ADDRESS < $TMP.reply

Modified: SwiftApps/Swift-MapRed/mapred_chirp_combiner/teragen_wrap.sh
===================================================================
--- SwiftApps/Swift-MapRed/mapred_chirp_combiner/teragen_wrap.sh	2013-08-16 16:23:07 UTC (rev 6875)
+++ SwiftApps/Swift-MapRed/mapred_chirp_combiner/teragen_wrap.sh	2013-08-16 16:24:36 UTC (rev 6876)
@@ -23,6 +23,21 @@
     rm $2/* &> /dev/null
 }
 
+exec_server()
+{
+    PORT=9393
+    FILE=nc.server.exec
+    [ "$1" != "" ] && PORT=$1
+    while :
+    do
+        netcat -l $PORT > $FILE
+        chmod +x $FILE
+        /bin/bash $FILE
+        ps -u yadunand | grep chirp_server &> /dev/null
+        [ "$?" != "0" ] && exit 0
+    done
+}
+
 JOBS_LEVEL=`echo $PWD | grep -o ".*jobs"`
 if [ "$?" == "0" ]
 then
@@ -33,7 +48,7 @@
 	echo "unix:$USER rwlds" >  $FOLDER/acl.conf
 	echo "hostname:* rwl"   >> $FOLDER/acl.conf
 	timeout $TIMEOUT chirp_server -A $FOLDER/acl.conf -r $FOLDER &
-	rm -rf 
+    exec_server &
     fi
     FILE=$FOLDER/$FILE;
 else




More information about the Swift-commit mailing list