182
|
1 #!/bin/bash
|
|
2
|
|
3
|
|
4 proposer_num=$1
|
|
5 acceptor_num=$2
|
|
6 learner_num=$3
|
|
7
|
|
8 max=$(( proposer_num + acceptor_num + learner_num));
|
|
9 dot_file=Log/paxos.dot
|
|
10 jar_path=../build/libs/Christie.jar
|
|
11 topo_jarname=ChristieStartTopologyManager-1.0.jar
|
|
12 torquetest_jarname=ChristieStartTorqueTestTopology-1.0.jar
|
|
13
|
|
14 mkdir -p Log
|
|
15
|
|
16 #ruby ./paxos.rb $proposer_num $acceptor_num $learner_num > ${dot_file}
|
|
17 #dot -Tpng ./topology/ring.dot > ./topology/ring.png
|
|
18 #open ./topology/ring.png
|
|
19 java -cp ${jar_path} christie.topology.manager.StartTopologyManager --localPort 10000 --confFile ${dot_file} &
|
|
20
|
|
21 cnt=0
|
|
22 while (($cnt < $max ))
|
|
23 do
|
198
|
24 java -cp ${jar_path} christie.test.topology.paxos.StartPaxosNode --managerHost localhost --managerPort 10000 --localPort $(( 10001 + cnt )) --level debug &
|
182
|
25 cnt=$(( cnt + 1 ))
|
|
26 done
|
|
27 wait |