-
Notifications
You must be signed in to change notification settings - Fork 2
/
test.sh
executable file
·73 lines (72 loc) · 2.64 KB
/
test.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
lua mapreduce/test.lua
if [[ $? -ne 0 ]]; then
echo "ERROR"
exit 1
fi
for storage in gridfs shared sshfs; do
echo COMBINER + ASSOCIATIVE COMMUTATIVE IDEMPOTENT REDUCER
screen -d -m ./execute_example_worker.sh
diff <(./execute_example_server.sh $storage | awk '{ print $1,$2 }' | sort) \
<(cat mapreduce/server.lua \
mapreduce/worker.lua \
mapreduce/test.lua \
mapreduce/utils.lua | lua misc/naive.lua | awk '{ print $1,$2 }' | sort) > /dev/null
if [[ $? -ne 0 ]]; then
echo "ERROR"
exit 1
fi
echo NO COMBINER + ASSOCIATIVE COMMUTATIVE IDEMPOTENT REDUCER
screen -d -m ./execute_example_worker.sh
diff <(lua execute_server.lua localhost wordcount \
mapreduce.examples.WordCount.taskfn \
mapreduce.examples.WordCount.mapfn \
mapreduce.examples.WordCount.partitionfn \
mapreduce.examples.WordCount.reducefn \
mapreduce.examples.WordCount.finalfn \
nil $storage | awk '{ print $1,$2 }' | sort) \
<(cat mapreduce/server.lua \
mapreduce/worker.lua \
mapreduce/test.lua \
mapreduce/utils.lua | lua misc/naive.lua | awk '{ print $1,$2 }' | sort) > /dev/null
if [[ $? -ne 0 ]]; then
echo "ERROR"
exit 1
fi
echo NO COMBINER + GENERAL REDUCER
screen -d -m ./execute_example_worker.sh
diff <(lua execute_server.lua localhost wordcount \
mapreduce.examples.WordCount.taskfn \
mapreduce.examples.WordCount.mapfn \
mapreduce.examples.WordCount.partitionfn \
mapreduce.examples.WordCount.reducefn2 \
mapreduce.examples.WordCount.finalfn \
nil $storage | awk '{ print $1,$2 }' | sort) \
<(cat mapreduce/server.lua \
mapreduce/worker.lua \
mapreduce/test.lua \
mapreduce/utils.lua | lua misc/naive.lua | awk '{ print $1,$2 }' | sort) > /dev/null
if [[ $? -ne 0 ]]; then
echo "ERROR"
exit 1
fi
echo INIT SCRIPT
screen -d -m ./execute_example_worker.sh
diff <(lua execute_server.lua localhost wordcount \
mapreduce.examples.WordCount \
mapreduce.examples.WordCount \
mapreduce.examples.WordCount \
mapreduce.examples.WordCount \
mapreduce.examples.WordCount \
mapreduce.examples.WordCount \
$storage | awk '{ print $1,$2 }' | sort) \
<(cat mapreduce/server.lua \
mapreduce/worker.lua \
mapreduce/test.lua \
mapreduce/utils.lua | lua misc/naive.lua | awk '{ print $1,$2 }' | sort) > /dev/null
if [[ $? -ne 0 ]]; then
echo "ERROR"
exit 1
fi
echo "Ok with storage $storage"
done