-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
28 lines (18 loc) · 1.14 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
DIR="tmp"
mkdir $DIR
PICKLE_FILE="word_count.pb"
SECONDS=0
python -m mapr2.controller.master --port 12345 --input-files ./books/\*.txt &
sleep 5
duration1=$SECONDS
python -m mapr2.controller.worker --master-host '127.0.0.1' --master-port 12345 --tmp-dir ./$DIR --pickle-file-path pickled_mrapps/$PICKLE_FILE --worker-port 12348 &
python -m mapr2.controller.worker --master-host '127.0.0.1' --master-port 12345 --tmp-dir ./$DIR --pickle-file-path pickled_mrapps/$PICKLE_FILE --worker-port 12347 &
python -m mapr2.controller.worker --master-host '127.0.0.1' --master-port 12345 --tmp-dir ./$DIR --pickle-file-path pickled_mrapps/$PICKLE_FILE --worker-port 12346 &
python -m mapr2.controller.worker --master-host '127.0.0.1' --master-port 12345 --tmp-dir ./$DIR --pickle-file-path pickled_mrapps/$PICKLE_FILE --worker-port 12349 &
python -m mapr2.controller.worker --master-host '127.0.0.1' --master-port 12345 --tmp-dir ./$DIR --pickle-file-path pickled_mrapps/$PICKLE_FILE --worker-port 12350 &
wait
duration2=$SECONDS
sort ./$DIR/mr-out* | grep . > mapr-mr2-p-wc-all
rm ./$DIR/mr-*
echo "mapr2 execution time in seconds" $((duration2 - duration1))
rm -rf $DIR