-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_setup_vms
More file actions
executable file
·49 lines (24 loc) · 2.31 KB
/
Copy pathtest_setup_vms
File metadata and controls
executable file
·49 lines (24 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Setup1
Load data
./lib/perf_engines/mcsoda.py saslbucket:saslpass@10.3.2.57 vbuckets=128 doc-gen=0 doc-cache=0 ratio-creates=1 ratio-sets=1 ratio-misses=0 min-value-size=256,512 max-items=4000 exit-after-creates=1 prefix=70one
Create 1 dev view:
curl -v -X PUT -H 'Content-Type: application/json' 'http://saslbucket:saslpass@10.3.2.57:8092/saslbucket/_design/dev_d2' \
-d '{"views": { "v1":{"map":"function(doc){\nemit(doc.key,doc.name);\n}", "reduce":"_count"}, "v2":{"map":"function(doc,meta){\nemit(meta.id,[doc.key_num,doc.key_num]);\n}", "reduce":"_count"} }}'
Prod View:
curl -v -X PUT -H 'Content-Type: application/json' 'http://saslbucket:saslpass@10.3.2.57:8092/saslbucket/_design/d2' \
-d '{"views": { "v1":{"map":"function(doc){\nemit(doc.key,doc.name);\n}"}, "v2":{"map":"function(doc,meta){\nemit(meta.id,[doc.key_num,doc.key_num]);\n}"} }}'
Monitor:
curl -s 'http://10.3.2.57:8092/_set_view/saslbucket/_design/dev_d2/_info' | json_xs
Query during indexing:
curl -v -X GET 'http://saslbucket:saslpass@10.3.2.57:8092/saslbucket/_design/dev_d2/_view/v1?stale=false&full_set=true'
curl -v -X GET 'http://saslbucket:saslpass@10.3.2.57:8092/saslbucket/_design/dev_d2/_view/v1?stale=ok'
curl -s 'http://saslbucket:saslpass@10.3.2.57:8092/saslbucket/_design/dev_d2/_view/v1?stale=ok'
Setup2
./lib/perf_engines/mcsoda.py saslbucket:saslpass@10.3.3.95 vbuckets=128 doc-gen=0 doc-cache=0 ratio-creates=1 ratio-sets=1 ratio-misses=0 min-value-size=256,512 max-items=5000 exit-after-creates=1 prefix=70one
curl -v -X PUT -H 'Content-Type: application/json' 'http://saslbucket:saslpass@10.3.3.95:8092/saslbucket/_design/dev_d2' \
-d '{"views": { "v1":{"map":"function(doc){\nemit(doc.key,doc.name);\n}"}, "v2":{"map":"function(doc,meta){\nemit(meta.id,[doc.key_num,doc.key_num]);\n}"} }}'
curl -s 'http://10.3.3.95:8092/_set_view/saslbucket/_design/dev_d2/_info'
curl -s 'http://saslbucket:saslpass@10.3.3.95:8092/saslbucket/_design/dev_d2/_view/v1?stale=ok'
curl -s 'http://saslbucket:saslpass@10.3.3.95:8092/saslbucket/_design/dev_d2/_view/v1?limit=20&stale=false&debug=true'
curl -s 'http://saslbucket:saslpass@10.3.3.95:8092/saslbucket/_design/dev_d2/_view/v1?limit=20&stale=false&_type=replica&debug=true'
curl -s 'http://saslbucket:saslpass@10.3.3.95:8092/saslbucket/_design/dev_d2/_view/v1?stale=false&full_set=true&limit=10'