delete.sim 1.2 KB
Newer Older
S
slguan 已提交
1
system sh/stop_dnodes.sh
S
slguan 已提交
2 3 4 5 6 7



system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
S
slguan 已提交
8

S
scripts  
slguan 已提交
9 10 11
system sh/cfg.sh -n dnode1 -c wallevel -v 2
system sh/cfg.sh -n dnode2 -c wallevel -v 2
system sh/cfg.sh -n dnode3 -c wallevel -v 2
S
slguan 已提交
12 13 14 15 16 17 18 19
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
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10

print ========= start dnodes
S
slguan 已提交
20
system sh/exec_up.sh -n dnode1 -s start
S
slguan 已提交
21
sql connect
S
slguan 已提交
22
sql create dnode $hostname2
S
slguan 已提交
23
system sh/exec_up.sh -n dnode2 -s start
S
slguan 已提交
24
sql create dnode $hostname3
S
slguan 已提交
25
system sh/exec_up.sh -n dnode3 -s start
S
slguan 已提交
26 27 28
sleep 3000

print ======== step1 
S
scripts  
slguan 已提交
29
sql create database db replica 3 ablocks 2 tblocks 5 maxtables 10000
S
slguan 已提交
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
sql create table db.mt (ts timestamp, tbcol int) TAGS(tgcol int)

$tbPrefix = db.t
$i = 0
while $i < 100000
  $tb = $tbPrefix . $i
  sql create table $tb using db.mt tags( $i )
  $i = $i + 1
endw 

print ======== step2
sleep 1000
sql drop database db
sql show databases
if $rows != 0 then 
  return -1
endi