view scripts/paxos.sh @ 243:9d0b932ad84f

tweak
author ichikitakahiro <e165713@ie.u-ryukyu.ac.jp>
date Thu, 23 Jan 2020 02:10:00 +0900
parents dd3c0ba6a0a6
children
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