delete.sim 1.3 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
slguan 已提交
9 10 11
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 已提交
12 13 14 15 16 17 18 19 20 21 22
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
system sh/cfg.sh -n dnode1 -c cacheBlockSize -v 200
system sh/cfg.sh -n dnode2 -c cacheBlockSize -v 200
system sh/cfg.sh -n dnode3 -c cacheBlockSize -v 200

print ========= start dnodes
S
slguan 已提交
23
system sh/exec_up.sh -n dnode1 -s start
S
slguan 已提交
24 25
sql connect
sql create dnode 192.168.0.2
S
slguan 已提交
26
system sh/exec_up.sh -n dnode2 -s start
S
slguan 已提交
27
sql create dnode 192.168.0.3
S
slguan 已提交
28
system sh/exec_up.sh -n dnode3 -s start
S
slguan 已提交
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
sleep 3000

print ======== step1 
sql create database db replica 3 ablocks 2 tblocks 5 tables 10000
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