replica3.sim 1.1 KB
Newer Older
S
slguan 已提交
1
system sh/stop_dnodes.sh
S
slguan 已提交
2 3 4 5

system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
6 7 8
system sh/cfg.sh -n dnode1 -c clog -v 2
system sh/cfg.sh -n dnode2 -c clog -v 2
system sh/cfg.sh -n dnode3 -c clog -v 2
S
slguan 已提交
9 10 11 12
system sh/cfg.sh -n dnode1 -c numofMpeers -v 3
system sh/cfg.sh -n dnode2 -c numofMpeers -v 3
system sh/cfg.sh -n dnode3 -c numofMpeers -v 3

13
system sh/exec_up.sh -n dnode1 -s start
S
slguan 已提交
14
sql connect
S
slguan 已提交
15 16
sql create dnode $hostname2
sql create dnode $hostname3
17 18
system sh/exec_up.sh -n dnode2 -s start
system sh/exec_up.sh -n dnode3 -s start
S
slguan 已提交
19 20 21

sql create database db replica 3 
sql use db
22 23
sql create table db.mt (ts timestamp, f1 float, f2 float, f3 float, f4 float, f5 float, f6 float, f7 float, f8 float, f9 float, f10 float) tags (t1 int, t2 int)
sql create table db.tb1 using db.mt tags(1, 2)
S
slguan 已提交
24 25 26
sleep 3001

$x = 1000
27
while $x < 1010
S
slguan 已提交
28 29 30 31
  sql insert into tb1 values (now+1s , $x , $x , $x , $x , $x , $x , $x , $x , $x , $x ) 
  $x = $x + 1
endw 

32 33 34
system sh/exec_up.sh -n dnode1 -s stop
system sh/exec_up.sh -n dnode2 -s stop
system sh/exec_up.sh -n dnode3 -s stop
S
slguan 已提交
35 36