From 72dd19cb2a15dae328b567d8a2dbdf0a4bb1a0ed Mon Sep 17 00:00:00 2001 From: Jeffrey Carpenter Date: Fri, 16 Dec 2022 08:04:23 -0700 Subject: [PATCH] fixing operation syntax fixing port/host names per api equivalent changes to new docs API tests example of using cql driver, but missing contact points and local dc schema creation via API minor fixes to rest workloads create schema via REST API todos and workarounds final test changes removing unneeded files removing unneeded files --- .../baselines/http-rest-keyvalue.yaml | 35 +++-- .../baselines/http-rest-tabular.yaml | 71 ++++------ .../baselines/http-rest-timeseries.yaml | 134 ++++++++++++------ .../http-docsapi-crud-basic.yaml | 56 +++++--- .../http-docsapi-crud-dataset.yaml | 39 +++-- .../documents-api/http-docsapi-keyvalue.yaml | 35 +++-- .../http-docsapi-search-advanced.yaml | 74 ++++++---- .../http-docsapi-search-basic.yaml | 61 +++++--- .../http-graphql-cql-keyvalue.yaml | 39 +++-- .../http-graphql-cql-tabular.yaml | 39 +++-- .../http-graphql-cql-timeseries.yaml | 77 +++++----- .../http-graphql-keyvalue.yaml | 41 +++--- .../http-graphql-tabular.yaml | 41 +++--- .../http-graphql-timeseries.yaml | 41 +++--- 14 files changed, 433 insertions(+), 350 deletions(-) diff --git a/adapter-http/src/main/resources/activities/baselines/http-rest-keyvalue.yaml b/adapter-http/src/main/resources/activities/baselines/http-rest-keyvalue.yaml index 09a419a9a..f9c91e4a5 100644 --- a/adapter-http/src/main/resources/activities/baselines/http-rest-keyvalue.yaml +++ b/adapter-http/src/main/resources/activities/baselines/http-rest-keyvalue.yaml @@ -15,10 +15,10 @@ scenarios: bindings: # To enable an optional weighted set of hosts in place of a load balancer # Examples - # single host: stargate_host=host1 - # multiple hosts: stargate_host=host1,host2,host3 - # multiple weighted hosts: stargate_host=host1:3,host2:7 - weighted_hosts: WeightedStrings('<>') + # single host: restapi_host=host1 + # multiple hosts: restapi_host=host1,host2,host3 + # multiple weighted hosts: restapi_host=host1:3,host2:7 + weighted_hosts: WeightedStrings('<>') # http request id request_id: ToHashedUUID(); ToString(); @@ -31,7 +31,8 @@ blocks: schema: ops: create-keyspace: - op: POST <>://{weighted_hosts}:<><>/v2/schemas/keyspaces + method: POST + uri: <>://{weighted_hosts}:<><>/v2/schemas/keyspaces Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -41,15 +42,19 @@ blocks: "name": "<>", "replicas": <> } + drop-table: - op: DELETE <>://{weighted_hosts}:<><>/v2/schemas/keyspaces/<>/tables/<> + method: DELETE + uri: <>://{weighted_hosts}:<><>/v2/schemas/keyspaces/<>/tables/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" ok-status: "[2-4][0-9][0-9]" + create-table: - op: POST <>://{weighted_hosts}:<><>/v2/schemas/keyspaces/<>/tables + method: POST + uri: <>://{weighted_hosts}:<><>/v2/schemas/keyspaces/<>/tables Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -74,10 +79,12 @@ blocks: }, "ifNotExists": true } + schema-astra: statements: create-table-astra: - op: POST <>://{weighted_hosts}:<><>/v2/schemas/keyspaces/<>/tables + method: POST + uri: <>://{weighted_hosts}:<><>/v2/schemas/keyspaces/<>/tables Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -102,10 +109,12 @@ blocks: }, "ifNotExists": true } + rampup: ops: rampup-insert: - op: POST <>://{weighted_hosts}:<><>/v2/keyspaces/<>/<> + method: POST + uri: <>://{weighted_hosts}:<><>/v2/keyspaces/<>/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -115,23 +124,27 @@ blocks: "key": "{seq_key}", "value": "{seq_value}" } + main-read: params: ratio: <> ops: main-select: - op: GET <>://{weighted_hosts}:<><>/v2/keyspaces/<>/<>/{rw_key} + method: GET + uri: <>://{weighted_hosts}:<><>/v2/keyspaces/<>/<>/{rw_key} Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" ok-status: "[2-4][0-9][0-9]" + main-write: params: ratio: <> ops: main-write: - op: POST <>://{weighted_hosts}:<><>/v2/keyspaces/<>/<> + method: POST + uri: <>://{weighted_hosts}:<><>/v2/keyspaces/<>/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" diff --git a/adapter-http/src/main/resources/activities/baselines/http-rest-tabular.yaml b/adapter-http/src/main/resources/activities/baselines/http-rest-tabular.yaml index 43576979a..785c498b2 100644 --- a/adapter-http/src/main/resources/activities/baselines/http-rest-tabular.yaml +++ b/adapter-http/src/main/resources/activities/baselines/http-rest-tabular.yaml @@ -16,10 +16,10 @@ scenarios: bindings: # To enable an optional weighted set of hosts in place of a load balancer # Examples - # single host: stargate_host=host1 - # multiple hosts: stargate_host=host1,host2,host3 - # multiple weighted hosts: stargate_host=host1:3,host2:7 - weighted_hosts: WeightedStrings('<>') + # single host: restapi_host=host1 + # multiple hosts: restapi_host=host1,host2,host3 + # multiple weighted hosts: restapi_host=host1:3,host2:7 + weighted_hosts: WeightedStrings('<>') # http request id request_id: ToHashedUUID(); ToString(); # for ramp-up and verify @@ -39,7 +39,8 @@ blocks: schema: ops: create-keyspace: - op: POST <>://{weighted_hosts}:<><>/v2/schemas/keyspaces + method: POST + uri: <>://{weighted_hosts}:<><>/v2/schemas/keyspaces Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -49,43 +50,19 @@ blocks: "name": "<>", "replicas": <> } + + drop-table: + method: DELETE + uri: <>://{weighted_hosts}:<><>/v2/schemas/keyspaces/<>/tables/<> + Accept: "application/json" + X-Cassandra-Request-Id: "{request_id}" + X-Cassandra-Token: "<>" + Content-Type: "application/json" + ok-status: "[2-4][0-9][0-9]" + create-table: - op: POST <>://{weighted_hosts}:<><>/v2/schemas/keyspaces/<>/tables - Accept: "application/json" - X-Cassandra-Request-Id: "{request_id}" - X-Cassandra-Token: "<>" - Content-Type: "application/json" - body: | - { - "name": "<>", - "columnDefinitions": [ - { - "name": "part", - "typeDefinition": "text" - }, - { - "name": "clust", - "typeDefinition": "text" - }, - { - "name": "data", - "typeDefinition": "text" - } - ], - "primaryKey": { - "partitionKey": [ - "part" - ], - "clusteringKey": [ - "clust" - ] - }, - "ifNotExists": true - } - schema-astra: - ops: - create-table-astra: - op: POST <>://{weighted_hosts}:<><>/v2/schemas/keyspaces/<>/tables + method: POST + uri: <>://{weighted_hosts}:<><>/v2/schemas/keyspaces/<>/tables Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -117,10 +94,12 @@ blocks: }, "ifNotExists": true } + rampup: ops: rampup-insert: - op: POST <>://{weighted_hosts}:<><>/v2/keyspaces/<>/<> + method: POST + uri: <>://{weighted_hosts}:<><>/v2/keyspaces/<>/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -131,22 +110,26 @@ blocks: "clust": "{clust_layout}", "data": "{data}" } + main-read: params: ratio: 5 ops: main-select: - op: GET <>://{weighted_hosts}:<><>/v2/keyspaces/<>/<>/{part_read}&page-size={limit} + method: GET + uri: <>://{weighted_hosts}:<><>/v2/keyspaces/<>/<>/{part_read}&page-size={limit} Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" + main-write: params: ratio: 5 ops: main-write: - op: POST <>://{weighted_hosts}:<><>/v2/keyspaces/<>/<> + method: POST + uri: <>://{weighted_hosts}:<><>/v2/keyspaces/<>/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" diff --git a/adapter-http/src/main/resources/activities/baselines/http-rest-timeseries.yaml b/adapter-http/src/main/resources/activities/baselines/http-rest-timeseries.yaml index c26917328..1ba879180 100644 --- a/adapter-http/src/main/resources/activities/baselines/http-rest-timeseries.yaml +++ b/adapter-http/src/main/resources/activities/baselines/http-rest-timeseries.yaml @@ -20,10 +20,10 @@ scenarios: bindings: # To enable an optional weighted set of hosts in place of a load balancer # Examples - # single host: stargate_host=host1 - # multiple hosts: stargate_host=host1,host2,host3 - # multiple weighted hosts: stargate_host=host1:3,host2:7 - weighted_hosts: WeightedStrings('<>') + # single host: restapi_host=host1 + # multiple hosts: restapi_host=host1,host2,host3 + # multiple weighted hosts: restapi_host=host1:3,host2:7 + weighted_hosts: WeightedStrings('<>') # http request id request_id: ToHashedUUID(); ToString(); @@ -36,47 +36,91 @@ bindings: blocks: schema: - params: - prepared: false ops: - create-keyspace: | - create keyspace if not exists <> - WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '<>'} - AND durable_writes = true; - create-table: | - create table if not exists <>.<> ( - machine_id UUID, // source machine - sensor_name text, // sensor name - time timestamp, // timestamp of collection - sensor_value double, // - station_id UUID, // source location - data text, - PRIMARY KEY ((machine_id, sensor_name), time) - ) WITH CLUSTERING ORDER BY (time DESC) - AND compression = { 'sstable_compression' : '<>' } - AND compaction = { - 'class': 'TimeWindowCompactionStrategy', - 'compaction_window_size': <>, - 'compaction_window_unit': 'MINUTES' - }; - truncate-table: | - truncate table <>.<>; - schema-astra: - ops: - create-table-astra: | - create table if not exists <>.<> ( - machine_id UUID, // source machine - sensor_name text, // sensor name - time timestamp, // timestamp of collection - sensor_value double, // - station_id UUID, // source location - data text, - PRIMARY KEY ((machine_id, sensor_name), time) - ) WITH CLUSTERING ORDER BY (time DESC); + create-keyspace: + method: POST + uri: <>://{weighted_hosts}:<><>/v2/schemas/keyspaces + Accept: "application/json" + X-Cassandra-Request-Id: "{request_id}" + X-Cassandra-Token: "<>" + Content-Type: "application/json" + body: | + { + "name": "<>", + "replicas": <> + } + + drop-table: + method: DELETE + uri: <>://{weighted_hosts}:<><>/v2/schemas/keyspaces/<>/tables/<> + Accept: "application/json" + X-Cassandra-Request-Id: "{request_id}" + X-Cassandra-Token: "<>" + Content-Type: "application/json" + ok-status: "[2-4][0-9][0-9]" + + create-table: + method: POST + uri: <>://{weighted_hosts}:<><>/v2/schemas/keyspaces/<>/tables + Accept: "application/json" + X-Cassandra-Request-Id: "{request_id}" + X-Cassandra-Token: "<>" + Content-Type: "application/json" + body: | + { + "name": "<>", + "columnDefinitions": [ + { + "name": "machine_id", + "typeDefinition": "uuid" + }, + { + "name": "sensor_name", + "typeDefinition": "text" + }, + { + "name": "time", + "typeDefinition": "timestamp" + }, + { + "name": "sensor_value", + "typeDefinition": "double" + }, + { + "name": "station_id", + "typeDefinition": "uuid" + }, + { + "name": "data", + "typeDefinition": "text" + } + ], + "primaryKey": { + "partitionKey": [ + "machine_id", + "sensor_name" + ], + "clusteringKey": [ + "time" + ] + }, + "tableOptions": { + "clusteringExpression": [ + { + "column": "time", + "order": "DESC" + } + ] + }, + "ifNotExists": true + } + + rampup: ops: rampup-insert: - op: POST <>://{weighted_hosts}:<><>/v2/keyspaces/<>/<> + method: POST + uri: <>://{weighted_hosts}:<><>/v2/keyspaces/<>/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -90,22 +134,26 @@ blocks: "station_id": "{station_id}", "data": "{data}" } + main-read: params: ratio: <> ops: main-select: - op: GET <>://{weighted_hosts}:<><>/v2/keyspaces/<>/<>?where=E[[{"machine_id":{"$eq":"{machine_id}"},"sensor_name":{"$eq":"{sensor_name}"}}]]&page-size=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/keyspaces/<>/<>?where=URLENCODE[[{"machine_id":{"$eq":"{machine_id}"},"sensor_name":{"$eq":"{sensor_name}"}}]]&page-size=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" + main-write: params: ratio: <> ops: main-write: - op: POST <>://{weighted_hosts}:<><>/v2/keyspaces/<>/<> + method: POST + uri: <>://{weighted_hosts}:<><>/v2/keyspaces/<>/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" diff --git a/adapter-http/src/main/resources/activities/documents-api/http-docsapi-crud-basic.yaml b/adapter-http/src/main/resources/activities/documents-api/http-docsapi-crud-basic.yaml index 5a57c8b6e..14eb1fe50 100644 --- a/adapter-http/src/main/resources/activities/documents-api/http-docsapi-crud-basic.yaml +++ b/adapter-http/src/main/resources/activities/documents-api/http-docsapi-crud-basic.yaml @@ -1,27 +1,27 @@ min_version: "4.17.15" -# nb -v run driver=http yaml=http-docsapi-crud-basic tags=phase:schema stargate_host=my_stargate_host auth_token=$AUTH_TOKEN +# nb -v run driver=http yaml=http-docsapi-crud-basic tags=phase:schema docsapi_host=my_docsapi_host auth_token=$AUTH_TOKEN description: | This workload emulates CRUD operations for the Stargate Documents API. It generates a simple JSON document to be used for writes and updates. - Note that stargate_port should reflect the port where the Docs API is exposed (defaults to 8082). + Note that docsapi_port should reflect the port where the Docs API is exposed (defaults to 8180). scenarios: default: schema: run driver=http tags==block:schema threads==1 cycles==UNDEF - write: run driver=http tags==name:"write.*" cycles===TEMPLATE(write-cycles,TEMPLATE(docscount,10000000)) threads=auto errors=timer,warn - read: run driver=http tags==name:"read.*" cycles===TEMPLATE(read-cycles,TEMPLATE(docscount,10000000)) threads=auto errors=timer,warn - update: run driver=http tags==name:"update.*" cycles===TEMPLATE(update-cycles,TEMPLATE(docscount,10000000)) threads=auto errors=timer,warn - delete: run driver=http tags==name:"delete.*" cycles===TEMPLATE(delete-cycles,TEMPLATE(docscount,10000000)) threads=auto errors=timer,warn + write: run driver=http tags==block:"write.*" cycles===TEMPLATE(write-cycles,TEMPLATE(docscount,10000000)) threads=auto errors=timer,warn + read: run driver=http tags==block:"read.*" cycles===TEMPLATE(read-cycles,TEMPLATE(docscount,10000000)) threads=auto errors=timer,warn + update: run driver=http tags==block:"update.*" cycles===TEMPLATE(update-cycles,TEMPLATE(docscount,10000000)) threads=auto errors=timer,warn + delete: run driver=http tags==block:"delete.*" cycles===TEMPLATE(delete-cycles,TEMPLATE(docscount,10000000)) threads=auto errors=timer,warn bindings: # To enable an optional weighted set of hosts in place of a load balancer # Examples - # single host: stargate_host=host1 - # multiple hosts: stargate_host=host1,host2,host3 - # multiple weighted hosts: stargate_host=host1:3,host2:7 - weighted_hosts: WeightedStrings('<>') + # single host: docsapi_host=host1 + # multiple hosts: docsapi_host=host1,host2,host3 + # multiple weighted hosts: docsapi_host=host1:3,host2:7 + weighted_hosts: WeightedStrings('<>') # http request id request_id: ToHashedUUID(); ToString(); @@ -42,40 +42,45 @@ bindings: blocks: schema: ops: - create-keyspace: - op: POST <>://{weighted_hosts}:<><>/v2/schemas/keyspaces + create-namespace: + method: POST + uri: <>://{weighted_hosts}:<><>/v2/schemas/namespaces Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" body: | { - "name": "<>", + "name": "<>", "replicas": <> } + ok-status: ".*" delete-docs-collection: - op: DELETE <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<> + method: DELETE + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" ok-status: "[2-4][0-9][0-9]" create-docs-collection: - op: POST <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections + method: POST Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" body: | { - "name": "<>" + "name": "<>" } - main: + write: ops: write-document: - op: PUT <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{seq_key} + method: PUT + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{seq_key} Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -105,15 +110,21 @@ blocks: "debt": null } + read: + ops: read-document: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{random_key} + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{random_key} Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" ok-status: "[2-4][0-9][0-9]" + update: + ops: update-document: - op: PUT <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{random_key} + method: PUT + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{random_key} Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -143,8 +154,11 @@ blocks: "debt": null } + delete: + ops: delete-document: - op: DELETE <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{seq_key} + method: DELETE + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{seq_key} Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" diff --git a/adapter-http/src/main/resources/activities/documents-api/http-docsapi-crud-dataset.yaml b/adapter-http/src/main/resources/activities/documents-api/http-docsapi-crud-dataset.yaml index 385d9bece..b8c0f0b75 100644 --- a/adapter-http/src/main/resources/activities/documents-api/http-docsapi-crud-dataset.yaml +++ b/adapter-http/src/main/resources/activities/documents-api/http-docsapi-crud-dataset.yaml @@ -3,7 +3,7 @@ min_version: "4.17.15" description: | This workload emulates CRUD operations for the Stargate Documents API. It requires a data set file, where each line is a single JSON document to be used for writes and updates. - Note that stargate_port should reflect the port where the Docs API is exposed (defaults to 8082). + Note that docsapi_port should reflect the port where the Docs API is exposed (defaults to 8180). scenarios: default: @@ -16,10 +16,10 @@ scenarios: bindings: # To enable an optional weighted set of hosts in place of a load balancer # Examples - # single host: stargate_host=host1 - # multiple hosts: stargate_host=host1,host2,host3 - # multiple weighted hosts: stargate_host=host1:3,host2:7 - weighted_hosts: WeightedStrings('<>') + # single host: docsapi_host=host1 + # multiple hosts: docsapi_host=host1,host2,host3 + # multiple weighted hosts: docsapi_host=host1:3,host2:7 + weighted_hosts: WeightedStrings('<>') # http request id request_id: ToHashedUUID(); ToString(); @@ -29,34 +29,38 @@ bindings: blocks: schema: ops: - create-keyspace: - op: POST <>://{weighted_hosts}:<><>/v2/schemas/keyspaces + create-namespace: + method: POST + uri: <>://{weighted_hosts}:<><>/v2/schemas/namespaces Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" body: | { - "name": "<>", + "name": "<>", "replicas": <> } + ok-status: ".*" delete-docs-collection: - op: DELETE <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<> + method: DELETE + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" ok-status: "[2-4][0-9][0-9]" create-docs-collection: - op: POST <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections + method: POST + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" body: | { - "name": "<>" + "name": "<>" } main: @@ -64,7 +68,8 @@ blocks: document_json: ModuloLineToString('<>'); ops: write-document: - op: PUT <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{seq_key} + method: PUT + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{seq_key} Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -72,14 +77,17 @@ blocks: body: "{document_json}" read-document: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{random_key} + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{random_key} Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" ok-status: "[2-4][0-9][0-9]" + # TODO - what is the purpose of this? does it overwrite? is there a way to make sure it is actually overwriting existing documents? update-document: - op: PUT <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{random_key} + method: PUT + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{random_key} Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -87,7 +95,8 @@ blocks: body: "{document_json}" delete-document: - op: DELETE <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{seq_key} + method: DELETE + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{seq_key} Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" diff --git a/adapter-http/src/main/resources/activities/documents-api/http-docsapi-keyvalue.yaml b/adapter-http/src/main/resources/activities/documents-api/http-docsapi-keyvalue.yaml index fbd2e4de9..0dbf1c7f2 100644 --- a/adapter-http/src/main/resources/activities/documents-api/http-docsapi-keyvalue.yaml +++ b/adapter-http/src/main/resources/activities/documents-api/http-docsapi-keyvalue.yaml @@ -6,7 +6,7 @@ description: | - Schema creation with the Docs API, we don't use cql because the Docs API is opinionated about schema. - There is no instrumentation with the http driver. - There is no async mode with the http driver. - Note that stargate_port should reflect the port where the Docs API is exposed (defaults to 8082). + Note that docsapi_port should reflect the port where the Docs API is exposed (defaults to 8180). scenarios: default: @@ -17,10 +17,10 @@ scenarios: bindings: # To enable an optional weighted set of hosts in place of a load balancer # Examples - # single host: stargate_host=host1 - # multiple hosts: stargate_host=host1,host2,host3 - # multiple weighted hosts: stargate_host=host1:3,host2:7 - weighted_hosts: WeightedStrings('<>') + # single host: docsapi_host=host1 + # multiple hosts: docsapi_host=host1,host2,host3 + # multiple weighted hosts: docsapi_host=host1:3,host2:7 + weighted_hosts: WeightedStrings('<>') # http request id request_id: ToHashedUUID(); ToString(); @@ -32,40 +32,45 @@ bindings: blocks: schema: ops: - create-keyspace: - op: POST <>://{weighted_hosts}:<><>/v2/schemas/keyspaces + create-namespace: + method: POST + uri: <>://{weighted_hosts}:<><>/v2/schemas/namespaces Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" body: | { - "name": "<>", + "name": "<>", "replicas": <> } + ok-status: ".*" delete-docs-collection: - op: DELETE <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<> + method: DELETE + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" ok-status: "[2-4][0-9][0-9]" create-docs-collection: - op: POST <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections + method: POST + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" body: | { - "name": "<>" + "name": "<>" } rampup: ops: rampup-insert: - op: PUT <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{seq_key} + method: PUT + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{seq_key} Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -80,14 +85,16 @@ blocks: ratio: <> ops: main-select: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{rw_key} + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{rw_key} Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" ok-status: "[2-4][0-9][0-9]" main-write: - op: PUT <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{rw_key} + method: PUT + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{rw_key} Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" diff --git a/adapter-http/src/main/resources/activities/documents-api/http-docsapi-search-advanced.yaml b/adapter-http/src/main/resources/activities/documents-api/http-docsapi-search-advanced.yaml index c299a2b2d..b844b3b86 100644 --- a/adapter-http/src/main/resources/activities/documents-api/http-docsapi-search-advanced.yaml +++ b/adapter-http/src/main/resources/activities/documents-api/http-docsapi-search-advanced.yaml @@ -2,9 +2,9 @@ min_version: "4.17.15" description: | This workload emulates advanced search filter combinations for the Stargate Documents API. - During the rampup phase, it generates documents, writes them to a table, and then warms up the search paths. + During the rampup phase, it generates documents, writes them to a collection, and then warms up the search paths. During the main phase it performs various basic search filters and times their execution. - Note that stargate_port should reflect the port where the Docs API is exposed (defaults to 8082). + Note that docsapi_port should reflect the port where the Docs API is exposed (defaults to 8180). # These are the filter combinations tested in this workload, and their names: # in: match1 IN [0] @@ -32,10 +32,10 @@ scenarios: bindings: # To enable an optional weighted set of hosts in place of a load balancer # Examples - # single host: stargate_host=host1 - # multiple hosts: stargate_host=host1,host2,host3 - # multiple weighted hosts: stargate_host=host1:3,host2:7 - weighted_hosts: WeightedStrings('<>') + # single host: docsapi_host=host1 + # multiple hosts: docsapi_host=host1,host2,host3 + # multiple weighted hosts: docsapi_host=host1:3,host2:7 + weighted_hosts: WeightedStrings('<>') # http request id request_id: ToHashedUUID(); ToString(); @@ -61,40 +61,45 @@ bindings: blocks: schema: statements: - create-keyspace: - op: POST <>://{weighted_hosts}:<><>/v2/schemas/keyspaces + create-namespace: + method: POST + uri: <>://{weighted_hosts}:<><>/v2/schemas/namespaces Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" body: | { - "name": "<>", + "name": "<>", "replicas": <> } + ok-status: ".*" delete-docs-collection: - op: DELETE <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<> + method: DELETE + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" ok-status: "[2-4][0-9][0-9]" create-docs-collection: - op: POST <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections + method: POST + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" body: | { - "name": "<>" + "name": "<>" } rampup: ops: rampup-put: - op: PUT <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{seq_key} + method: PUT + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{seq_key} Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -129,7 +134,9 @@ blocks: # where={"match1":{"$in":[0]}} rampup-get-in: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match1":{"$in":[0]}}]]&page-size=<>&fields=<> + driver: http + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match1":{"$in":[0]}}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -137,7 +144,8 @@ blocks: # where={"match2":{"$nin":["false"]}} rampup-get-not-in: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match2":{"$nin":["false"]}}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match2":{"$nin":["false"]}}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -145,7 +153,8 @@ blocks: # where={"match2":{"$eq":"true"},"match3":{"$ne": false}} rampup-get-mem-and: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match2":{"$eq":"true"},"match3":{"$ne":false}}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match2":{"$eq":"true"},"match3":{"$ne":false}}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -153,7 +162,8 @@ blocks: rampup-get-mem-or: # where={"$or":[{"match1":{"$lt":1}},{"match3":{"$exists":true}}]} - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match3":{"$exists":true}}]}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match3":{"$exists":true}}]}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -161,7 +171,8 @@ blocks: # where={"$and":[{"match1":{"$eq":0}},{"$or":[{"match2":{"$eq":"true"}},{"match3":{"$eq":false}}]}]} rampup-get-complex1: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$and":[{"match1":{"$eq":0}},{"$or":[{"match2":{"$eq":"true"}},{"match3":{"$eq":false}}]}]}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$and":[{"match1":{"$eq":0}},{"$or":[{"match2":{"$eq":"true"}},{"match3":{"$eq":false}}]}]}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -169,7 +180,8 @@ blocks: rampup-get-complex2: # where={"$and":[{"$or":[{"match1":{"$lte":0}},{"match2":{"$eq":"false"}}]},{"$or":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]} - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$and":[{"$or":[{"match1":{"$lte":0}},{"match2":{"$eq":"false"}}]},{"$or":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$and":[{"$or":[{"match1":{"$lte":0}},{"match2":{"$eq":"false"}}]},{"$or":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -177,7 +189,8 @@ blocks: # where={"$or":[{"$and":[{"match1":{"$lte":0}},{"match2":{"$eq":"true"}}]},{"$and":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]} rampup-get-complex3: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$or":[{"$and":[{"match1":{"$lte":0}},{"match2":{"$eq":"true"}}]},{"$and":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$or":[{"$and":[{"match1":{"$lte":0}},{"match2":{"$eq":"true"}}]},{"$and":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -187,7 +200,8 @@ blocks: ops: # where={"match1":{"$in":[0]}} main-get-in: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match1":{"$in":[0]}}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match1":{"$in":[0]}}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -195,7 +209,8 @@ blocks: # where={"match2":{"$nin":["false"]}} main-get-not-in: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match2":{"$nin":["false"]}}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match2":{"$nin":["false"]}}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -203,7 +218,8 @@ blocks: # where={"match2":{"$eq":"true"},"match3":{"$ne": false}} main-get-mem-and: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match2":{"$eq":"true"},"match3":{"$ne":false}}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match2":{"$eq":"true"},"match3":{"$ne":false}}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -211,7 +227,8 @@ blocks: # where={"$or":[{"match1":{"$lt":1}},{"match3":{"$exists":true}}]} main-get-mem-or: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match3":{"$exists":true}}]}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match3":{"$exists":true}}]}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -219,7 +236,8 @@ blocks: # where={"$and":[{"match1":{"$eq":0}},{"$or":[{"match2":{"$eq":"true"}},{"match3":{"$eq":false}}]}]} main-get-complex1: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$and":[{"match1":{"$eq":0}},{"$or":[{"match2":{"$eq":"true"}},{"match3":{"$eq":false}}]}]}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$and":[{"match1":{"$eq":0}},{"$or":[{"match2":{"$eq":"true"}},{"match3":{"$eq":false}}]}]}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -227,7 +245,8 @@ blocks: # where={"$and":[{"$or":[{"match1":{"$lte":0}},{"match2":{"$eq":"false"}}]},{"$or":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]} main-get-complex2: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$and":[{"$or":[{"match1":{"$lte":0}},{"match2":{"$eq":"false"}}]},{"$or":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$and":[{"$or":[{"match1":{"$lte":0}},{"match2":{"$eq":"false"}}]},{"$or":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -235,7 +254,8 @@ blocks: # where={"$or":[{"$and":[{"match1":{"$lte":0}},{"match2":{"$eq":"true"}}]},{"$and":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]} main-get-complex3: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$or":[{"$and":[{"match1":{"$lte":0}},{"match2":{"$eq":"true"}}]},{"$and":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$or":[{"$and":[{"match1":{"$lte":0}},{"match2":{"$eq":"true"}}]},{"$and":[{"match2":{"$eq":"false"}},{"match3":{"$eq":true}}]}]}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" diff --git a/adapter-http/src/main/resources/activities/documents-api/http-docsapi-search-basic.yaml b/adapter-http/src/main/resources/activities/documents-api/http-docsapi-search-basic.yaml index 4443a413a..616b27bd6 100644 --- a/adapter-http/src/main/resources/activities/documents-api/http-docsapi-search-basic.yaml +++ b/adapter-http/src/main/resources/activities/documents-api/http-docsapi-search-basic.yaml @@ -2,9 +2,9 @@ min_version: "4.17.15" description: | This workload emulates basic search operations for the Stargate Documents API. - During the rampup phase, it generates documents, writes them to a table, and then warms up the search paths. + During the rampup phase, it generates documents, writes them to a collection, and then warms up the search paths. During the main phase it performs various basic search filters and times their execution. - Note that stargate_port should reflect the port where the Docs API is exposed (defaults to 8082). + Note that docsapi_port should reflect the port where the Docs API is exposed (defaults to 8180). scenarios: schema: run driver=http tags==block:schema threads==<> cycles==UNDEF @@ -22,10 +22,10 @@ scenarios: bindings: # To enable an optional weighted set of hosts in place of a load balancer # Examples - # single host: stargate_host=host1 - # multiple hosts: stargate_host=host1,host2,host3 - # multiple weighted hosts: stargate_host=host1:3,host2:7 - weighted_hosts: WeightedStrings('<>') + # single host: docsapi_host=host1 + # multiple hosts: docsapi_host=host1,host2,host3 + # multiple weighted hosts: docsapi_host=host1:3,host2:7 + weighted_hosts: WeightedStrings('<>') # http request id request_id: ToHashedUUID(); ToString(); @@ -49,40 +49,45 @@ bindings: blocks: schema: ops: - create-keyspace: - op: POST <>://{weighted_hosts}:<><>/v2/schemas/keyspaces + create-namespace: + method: POST + uri: <>://{weighted_hosts}:<><>/v2/schemas/namespaces Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" body: | { - "name": "<>", + "name": "<>", "replicas": <> } + ok-status: ".*" delete-docs-collection: - op: DELETE <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<> + method: DELETE + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" ok-status: "[2-4][0-9][0-9]" create-docs-collection: - op: POST <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections + method: POST + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" body: | { - "name": "<>" + "name": "<>" } rampup: ops: rampup-put: - op: PUT <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{seq_key} + method: PUT + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>/{seq_key} Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -117,7 +122,8 @@ blocks: # where={"match3":{"$eq":true}} rampup-get-eq: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match3":{"$eq":true}}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match3":{"$eq":true}}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -125,7 +131,8 @@ blocks: # where={"match1":{"$lt":1}} rampup-get-lt: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match1":{"$lt":1}}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match1":{"$lt":1}}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -133,7 +140,8 @@ blocks: # where={"match1":{"$lt":1},"match2":{"$eq":"true"}} rampup-get-and: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match1":{"$lt":1},"match2":{"$eq":"true"}}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match1":{"$lt":1},"match2":{"$eq":"true"}}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -141,7 +149,8 @@ blocks: # where={"$or":[{"match1":{"$lt":1}},{"match3":{"$eq":true}}]} rampup-get-or: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match3":{"$eq":true}}]}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match3":{"$eq":true}}]}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -149,7 +158,8 @@ blocks: # where={"$or":[{"match1":{"$lt":1}},{"match2":{"$eq":"notamatch"}}]} main-get-or-single-match: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match2":{"$eq":"notamatch"}}]}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match2":{"$eq":"notamatch"}}]}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -159,7 +169,8 @@ blocks: main: ops: main-get-eq: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match3":{"$eq":true}}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match3":{"$eq":true}}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -167,7 +178,8 @@ blocks: # where={"match1":{"$lt":1}} main-get-lt: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match1":{"$lt":1}}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match1":{"$lt":1}}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -175,7 +187,8 @@ blocks: # where={"match1":{"$lt":1},"match2":{"$eq":"true"}} main-get-and: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match1":{"$lt":1},"match2":{"$eq":"true"}}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"match1":{"$lt":1},"match2":{"$eq":"true"}}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -183,7 +196,8 @@ blocks: # where={"$or":[{"match1":{"$lt":1}},{"match3":{"$eq":true}}]} main-get-or: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match3":{"$eq":true}}]}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match3":{"$eq":true}}]}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -191,7 +205,8 @@ blocks: # where={"$or":[{"match1":{"$lt":1}},{"match2":{"$eq":"notamatch"}}]} main-get-or-single-match: - op: GET <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match2":{"$eq":"notamatch"}}]}]]&page-size=<>&fields=<> + method: GET + uri: <>://{weighted_hosts}:<><>/v2/namespaces/<>/collections/<>?where=URLENCODE[[{"$or":[{"match1":{"$lt":1}},{"match2":{"$eq":"notamatch"}}]}]]&page-size=<>&fields=<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" diff --git a/adapter-http/src/main/resources/activities/graphql-cql-first/http-graphql-cql-keyvalue.yaml b/adapter-http/src/main/resources/activities/graphql-cql-first/http-graphql-cql-keyvalue.yaml index b14aceea1..37469ac5a 100644 --- a/adapter-http/src/main/resources/activities/graphql-cql-first/http-graphql-cql-keyvalue.yaml +++ b/adapter-http/src/main/resources/activities/graphql-cql-first/http-graphql-cql-keyvalue.yaml @@ -5,7 +5,7 @@ description: | This should be identical to the cql variant except for: - There is no instrumentation with the http driver. - There is no async mode with the http driver. - Note that stargate_port should reflect the port where GraphQL API is exposed (defaults to 8080). + Note that graphql_port should reflect the port where GraphQL API is exposed (defaults to 8080). scenarios: default: @@ -16,10 +16,10 @@ scenarios: bindings: # To enable an optional weighted set of hosts in place of a load balancer # Examples - # single host: stargate_host=host1 - # multiple hosts: stargate_host=host1,host2,host3 - # multiple weighted hosts: stargate_host=host1:3,host2:7 - weighted_hosts: WeightedStrings('<>') + # single host: graphql_host=host1 + # multiple hosts: graphql_host=host1,host2,host3 + # multiple weighted hosts: graphql_host=host1:3,host2:7 + weighted_hosts: WeightedStrings('<>') # http request id request_id: ToHashedUUID(); ToString(); @@ -32,59 +32,58 @@ blocks: schema: ops: create-keyspace: - op: POST <>://{weighted_hosts}:<><>/graphql-schema + method: POST + uri: <>://{weighted_hosts}:<><>/graphql-schema Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" body: | {"query":"mutation {\n createKeyspace(name:\"<>\", replicas: <>, ifNotExists: true)\n}"} + create-table: - op: POST <>://{weighted_hosts}:<><>/graphql-schema - Accept: "application/json" - X-Cassandra-Request-Id: "{request_id}" - X-Cassandra-Token: "<>" - Content-Type: "application/json" - body: | - {"query":"mutation {\n createTable(\n keyspaceName: \"<>\"\n tableName: \"<>\"\n partitionKeys: [{ name: \"key\", type: { basic: TEXT } }]\n values: [{ name: \"value\", type: { basic: TEXT } }]\n ifNotExists: true\n )\n}"} - schema-astra: - ops: - create-table-astra: - op: POST <>://{weighted_hosts}:<><>/graphql-schema + method: POST + uri: <>://{weighted_hosts}:<><>/graphql-schema Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" body: | {"query":"mutation {\n createTable(\n keyspaceName: \"<>\"\n tableName: \"<>\"\n partitionKeys: [{ name: \"key\", type: { basic: TEXT } }]\n values: [{ name: \"value\", type: { basic: TEXT } }]\n ifNotExists: true\n )\n}"} + rampup: ops: rampup-insert: - op: POST <>://{weighted_hosts}:<><>/graphql/<> + method: POST + uri: <>://{weighted_hosts}:<><>/graphql/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" body: | {"query":"mutation {\n insert<>( value: {key: \"{seq_key}\", value: \"{seq_value}\",}) {value {key, value}}}"} + main-read: params: ratio: <> ops: main-select: - op: POST <>://{weighted_hosts}:<><>/graphql/<> + method: POST + uri: <>://{weighted_hosts}:<><>/graphql/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" body: | {"query":"{<>(value: {key: \"{rw_key}\"}) {values {key, value}}}"} + main-write: params: ratio: <> ops: main-write: - op: POST <>://{weighted_hosts}:<><>/graphql/<> + method: POST + uri: <>://{weighted_hosts}:<><>/graphql/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" diff --git a/adapter-http/src/main/resources/activities/graphql-cql-first/http-graphql-cql-tabular.yaml b/adapter-http/src/main/resources/activities/graphql-cql-first/http-graphql-cql-tabular.yaml index 023dfbc00..2549f7ee2 100644 --- a/adapter-http/src/main/resources/activities/graphql-cql-first/http-graphql-cql-tabular.yaml +++ b/adapter-http/src/main/resources/activities/graphql-cql-first/http-graphql-cql-tabular.yaml @@ -6,7 +6,7 @@ description: | - We need to URLEncode the `data` and `data_write` bindings because newlines can't be sent in REST calls. - There is no instrumentation with the http driver. - There is no async mode with the http driver. - Note that stargate_port should reflect the port where GraphQL API is exposed (defaults to 8080). + Note that graphql_port should reflect the port where GraphQL API is exposed (defaults to 8080). scenarios: default: @@ -17,10 +17,10 @@ scenarios: bindings: # To enable an optional weighted set of hosts in place of a load balancer # Examples - # single host: stargate_host=host1 - # multiple hosts: stargate_host=host1,host2,host3 - # multiple weighted hosts: stargate_host=host1:3,host2:7 - weighted_hosts: WeightedStrings('<>') + # single host: graphql_host=host1 + # multiple hosts: graphql_host=host1,host2,host3 + # multiple weighted hosts: graphql_host=host1:3,host2:7 + weighted_hosts: WeightedStrings('<>') # http request id request_id: ToHashedUUID(); ToString(); # for ramp-up and verify @@ -42,59 +42,58 @@ blocks: phase: schema ops: create-keyspace: - op: POST <>://{weighted_hosts}:<><>/graphql-schema + method: POST + uri: <>://{weighted_hosts}:<><>/graphql-schema Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" body: | {"query":"mutation {\n createKeyspace(name:\"<>\", replicas: <>, ifNotExists: true)\n}"} + create-table: - op: POST <>://{weighted_hosts}:<><>/graphql-schema - Accept: "application/json" - X-Cassandra-Request-Id: "{request_id}" - X-Cassandra-Token: "<>" - Content-Type: "application/json" - body: | - {"query":"mutation {\n createTable(\n keyspaceName: \"<>\"\n tableName: \"<>\"\n partitionKeys: [{ name: \"part\", type: { basic: TEXT } }]\n clusteringKeys: [{ name: \"clust\", type: { basic: TEXT } }]\n values: [{ name: \"data\", type: { basic: TEXT } }]\n ifNotExists: true\n )\n}\n"} - schema-astra: - ops: - create-table-astra: - op: POST <>://{weighted_hosts}:<><>/graphql-schema + method: POST + uri: <>://{weighted_hosts}:<><>/graphql-schema Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" body: | {"query":"mutation {\n createTable(\n keyspaceName: \"<>\"\n tableName: \"<>\"\n partitionKeys: [{ name: \"part\", type: { basic: TEXT } }]\n clusteringKeys: [{ name: \"clust\", type: { basic: TEXT } }]\n values: [{ name: \"data\", type: { basic: TEXT } }]\n ifNotExists: true\n )\n}\n"} + rampup: ops: rampup-insert: - op: POST <>://{weighted_hosts}:<><>/graphql/<> + method: POST + uri: <>://{weighted_hosts}:<><>/graphql/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" body: | {"query":"mutation {\n insert<>( value: {part: \"{part_layout}\", clust: \"{clust_layout}\", data: \"{data}\"}) {value {part, clust, data}}}"} + main-read: params: ratio: 5 ops: main-select: - op: POST <>://{weighted_hosts}:<><>/graphql/<> + method: POST + uri: <>://{weighted_hosts}:<><>/graphql/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" body: | {"query":"{<>(value: {part: \"{part_read}\"}, options: { pageSize: <> }) {values {part, clust, data}}}"} + main-write: params: ratio: 5 ops: main-write: - op: POST <>://{weighted_hosts}:<><>/graphql/<> + method: POST + uri: <>://{weighted_hosts}:<><>/graphql/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" diff --git a/adapter-http/src/main/resources/activities/graphql-cql-first/http-graphql-cql-timeseries.yaml b/adapter-http/src/main/resources/activities/graphql-cql-first/http-graphql-cql-timeseries.yaml index 65946bf75..f054bf998 100644 --- a/adapter-http/src/main/resources/activities/graphql-cql-first/http-graphql-cql-timeseries.yaml +++ b/adapter-http/src/main/resources/activities/graphql-cql-first/http-graphql-cql-timeseries.yaml @@ -9,7 +9,7 @@ description: | - Schema creation is cql of the lack of being able to define compaction strategy in the graphql API. - There is no instrumentation with the http driver. - There is no async mode with the http driver. - Note that stargate_port should reflect the port where GraphQL API is exposed (defaults to 8080). + Note that graphql_port should reflect the port where GraphQL API is exposed (defaults to 8080). scenarios: default: @@ -20,10 +20,10 @@ scenarios: bindings: # To enable an optional weighted set of hosts in place of a load balancer # Examples - # single host: stargate_host=host1 - # multiple hosts: stargate_host=host1,host2,host3 - # multiple weighted hosts: stargate_host=host1:3,host2:7 - weighted_hosts: WeightedStrings('<>') + # single host: graphql_host=host1 + # multiple hosts: graphql_host=host1,host2,host3 + # multiple weighted hosts: graphql_host=host1:3,host2:7 + weighted_hosts: WeightedStrings('<>') # http request id request_id: ToHashedUUID(); ToString(); @@ -39,70 +39,59 @@ blocks: params: prepared: false ops: - create-keyspace: | - create keyspace if not exists <> - WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '<>'} - AND durable_writes = true; - create-table : | - create table if not exists <>.<> ( - machine_id UUID, // source machine - sensor_name text, // sensor name - time timestamp, // timestamp of collection - sensor_value double, // - station_id UUID, // source location - data text, - PRIMARY KEY ((machine_id, sensor_name), time) - ) WITH CLUSTERING ORDER BY (time DESC) - AND compression = { 'sstable_compression' : '<>' } - AND compaction = { - 'class': 'TimeWindowCompactionStrategy', - 'compaction_window_size': <>, - 'compaction_window_unit': 'MINUTES' - }; - truncate-table: | - truncate table <>.<>; - schema-astra: - params: - prepared: false - ops: - create-table-astra : | - create table if not exists <>.<> ( - machine_id UUID, // source machine - sensor_name text, // sensor name - time timestamp, // timestamp of collection - sensor_value double, // - station_id UUID, // source location - data text, - PRIMARY KEY ((machine_id, sensor_name), time) - ) WITH CLUSTERING ORDER BY (time DESC); + create-keyspace: + method: POST + uri: <>://{weighted_hosts}:<><>/graphql-schema + Accept: "application/json" + X-Cassandra-Request-Id: "{request_id}" + X-Cassandra-Token: "<>" + Content-Type: "application/json" + body: | + {"query":"mutation {\n createKeyspace(name:\"<>\", replicas: <>, ifNotExists: true)\n}"} + + create-table: + method: POST + uri: <>://{weighted_hosts}:<><>/graphql-schema + Accept: "application/json" + X-Cassandra-Request-Id: "{request_id}" + X-Cassandra-Token: "<>" + Content-Type: "application/json" + body: | + {"query":"mutation {\n createTable(\n keyspaceName: \"<>\"\n tableName: \"<>\"\n partitionKeys: [{ name: \"machine_id\", type: { basic: UUID } }, { name: \"sensor_name\", type: { basic: TEXT } }]\n clusteringKeys: [{ name: \"time\", type: { basic: TIMESTAMP }, order: \"DESC\" }]\n values: [{ name: \"sensor_value\", type: { basic: FLOAT } }, { name: \"station_id\", type: { basic: UUID } }, { name: \"data\", type: { basic: TEXT } }]\n ifNotExists: true\n )\n}\n"} + rampup: ops: rampup-insert: - op: POST <>://{weighted_hosts}:<><>/graphql/<> + method: POST + uri: <>://{weighted_hosts}:<><>/graphql/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" body: | {"query":"mutation insertReading {\n reading: insert<>( value: {machine_id: \"{machine_id}\", sensor_name: \"{sensor_name}\", time: \"{time}\", data: \"{data}\", sensor_value: {sensor_value}, station_id: \"{station_id}\"}) {value {machine_id, sensor_name, time, data, sensor_value, station_id}}}"} + main-read: params: ratio: <> ops: main-select: - op: POST <>://{weighted_hosts}:<><>/graphql/<> + method: POST + uri: <>://{weighted_hosts}:<><>/graphql/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" Content-Type: "application/json" body: | {"query":"query readings {<>(value: {machine_id: \"{machine_id}\",sensor_name: \"{sensor_name}\"}, options: { pageSize: <> }) {values {machine_id, sensor_name, time, data, sensor_value, station_id}}}"} + main-write: params: ratio: <> ops: main-write: - op: POST <>://{weighted_hosts}:<><>/graphql/<> + method: POST + uri: <>://{weighted_hosts}:<><>/graphql/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" diff --git a/adapter-http/src/main/resources/activities/graphql-schema-first/http-graphql-keyvalue.yaml b/adapter-http/src/main/resources/activities/graphql-schema-first/http-graphql-keyvalue.yaml index 47202f142..6c96680b6 100644 --- a/adapter-http/src/main/resources/activities/graphql-schema-first/http-graphql-keyvalue.yaml +++ b/adapter-http/src/main/resources/activities/graphql-schema-first/http-graphql-keyvalue.yaml @@ -9,7 +9,7 @@ description: | - Schema creation GraphQL first, we don't use cql and thus can only create schema with limited options. - There is no instrumentation with the http driver. - There is no async mode with the http driver. - Note that stargate_port should reflect the port where GraphQL API V2 is exposed (defaults to 8080). + Note that graphql_port should reflect the port where GraphQL API V2 is exposed (defaults to 8080). scenarios: default: @@ -20,10 +20,10 @@ scenarios: bindings: # To enable an optional weighted set of hosts in place of a load balancer # Examples - # single host: stargate_host=host1 - # multiple hosts: stargate_host=host1,host2,host3 - # multiple weighted hosts: stargate_host=host1:3,host2:7 - weighted_hosts: WeightedStrings('<>') + # single host: graphql_host=host1 + # multiple hosts: graphql_host=host1,host2,host3 + # multiple weighted hosts: graphql_host=host1:3,host2:7 + weighted_hosts: WeightedStrings('<>') # http request id request_id: ToHashedUUID(); ToString(); seq_key: Mod(<>); ToString() -> String @@ -35,7 +35,8 @@ blocks: schema: ops: create-keyspace: - op: POST <>://{weighted_hosts}:<><>/graphql-schema + method: POST + uri: <>://{weighted_hosts}:<><>/graphql-schema Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -44,20 +45,10 @@ blocks: { "query":"mutation {\n createKeyspace(name: \"<>\", replicas: <>, ifNotExists: true) \n}\n" } + create-gql-schema: - op: POST <>://{weighted_hosts}:<><>/graphql-admin - Accept: "application/json" - X-Cassandra-Request-Id: "{request_id}" - X-Cassandra-Token: "<>" - Content-Type: "application/json" - body: | - { - "query":"mutation {\n deploySchema(keyspace: \"<>\", schema: \"\"\"\n type KeyValue @cql_input {\n key: String! @cql_column(partitionKey: true)\n value: String!\n }\n type Query {\n getKeyValue(\n key: String!,\n ): KeyValue\n }\n type Mutation {\n \t\tinsertKeyValue(keyValue: KeyValueInput): KeyValue\n }\n \"\"\") {\n version\n }\n}\n" - } - schema-astra: - ops: - create-gql-schema: - op: POST <>://{weighted_hosts}:<><>/graphql-admin + method: POST + uri: <>://{weighted_hosts}:<><>/graphql-admin Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -66,10 +57,12 @@ blocks: { "query":"mutation {\n deploySchema(keyspace: \"<>\", schema: \"\"\"\n type KeyValue @cql_input {\n key: String! @cql_column(partitionKey: true)\n value: String!\n }\n type Query {\n getKeyValue(\n key: String!,\n ): KeyValue\n }\n type Mutation {\n \t\tinsertKeyValue(keyValue: KeyValueInput): KeyValue\n }\n \"\"\") {\n version\n }\n}\n" } + rampup: ops: rampup-insert: - op: POST <>://{weighted_hosts}:<><>/graphql/<> + method: POST + uri: <>://{weighted_hosts}:<><>/graphql/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -78,12 +71,14 @@ blocks: { "query":"mutation {\n insertKeyValue(keyValue: {key: \"{seq_key}\", value: \"{seq_value}\"}) {\n key\n value\n }\n}\n" } + main-read: params: ratio: <> ops: main-select: - op: POST <>://{weighted_hosts}:<><>/graphql/<> + method: POST + uri: <>://{weighted_hosts}:<><>/graphql/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -92,12 +87,14 @@ blocks: { "query":"{\n getKeyValue(key: \"rw_key\") {\n key\n value\n }\n}\n" } + main-write: params: ratio: <> ops: main-write: - op: POST <>://{weighted_hosts}:<><>/graphql/<> + method: POST + uri: <>://{weighted_hosts}:<><>/graphql/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" diff --git a/adapter-http/src/main/resources/activities/graphql-schema-first/http-graphql-tabular.yaml b/adapter-http/src/main/resources/activities/graphql-schema-first/http-graphql-tabular.yaml index f3c106b08..d11f80efc 100644 --- a/adapter-http/src/main/resources/activities/graphql-schema-first/http-graphql-tabular.yaml +++ b/adapter-http/src/main/resources/activities/graphql-schema-first/http-graphql-tabular.yaml @@ -11,7 +11,7 @@ description: | - Schema creation GraphQL first, we don't use cql and thus can only create schema with limited options. - There is no instrumentation with the http driver. - There is no async mode with the http driver. - Note that stargate_port should reflect the port where GraphQL API V2 is exposed (defaults to 8080). + Note that graphql_port should reflect the port where GraphQL API V2 is exposed (defaults to 8080). scenarios: default: @@ -22,10 +22,10 @@ scenarios: bindings: # To enable an optional weighted set of hosts in place of a load balancer # Examples - # single host: stargate_host=host1 - # multiple hosts: stargate_host=host1,host2,host3 - # multiple weighted hosts: stargate_host=host1:3,host2:7 - weighted_hosts: WeightedStrings('<>') + # single host: graphql_host=host1 + # multiple hosts: graphql_host=host1,host2,host3 + # multiple weighted hosts: graphql_host=host1:3,host2:7 + weighted_hosts: WeightedStrings('<>') # http request id request_id: ToHashedUUID(); ToString(); # for ramp-up and verify @@ -45,7 +45,8 @@ blocks: schema: ops: create-keyspace: - op: POST <>://{weighted_hosts}:<><>/graphql-schema + method: POST + uri: <>://{weighted_hosts}:<><>/graphql-schema Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -54,20 +55,10 @@ blocks: { "query":"mutation {\n createKeyspace(name: \"<>\", replicas: <>, ifNotExists: true) \n}\n" } + create-gql-schema: - op: POST <>://{weighted_hosts}:<><>/graphql-admin - Accept: "application/json" - X-Cassandra-Request-Id: "{request_id}" - X-Cassandra-Token: "<>" - Content-Type: "application/json" - body: | - { - "query":"mutation {\n deploySchema(keyspace: \"<>\", schema: \"\"\"\n type Tabular @cql_input {\n part: String! @cql_column(partitionKey: true)\n clust: String! @cql_column(partitionKey: true)\n data: String! \n }\n type SelectTabularResult @cql_payload {\n \t\tdata: [Tabular]\n \t\tpagingState: String\n }\n type Query {\n getTabulars(\n part: String!,\n clust: String!,\n pagingState: String @cql_pagingState\n ): SelectTabularResult @cql_select(pageSize: 10)\n }\n type Mutation {\n \t\tinsertTabular(tabular: TabularInput): Tabular\n }\n \"\"\") {\n version\n }\n}\n" - } - schema-astra: - ops: - create-gql-schema: - op: POST <>://{weighted_hosts}:<><>/graphql-admin + method: POST + uri: <>://{weighted_hosts}:<><>/graphql-admin Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -76,10 +67,12 @@ blocks: { "query":"mutation {\n deploySchema(keyspace: \"<>\", schema: \"\"\"\n type Tabular @cql_input {\n part: String! @cql_column(partitionKey: true)\n clust: String! @cql_column(partitionKey: true)\n data: String! \n }\n type SelectTabularResult @cql_payload {\n \t\tdata: [Tabular]\n \t\tpagingState: String\n }\n type Query {\n getTabulars(\n part: String!,\n clust: String!,\n pagingState: String @cql_pagingState\n ): SelectTabularResult @cql_select(pageSize: 10)\n }\n type Mutation {\n \t\tinsertTabular(tabular: TabularInput): Tabular\n }\n \"\"\") {\n version\n }\n}\n" } + rampup: ops: rampup-insert: - op: POST <>://{weighted_hosts}:<><>/graphql/<> + method: POST + uri: <>://{weighted_hosts}:<><>/graphql/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -88,12 +81,14 @@ blocks: { "query":"mutation {\n insertTabular(tabular: {part: \"{part_layout}\", clust: \"{clust_layout}\", data: \"{data}\"}) {\n part\n clust\n data\n }\n}\n" } + main-read: params: ratio: <> ops: main-select: - op: POST <>://{weighted_hosts}:<><>/graphql/<> + method: POST + uri: <>://{weighted_hosts}:<><>/graphql/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -102,12 +97,14 @@ blocks: { "query":"{\n getTabulars(part: \"{part_read}\", clust: \"{clust_read}\") {\n data {\n part\n clust\n data\n }\n pagingState\n }\n}\n" } + main-write: params: ratio: <> ops: main-write: - op: POST <>://{weighted_hosts}:<><>/graphql/<> + method: POST + uri: <>://{weighted_hosts}:<><>/graphql/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" diff --git a/adapter-http/src/main/resources/activities/graphql-schema-first/http-graphql-timeseries.yaml b/adapter-http/src/main/resources/activities/graphql-schema-first/http-graphql-timeseries.yaml index f8c94237b..bad7c9c8a 100644 --- a/adapter-http/src/main/resources/activities/graphql-schema-first/http-graphql-timeseries.yaml +++ b/adapter-http/src/main/resources/activities/graphql-schema-first/http-graphql-timeseries.yaml @@ -15,7 +15,7 @@ description: | - Schema creation GraphQL first, we don't use cql and thus can only create schema with limited options. - There is no instrumentation with the http driver. - There is no async mode with the http driver. - Note that stargate_port should reflect the port where GraphQL API V2 is exposed (defaults to 8080). + Note that graphql_port should reflect the port where GraphQL API V2 is exposed (defaults to 8080). scenarios: default: @@ -26,10 +26,10 @@ scenarios: bindings: # To enable an optional weighted set of hosts in place of a load balancer # Examples - # single host: stargate_host=host1 - # multiple hosts: stargate_host=host1,host2,host3 - # multiple weighted hosts: stargate_host=host1:3,host2:7 - weighted_hosts: WeightedStrings('<>') + # single host: graphql_host=host1 + # multiple hosts: graphql_host=host1,host2,host3 + # multiple weighted hosts: graphql_host=host1:3,host2:7 + weighted_hosts: WeightedStrings('<>') # http request id request_id: ToHashedUUID(); ToString(); machine_id: Mod(<>); ToHashedUUID() -> java.util.UUID @@ -43,7 +43,8 @@ blocks: schema: ops: create-keyspace: - op: POST <>://{weighted_hosts}:<><>/graphql-schema + method: POST + uri: <>://{weighted_hosts}:<><>/graphql-schema Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -52,8 +53,10 @@ blocks: { "query":"mutation {\n createKeyspace(name: \"<>\", replicas: <>, ifNotExists: true) \n}\n" } + create-gql-schema: - op: POST <>://{weighted_hosts}:<><>/graphql-admin + method: POST + uri: <>://{weighted_hosts}:<><>/graphql-admin Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -62,24 +65,12 @@ blocks: { "query":"mutation {\n deploySchema(keyspace: \"<>\", schema: \"\"\"\n type Iot @cql_input {\n machine_id: Uuid! @cql_column(partitionKey: true)\n sensor_name: String! @cql_column(partitionKey: true)\n time: Timestamp! @cql_column(clusteringOrder: DESC)\n sensor_value: Float!\n \tstation_id: Uuid!\n data: String!\n }\n type SelectIotResult @cql_payload {\n \t\tdata: [Iot]\n \t\tpagingState: String\n }\n type Query {\n getIots(\n machine_id: Uuid!,\n sensor_name: String!,\n pagingState: String @cql_pagingState\n ): SelectIotResult @cql_select(pageSize: 10)\n }\n type Mutation {\n \t\tinsertIot(iot: IotInput): Iot\n }\n \"\"\") {\n version\n }\n}\n" } - schema-astra: - ops: - create-gql-schema: - op: POST <>://{weighted_hosts}:<><>/graphql-admin - Accept: "application/json" - X-Cassandra-Request-Id: "{request_id}" - X-Cassandra-Token: "<>" - Content-Type: "application/json" - body: | - { - "query":"mutation {\n deploySchema(namespace: \"<>\", schema: \"\"\"\n type Iot @cql_input {\n machine_id: Uuid! @cql_column(partitionKey: true)\n sensor_name: String! @cql_column(partitionKey: true)\n time: Timestamp! @cql_column(clusteringOrder: DESC)\n sensor_value: Float!\n \tstation_id: Uuid!\n data: String!\n }\n type SelectIotResult @cql_payload {\n \t\tdata: [Iot]\n \t\tpagingState: String\n }\n type Query {\n getIots(\n machine_id: Uuid!,\n sensor_name: String!,\n pagingState: String @cql_pagingState\n ): SelectIotResult @cql_select(pageSize: 10)\n }\n type Mutation {\n \t\tinsertIot(iot: IotInput): Iot\n }\n \"\"\") {\n version\n }\n}\n" - } - tags: - name: create-gql-schema + rampup: ops: rampup-insert: - op: POST <>://{weighted_hosts}:<><>/graphql/<> + method: POST + uri: <>://{weighted_hosts}:<><>/graphql/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -94,7 +85,8 @@ blocks: ratio: <> ops: main-select: - op: POST <>://{weighted_hosts}:<><>/graphql/<> + method: POST + uri: <>://{weighted_hosts}:<><>/graphql/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>" @@ -109,7 +101,8 @@ blocks: ratio: <> ops: main-write: - op: POST <>://{weighted_hosts}:<><>/graphql/<> + method: POST + uri: <>://{weighted_hosts}:<><>/graphql/<> Accept: "application/json" X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Token: "<>"