Mercurial > hg > Database > Christie
view scripts/paxos.sh @ 182:1559aa74dc74
add paxos sh
author | akahori |
---|---|
date | Sat, 02 Feb 2019 15:18:17 +0900 (2019-02-02) |
parents | |
children | dd3c0ba6a0a6 |
line wrap: on
line source
#!/bin/bash proposer_num=$1 acceptor_num=$2 learner_num=$3 max=$(( proposer_num + acceptor_num + learner_num)); dot_file=Log/paxos.dot jar_path=../build/libs/Christie.jar topo_jarname=ChristieStartTopologyManager-1.0.jar torquetest_jarname=ChristieStartTorqueTestTopology-1.0.jar mkdir -p Log #ruby ./paxos.rb $proposer_num $acceptor_num $learner_num > ${dot_file} #dot -Tpng ./topology/ring.dot > ./topology/ring.png #open ./topology/ring.png java -cp ${jar_path} christie.topology.manager.StartTopologyManager --localPort 10000 --confFile ${dot_file} & cnt=0 while (($cnt < $max )) do (java -cp ${jar_path} christie.test.topology.paxos.StartPaxosNode --managerHost localhost --managerPort 10000 --localPort $(( 10001 + cnt )) --level debug) & cnt=$(( cnt + 1 )) done wait