adatper formatting; ops loader fix

This commit is contained in:
jeffbanks 2023-02-15 16:59:53 -06:00
parent 6911fd13c9
commit d63ba45281
5 changed files with 36 additions and 32 deletions

View File

@ -43,7 +43,7 @@ blocks:
}; };
truncate-table: | truncate-table: |
truncate table <<keyspace:baselines>>.<<table:iot>>; truncate table TEMPLATE(keyspace, baselines).TEMPLATE(table:iot);
rampup: rampup:
params: params:
cl: <<write_cl:LOCAL_QUORUM>> cl: <<write_cl:LOCAL_QUORUM>>

View File

@ -40,7 +40,7 @@ blocks:
PRIMARY KEY ((machine_id), time) PRIMARY KEY ((machine_id), time)
) WITH CLUSTERING ORDER BY (time DESC); ) WITH CLUSTERING ORDER BY (time DESC);
truncate-table: | truncate-table: |
truncate table <<keyspace:starter>>.<<table:cqlstarter>>; truncate table TEMPLATE(keyspace,starter).TEMPLATE(table,cqlstarter);
schema-astra: schema-astra:
params: params:
prepared: false prepared: false

View File

@ -15,14 +15,14 @@ blocks:
rampup: rampup:
ops: ops:
rampup-insert: | rampup-insert: |
{ {
insert: "<<collection:keyvalue>>", insert: "<<collection:keyvalue>>",
documents: [ { _id: {seq_key}, value: {seq_value} } ] documents: [ { _id: {seq_key}, value: {seq_value} } ]
} }
params: params:
readPreference: primary readPreference: primary
tags: tags:
name: rampup-insert name: rampup-insert
main-read: main-read:
params: params:
@ -42,9 +42,9 @@ blocks:
type: write type: write
ops: ops:
main-insert: | main-insert: |
{ {
insert: "<<collection:keyvalue>>", insert: "<<collection:keyvalue>>",
documents: [ { _id: {rw_key}, value: {rw_value} } ] documents: [ { _id: {rw_key}, value: {rw_value} } ]
} }
params: params:
readPreference: primary readPreference: primary

View File

@ -71,7 +71,7 @@ blocks:
name: "city_idx" name: "city_idx"
} }
] ]
} }
rampup-write: rampup-write:
ops: ops:
@ -104,8 +104,10 @@ blocks:
"debt": null, "debt": null,
"match1": {match1}, "match1": {match1},
"match2": "{match2}", "match2": "{match2}",
"match3": {match2} "match3": {match2},
{additional_fields} {
additional_fields
}
} }
] ]
} }
@ -124,20 +126,20 @@ blocks:
filter: eq filter: eq
ops: ops:
read-document: | read-document: |
{ {
find: "<<collection:search_basic>>", find: "<<collection:search_basic>>",
filter: { match3: true } filter: { match3: true }
}, <<field-projection:null>> }, <<field-projection:null>>
main-lt: main-lt:
params: params:
filter: lt filter: lt
ops: ops:
read-document: | read-document: |
{ {
find: "<<collection:search_basic>>", find: "<<collection:search_basic>>",
filter: { match1: {$lt: 1}} filter: { match1: {$lt: 1}}
}, <<field-projection:null>> }, <<field-projection:null>>
main-and: main-and:
params: params:
@ -154,10 +156,10 @@ blocks:
filter: or filter: or
ops: ops:
read-document: | read-document: |
{ {
find: "<<collection:search_basic>>", find: "<<collection:search_basic>>",
filter: { $or: [ {match1: {$lt: 1}}, {match3: true}]} filter: { $or: [ {match1: {$lt: 1}}, {match3: true}]}
}, <<field-projection:null>> }, <<field-projection:null>>
main-or-single-match: main-or-single-match:
params: params:

View File

@ -81,7 +81,9 @@ public class OpsLoader {
transformer.checkpointAccesses().forEach((k, v) -> { transformer.checkpointAccesses().forEach((k, v) -> {
layered.addTemplateVariable(k, v); layered.addTemplateVariable(k, v);
params.remove(k); if (params.containsKey(k)) {
params.remove(k);
}
}); });
return layered; return layered;