merge fixups - partial

This commit is contained in:
Jonathan Shook
2021-07-20 18:26:13 -05:00
54 changed files with 388 additions and 273 deletions

View File

@@ -12,7 +12,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -21,7 +21,7 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>nb-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
@@ -117,7 +117,7 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>virtdata-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
</dependencies>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>io.nosqlbench</groupId>
<artifactId>mvn-defaults</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -21,7 +21,7 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-jdbc</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>

View File

@@ -4,12 +4,15 @@ description: An example of a basic cockroach insert
scenarios:
default:
- run driver=cockroachdb tags==phase:main threads==auto cycles===<<main-cycles:1000000>>
- run driver=cockroachdb tags==phase:main threads=auto cycles===<<main-cycles:1000000>>
serverName=localhost connectionpool=hikari
errors=SQLTransient.*:warn,count,retry;.*0800.*:warn,count,retry;.*40001:count,retry;stop
rampup:
- run driver=cockroachdb tags==phase:rampup threads==auto cycles===<<rampup-cycles:1000000>>
- run driver=cockroachdb tags==phase:rampup threads=auto cycles===<<rampup-cycles:1000000>>
serverName=localhost connectionpool=hikari
errors=SQLTransient.*:warn,count,retry;.*0800.*:warn,count,retry;.*40001:count,retry;stop
schema:
- run driver=cockroachdb tags==phase:schema threads==1 cycles===2
#- run driver=stdout tags==phase:schema threads==1 cycles===UNDEF
- run driver=cockroachdb tags==phase:schema threads===1 serverName=localhost
bindings:
seq_key: Mod(<<keyCount:1000000>>L); ToInt()
@@ -39,7 +42,10 @@ blocks:
phase: rampup
params:
statements:
- rampup-insert: insert into <<database:bank>>.<<table:banktransaction>> ( code, amount ) values ( '{seq_key}', {seq_value} );
- rampup-insert: |
INSERT INTO "<<database:bank>>"."<<table:banktransaction>>"
(code, amount) VALUES ('{seq_key}', {seq_value})
ON CONFLICT (code) DO NOTHING;
params:
tags:
name: rampup-insert
@@ -51,7 +57,8 @@ blocks:
ratio: <<read_ratio:1>>
statements:
- main-find: |
SELECT code, amount FROM <<database:bank>>.<<table:banktransaction>> WHERE code = '{rw_key}' AND amount = {rw_value};
SELECT code, amount FROM "<<database:bank>>"."<<table:banktransaction>>"
WHERE code = '{rw_key}' AND amount = {rw_value};
params:
tags:
name: main-find
@@ -63,7 +70,7 @@ blocks:
ratio: <<write_ratio:1>>
statements:
- main-insert: |
UPDATE <<database:bank>>.<<table:banktransaction>> SET amount = {seq_value} WHERE code = '{seq_key}';
UPDATE "<<database:bank>>"."<<table:banktransaction>>" SET amount = {seq_value} WHERE code = '{seq_key}';
params:
tags:
name: main-insert

View File

@@ -1,24 +1,27 @@
# java -jar nb.jar run driver=cockroachdb workload=postgres-basic tags=phase:rampup cycles=10 \
# serverName=localhost databaseName=bank
# java -jar nb.jar run driver=cockroachdb workload=postgres-basic tags=phase:main cycles=10 serverName=localhost
# java -jar nb.jar run driver=cockroachdb workload=postgres-basic tags=phase:main cycles=10 serverName=localhost
description: An example of a basic postgres bank transaction workload
scenarios:
default:
- run driver===cockroachdb tags===phase:main threads==auto cycles=10000000
serverName=localhost portNumber=5432 databaseName=<<database:bank>> user=postgres
password=postgres
rampup:
- run driver===cockroachdb tags===phase:rampup threads==auto cycles=<<accounts:1000000>>
serverName=localhost portNumber=5432 databaseName=<<database:bank>> user=postgres
password=postgres connectionpool=hikari filler-binding="AlphaNumericString(10)"
rampup-large:
- run driver===cockroachdb tags===phase:rampup threads==auto cycles=<<accounts:1000000>>
- run driver===cockroachdb tags===phase:main threads=auto cycles=10000000
serverName=localhost portNumber=5432 databaseName=<<database:bank>> user=postgres
password=postgres connectionpool=hikari
errors=SQLTransient.*:warn,count,retry;.*0800.*:warn,count,retry;stop
rampup:
- run driver===cockroachdb tags===phase:rampup threads=auto cycles=<<accounts:1000000>>
serverName=localhost portNumber=5432 databaseName=<<database:bank>> user=postgres
password=postgres connectionpool=hikari filler-binding="AlphaNumericString(10)"
errors=SQLTransient.*:warn,count,retry;.*0800.*:warn,count,retry;stop
rampup-large:
- run driver===cockroachdb tags===phase:rampup threads=auto cycles=<<accounts:1000000>>
serverName=localhost portNumber=5432 databaseName=<<database:bank>> user=postgres
password=postgres connectionpool=hikari
errors=SQLTransient.*:warn,count,retry;.*0800.*:warn,count,retry;stop
schema:
- run driver===cockroachdb tags===phase:schema threads===1 serverName=localhost portNumber=5432
databaseName=bank user=postgres password=postgres connectionpool=hikari
databaseName=bank user=postgres password=postgres
bindings:
seq_uuid: Mod(<<accounts:1000000>>L); ToHashedUUID()
@@ -55,7 +58,7 @@ blocks:
params:
statements:
- rampup-insert: |
INSERT INTO "<<table:account>>" (uuid, amount, amount_unit, updated_at, created_at, filler)
INSERT INTO "<<table:account>>" (uuid, amount, amount_unit, updated_at, created_at, filler)
VALUES ('{seq_uuid}', {rand_amount}, 'us_cents', '{timestamp}', '{timestamp}', '{filler}')
ON CONFLICT DO NOTHING;
params:

View File

@@ -21,6 +21,30 @@ section for detailed parameter documentation.
* *hikari* -
use [HikariCP](https://github.com/brettwooldridge/HikariCP)
* **maxtries** (optional) - number of times to retry retry-able errors; Default *3*.
* **errors** (optional) - expression which specifies how to handle SQL state error codes.
Expression syntax and behavior is explained in the `error-handlers` topic. Default
*stop*, in other words exit on any error.
* **minretrydelayms** (optional) - minimum time in ms to wait before retry with exponential backoff; Default *200*.
* **errors** (optional) - see `error-handlers` topic for details (`./nb help error-handlers`). Default *stop*.
#### errors parameter
This parameter expects an expression which specifies how to handle exceptions by class name
and SQL state code. Error names are formatted as `<exception-name>_<sql-state>`.
For example, a *org.postgresql.util.PSQLException* with *SQLState=80001* will be formatted `PSQLException_80001`.
To continue on such an error, use `errors=PQLException_80001:warn,count;stop`. To retry any
*java.sql.SQLTransientException* or any *SQLState=80001* and otherwise stop, use
`errors=SQLTransientException.*:warn,count,retry;.*80001:warn,count,retry;stop`.
See scenario implementations in workloads `cockroachdb-basic` and `postgres-basic` for reasonable defaults
of the errors parameter. This is a reasonable default error handler chain:
1. `SQLTransient.*:warn,count,retry` - log, emit metric, and retry on transient errors
([java.sql doc](https://docs.oracle.com/javase/8/docs/api/java/sql/SQLTransientException.html))
2. `.*0800.*:warn,count,retry` - log, emit metric, and retry on "connection exception" class of postgresql driver
SQLState codes ([postgresql java doc](https://www.postgresql.org/docs/9.4/errcodes-appendix.html))
3. `.*40001:count,retry` - emit metric and retry on "serialization error" SQLState code of postgresql driver
([postgresql java doc](https://www.postgresql.org/docs/9.4/errcodes-appendix.html)).
These are common with CockroachDB
([doc](https://www.cockroachlabs.com/docs/stable/error-handling-and-troubleshooting.html#transaction-retry-errors)).
4. `stop` - stop the activity for any other error or if max retries are exceeded

View File

@@ -7,9 +7,11 @@ import org.postgresql.util.PSQLException;
import org.postgresql.util.PSQLState;
import java.net.SocketTimeoutException;
import java.net.URI;
import java.net.URL;
import java.sql.SQLException;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.*;
public class CockroachActivityTest {
@Test
@@ -19,12 +21,16 @@ public class CockroachActivityTest {
// When the Throwable is a SQLException, the error name should be getSQLState()
Throwable sqlException = new SQLException("my test exception", "my-test-sql-state");
assertEquals("my-test-sql-state", activity.errorNameMapper(sqlException));
assertEquals("SQLException_my-test-sql-state", activity.errorNameMapper(sqlException));
// See PSQLState to string code mapping at the Github source code website
// https://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/src/main/java/org/postgresql/util/PSQLState.java
Throwable psqlException = new PSQLException("retry transaction", PSQLState.CONNECTION_FAILURE);
assertEquals("08006", activity.errorNameMapper(psqlException));
assertEquals("PSQLException_08006", activity.errorNameMapper(psqlException));
// When SQLState is null or empty, suffix shouldn't be underscore
Throwable nullSQLState = new PSQLException("my test runtime exception", null);
assertEquals("PSQLException", activity.errorNameMapper(nullSQLState));
// When Throwable is not a SQLException, the error name should be the class name
Throwable runtimeException = new SocketTimeoutException("my test runtime exception");

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>io.nosqlbench</groupId>
<artifactId>mvn-defaults</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -20,16 +20,10 @@
<!-- core dependencies -->
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
@@ -53,6 +47,12 @@
<groupId>com.datastax.dse</groupId>
<artifactId>dse-java-driver-graph</artifactId>
<version>1.9.0</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- For CQL compression option -->
@@ -77,8 +77,14 @@
<artifactId>netty-codec-haproxy</artifactId>
<version>4.1.54.Final</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.52-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<!-- <dependency>-->
<!-- <dependency>-->
<!-- <groupId>io.netty</groupId>-->
<!-- <artifactId>netty-transport-native-epoll</artifactId>-->
<!-- <version>4.1.47.Final</version>-->

View File

@@ -251,7 +251,7 @@ public class CqlActivity extends SimpleActivity implements Activity, ActivityDef
simpleStatement.setIdempotent(i);
});
template = new ReadyCQLStatementTemplate(fconfig, getSession(), simpleStatement, ratio,
stmtDef.getName(), parameterized, null, null);
stmtDef.getName(), parameterized);
}
Element params = stmtDef.getParamReader();

View File

@@ -30,34 +30,41 @@ activity types.
- **cqldriver** - default: dse - The type of driver to use, either dse, or oss. If you need DSE-specific features, use
the dse driver. If you are connecting to an OSS Apache Cassandra cluster, you must use the oss driver. The oss driver
option is only available in nosqlbench.
- **host** - The host or hosts to use for connection points to
the cluster. If you specify multiple values here, use commas
with no spaces.
Examples:
- `host=192.168.1.25`
- `host=192.168.1.25,testhost42`
- **workload** - The workload definition which holds the schema and statement defs.
see workload yaml location for additional details
(no default, required)
- **port** - The port to connect with
- **cl** - An override to consistency levels for the activity. If
this option is used, then all consistency levels will be replaced
by this one for the current activity, and a log line explaining
the difference with respect to the yaml will be emitted.
This is not a dynamic parameter. It will only be applied at
activity start.
- **cbopts** - default: none - this is how you customize the cluster
settings for the client, including policies, compression, etc. This
is a string of *Java*-like method calls just as you would use them
in the Cluster.Builder fluent API. They are evaluated inline
with the default Cluster.Builder options not covered below.
Example: cbopts=".withCompression(ProtocolOptions.Compression.NONE)"
- **whitelist** default: none - Applies a whitelist policy to the load balancing
policy in the driver. If used, a WhitelistPolicy(RoundRobinPolicy())
will be created and added to the cluster builder on startup.
Examples:
- `whitelist=127.0.0.1`
- `whitelist=127.0.0.1:9042,127.0.0.2:1234`
- **retrypolicy** default: none - Applies a retry policy in the driver
The only option supported for this version is `retrypolicy=logging`,
which uses the default retry policy, but with logging added.
@@ -119,22 +126,29 @@ activity types.
Examples:
- tokens=1:10000,100000:1000000
- tokens=1:123456
- **maxtries** - default: 10 - how many times an operation may be
attempted before it is disregarded
- **maxpages** - default: 1 - how many pages can be read from a query which
is larger than the fetchsize. If more than this number of pages
is required for such a query, then an UnexpectedPaging excpetion
is passed to the error handler as explained below.
- **fetchsize** - controls the driver parameter of the same name.
Suffixed units can be used here, such as "50K". If this parameter
is not present, then the driver option is not set.
- **cycles** - standard, however the cql activity type will default
this to however many statements are included in the current
activity, after tag filtering, etc.
- **username** - the user to authenticate as. This option requires
that one of **password** or **passfile** also be defined.
- **password** - the password to authenticate with. This will be
ignored if passfile is also present.
- **passfile** - the file to read the password from. The first
line of this file is used as the password.
@@ -147,8 +161,10 @@ activity types.
Examples:
- `jmxreporting=true`
- `jmxreporting=false` (the default)
- **alias** - this is a standard nosqlbench parameter, however the cql type will use the workload value also as the
alias value when not specified.
- **errors** - error handler configuration.
(default errors=stop,retryable->retry,unverified->stop)
Examples:
@@ -157,9 +173,11 @@ activity types.
- errors=warn,retryable=count
See the separate help on 'cqlerrors' for detailed
configuration options.
- **defaultidempotence** - sets default idempotence on the
driver options, but only if it has a value.
(default unset, valid values: true or false)
- **speculative** - sets the speculative retry policy on the cluster.
(default unset)
This can be in one of the following forms:
@@ -177,6 +195,7 @@ activity types.
(E default to 5 when left out)
Examples:
- 100ms:5 - constant threshold of 100ms and 5 allowed executions
- **seq** - selects the statement sequencer used with statement ratios.
(default: bucket)
(options: concat | bucket | interval)
@@ -190,6 +209,7 @@ activity types.
it works.
All of the sequencers create deterministic schedules which use an internal
lookup table for indexing into a list of possible statements.
- **trace** - enables a trace on a subset of operations. This is disabled
by default.
Examples:
@@ -199,18 +219,23 @@ activity types.
The above traces every 1000th cycle to stdout.
If the trace log is not specified, then 'tracelog' is assumed.
If the filename is specified as stdout, then traces are dumped to stdout.
- **sessionid** - names the configuration to be used for this activity. Within a given scenario, any activities that use
the same name for clusterid will share a session and cluster. default: 'default'
- **drivermetrics** - enable reporting of driver metrics.
default: false
- **driverprefix** - set the metrics name that will prefix all CQL driver metrics.
default: 'driver.*clusterid*.'
The clusterid specified is included so that separate cluster and session
contexts can be reported independently for advanced tests.
- **usercodecs** - enable the loading of user codec libraries for more
details see: com.datastax.codecs.framework.UDTCodecInjector in the
nosqlbench code base. This is for dynamic codec loading with
user-provided codecs mapped via the internal UDT APIs. default: false
- **secureconnectbundle** - used to connect to CaaS, accepts a path to the
secure connect bundle that is downloaded from the CaaS UI. Examples:
- `secureconnectbundle=/tmp/secure-connect-my_db.zip`
@@ -223,16 +248,20 @@ activity types.
- **insights** - Set to false to disable the driver from sending insights
monitoring information
- `insights=false`
- **tickduration** - sets the tickDuration (milliseconds) of
HashedWheelTimer of the java driver. This timer is used to schedule
speculative requests. Examples:
- `tickduration=10`
- `tickduration=100` (driver default value)
- **compression** - sets the transport compression to use for this
activity. Valid values are 'LZ4' and 'SNAPPY'. Both types are bundled
with EBDSE.
- **showcql** - logs cql statements as INFO (to see INFO messages in stdout use -v or greater) Note: this is expensive
and should only be done to troubleshoot workloads. Do not use `showcql` for your tests.
- **lbp** - configures the load balancing policies for the Java driver. With this parameter, you can
configure nested load balancing policies in short-hand form.
@@ -360,21 +389,28 @@ now **they are limited to a YAML params block**:
- alias.result - A timer which tracks the performance of an op result
only. This is the async get on the future, broken out as a separate
step.
- alias.result-success - A timer that records rate and histograms of the
time it takes from submitting a query to completely reading the result
set that it returns, across all pages. This metric is only counted for
non-exceptional results, while the result metric above includes
all operations.
- alias.bind - A timer which tracks the performance of the statement
binding logic, including the generation of data immediately prior
- alias.execute - A timer which tracks the performance of op submission
only. This is the async execution call, broken out as a separate step.
- alias.tries - A histogram of how many tries were required to get a
completed operation
- alias.pages - A timer which tracks the performance of paging, specific
to more than 1-page query results. i.e., if all reads return within 1
page, this metric will not have any data.
- alias.strides - A timer around each stride of operations within a thread
- alias.skipped-tokens - A histogram that records the count and cycle values
of skipped tokens.

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>io.nosqlbench</groupId>
<artifactId>mvn-defaults</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -21,16 +21,10 @@
<!-- core dependencies -->
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
@@ -73,8 +67,14 @@
<artifactId>netty-codec-haproxy</artifactId>
<version>4.1.54.Final</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.52-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<!-- <dependency>-->
<!-- <dependency>-->
<!-- <groupId>io.netty</groupId>-->
<!-- <artifactId>netty-transport-native-epoll</artifactId>-->
<!-- <version>4.1.47.Final</version>-->

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>io.nosqlbench</groupId>
<artifactId>mvn-defaults</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -24,13 +24,13 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-cql-shaded</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
</dependencies>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -17,17 +17,18 @@
</description>
<dependencies>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.52-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@@ -19,8 +19,8 @@ import io.nosqlbench.engine.api.activityapi.core.ActionDispenser;
import io.nosqlbench.engine.api.activityapi.core.ActivityType;
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
import io.nosqlbench.nb.annotations.Service;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
/**
* The DiagActivity, aka "diag", is simply a diagnostic activity.

View File

@@ -4,7 +4,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -21,13 +21,7 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<scope>compile</scope>
<version>4.15.52-SNAPSHOT</version>
</dependency>
</dependencies>

View File

@@ -4,7 +4,7 @@
<parent>
<groupId>io.nosqlbench</groupId>
<artifactId>mvn-defaults</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -20,22 +20,22 @@
<!-- core dependencies -->
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.datastax.dse</groupId>
<artifactId>dse-java-driver-graph</artifactId>
<version>1.9.0</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
@@ -117,6 +117,12 @@
<artifactId>snakeyaml</artifactId>
<version>1.23</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.52-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@@ -4,7 +4,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults/pom.xml</relativePath>
</parent>
@@ -18,16 +18,10 @@
<dependencies>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>

View File

@@ -4,7 +4,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -19,17 +19,17 @@
<dependencies>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.52-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@@ -4,8 +4,8 @@ import io.nosqlbench.engine.api.activityapi.core.ActionDispenser;
import io.nosqlbench.engine.api.activityapi.core.ActivityType;
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
import io.nosqlbench.nb.annotations.Service;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@Service(value = ActivityType.class, selector = "http")
public class HttpActivityType implements ActivityType<HttpActivity> {

View File

@@ -3,7 +3,7 @@
<parent>
<artifactId>nosqlbench</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -15,13 +15,15 @@
<artifactId>HikariCP</artifactId>
<version>3.4.5</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<scope>compile</scope>
<version>4.15.52-SNAPSHOT</version>
</dependency>
</dependencies>
</project>

View File

@@ -1,6 +1,5 @@
package io.nosqlbench.activitytype.jdbc.api;
import com.codahale.metrics.Counter;
import com.codahale.metrics.Histogram;
import com.codahale.metrics.Timer;
import com.zaxxer.hikari.HikariConfig;
@@ -11,7 +10,6 @@ import io.nosqlbench.engine.api.activityimpl.ActivityDef;
import io.nosqlbench.engine.api.activityimpl.OpDispenser;
import io.nosqlbench.engine.api.activityimpl.SimpleActivity;
import io.nosqlbench.engine.api.metrics.ActivityMetrics;
import io.nosqlbench.engine.api.metrics.ExceptionCountMetrics;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -28,6 +26,7 @@ public abstract class JDBCActivity extends SimpleActivity {
private Timer resultSuccessTimer;
private Histogram triesHisto;
private int maxTries;
private int minRetryDelayMs;
protected DataSource dataSource;
protected OpSequence<OpDispenser<String>> opSequence;
@@ -47,6 +46,7 @@ public abstract class JDBCActivity extends SimpleActivity {
super.onActivityDefUpdate(activityDef);
this.maxTries = getParams().getOptionalInteger("maxtries").orElse(3);
this.minRetryDelayMs = getParams().getOptionalInteger("minretrydelayms").orElse(200);
LOGGER.debug("initializing data source");
dataSource = newDataSource();
@@ -79,10 +79,15 @@ public abstract class JDBCActivity extends SimpleActivity {
}
public String errorNameMapper(Throwable e) {
StringBuilder sb = new StringBuilder(e.getClass().getSimpleName());
if (e instanceof SQLException) {
return ((SQLException) e).getSQLState();
String sqlState = ((SQLException) e).getSQLState();
if (sqlState != null && !sqlState.isEmpty()) {
sb.append('_');
sb.append(sqlState);
}
}
return e.getClass().getSimpleName();
return sb.toString();
}
@Override
@@ -94,6 +99,10 @@ public abstract class JDBCActivity extends SimpleActivity {
return this.maxTries;
}
public int getMinRetryDelayMs() {
return this.minRetryDelayMs;
}
public DataSource getDataSource() {
return dataSource;
}

View File

@@ -40,9 +40,9 @@ public class JDBCAction implements SyncAction {
}
int maxTries = activity.getMaxTries();
Exception error = null;
for (int tries = 1; tries <= maxTries; tries++) {
Exception error = null;
long startTimeNanos = System.nanoTime();
try (Connection conn = activity.getDataSource().getConnection()) {
@@ -65,12 +65,31 @@ public class JDBCAction implements SyncAction {
ErrorDetail detail = activity.getErrorHandler().handleError(error, cycle, executionTimeNanos);
if (!detail.isRetryable()) {
LOGGER.debug("Exit failure after non-retryable error");
return 1;
throw new RuntimeException("non-retryable error", error);
}
}
try {
int retryDelay = retryDelayMs(tries, activity.getMinRetryDelayMs());
LOGGER.debug("tries=" + tries + " sleeping for " + retryDelay + " ms");
Thread.sleep(retryDelay);
} catch (InterruptedException e) {
throw new RuntimeException("thread interrupted", e);
}
}
LOGGER.debug("Exit failure after maxretries=" + maxTries);
return 1;
throw new RuntimeException("maxtries exceeded", error);
}
/**
* Compute retry delay based on exponential backoff with full jitter
* @param tries 1-indexed
* @param minDelayMs lower bound of retry delay
* @return retry delay
*/
private int retryDelayMs(int tries, int minDelayMs) {
int exponentialDelay = minDelayMs * (int) Math.pow(2.0, tries - 1);
return (int) (Math.random() * exponentialDelay);
}
}

View File

@@ -4,7 +4,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -39,14 +39,14 @@
<!-- core dependencies -->
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<artifactId>drivers-api</artifactId>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-stdout</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -22,14 +22,15 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.52-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
</dependency>
</dependencies>

View File

@@ -4,7 +4,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -41,16 +41,10 @@
<version>5.5.1</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-stdout</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<!-- <dependency>-->

View File

@@ -7,7 +7,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -18,16 +18,11 @@
</description>
<dependencies>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
@@ -35,6 +30,12 @@
<artifactId>mongodb-driver-sync</artifactId>
<version>4.0.3</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.52-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@@ -4,7 +4,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -37,16 +37,10 @@
<version>${pulsar.version}</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-stdout</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-beanutils/commons-beanutils -->

View File

@@ -7,7 +7,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -19,17 +19,17 @@
<dependencies>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.52-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@@ -7,7 +7,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -21,22 +21,16 @@
<dependencies>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-stdout</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
</dependencies>

View File

@@ -7,7 +7,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -19,16 +19,10 @@
<dependencies>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
@@ -72,6 +66,12 @@
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.52-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>

View File

@@ -5,7 +5,7 @@ import io.nosqlbench.engine.api.activityconfig.rawyaml.RawStmtsLoader;
import io.nosqlbench.engine.api.activityconfig.yaml.Scenarios;
import io.nosqlbench.engine.api.activityconfig.yaml.StmtsDocList;
import io.nosqlbench.engine.api.templating.StrInterpolator;
import io.nosqlbench.nb.api.config.Synonyms;
import io.nosqlbench.nb.api.config.params.Synonyms;
import io.nosqlbench.nb.api.content.Content;
import io.nosqlbench.nb.api.content.NBIO;
import io.nosqlbench.nb.api.content.NBPathsAPI;

View File

@@ -4,7 +4,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -23,13 +23,13 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-core</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-docker</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
</dependencies>

View File

@@ -343,6 +343,10 @@ public class NBCLI {
logger.info("console logging level is " + options.getConsoleLogLevel());
ScenariosExecutor executor = new ScenariosExecutor("executor-" + sessionName, 1);
if (options.getConsoleLogLevel().isGreaterOrEqualTo(NBLogLevel.WARN)) {
options.setWantsStackTraces(true);
logger.debug("enabling stack traces since log level is " + options.getConsoleLogLevel());
}
Scenario scenario = new Scenario(
sessionName,

View File

@@ -173,6 +173,10 @@ public class NBCLIOptions {
return reportSummaryTo;
}
public void setWantsStackTraces(boolean wantsStackTraces) {
this.showStackTraces=wantsStackTraces;
}
public enum Mode {
ParseGlobalsOnly,
ParseAllOptions
@@ -382,7 +386,7 @@ public class NBCLIOptions {
selected = path;
break;
} else {
System.err.println("ERROR: possible state dir path is not a directory: '" + path.toString() + "'");
System.err.println("ERROR: possible state dir path is not a directory: '" + path + "'");
}
}
}
@@ -397,7 +401,7 @@ public class NBCLIOptions {
PosixFilePermissions.asFileAttribute(PosixFilePermissions.fromString("rwxrwx---"))
);
} catch (IOException e) {
throw new BasicError("Could not create state directory at '" + selected.toString() + "': " + e.getMessage());
throw new BasicError("Could not create state directory at '" + selected + "': " + e.getMessage());
}
}

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -21,7 +21,7 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
</dependencies>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -28,13 +28,13 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
@@ -85,7 +85,7 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-clients</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<scope>compile</scope>
</dependency>

View File

@@ -4,7 +4,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -56,7 +56,7 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
</dependencies>

View File

@@ -4,7 +4,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -28,7 +28,7 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>docsys</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
</dependencies>

View File

@@ -4,7 +4,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -22,7 +22,7 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
</dependencies>

View File

@@ -4,7 +4,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -21,33 +21,21 @@
<dependencies>
<dependency>
<groupId>io.swagger</groupId>
<groupId>io.swagger.parser.v3</groupId>
<artifactId>swagger-parser</artifactId>
<version>2.0.0-rc1</version>
<version>2.0.27</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-models</artifactId>
<version>2.0.0-rc2</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-core</artifactId>
<version>2.0.0-rc2</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-parser-v3</artifactId>
<version>2.0.0-rc1</version>
<version>2.1.10</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-cli</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
</dependencies>

View File

@@ -6,8 +6,8 @@ import io.nosqlbench.docsys.api.WebServiceObject;
import io.nosqlbench.engine.rest.services.openapi.OpenApiLoader;
import io.nosqlbench.nb.annotations.Service;
import io.swagger.parser.OpenAPIParser;
import io.swagger.parser.v2.SwaggerConverter;
import io.swagger.util.Json;
import io.swagger.v3.parser.converter.SwaggerConverter;
import jakarta.inject.Singleton;
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;

View File

@@ -4,13 +4,13 @@ import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import io.nosqlbench.nb.api.content.Content;
import io.nosqlbench.nb.api.content.NBIO;
import io.swagger.oas.models.OpenAPI;
import io.swagger.oas.models.Operation;
import io.swagger.oas.models.PathItem;
import io.swagger.oas.models.Paths;
import io.swagger.parser.OpenAPIParser;
import io.swagger.parser.models.ParseOptions;
import io.swagger.parser.models.SwaggerParseResult;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.oas.models.PathItem;
import io.swagger.v3.oas.models.Paths;
import io.swagger.v3.parser.core.models.ParseOptions;
import io.swagger.v3.parser.core.models.SwaggerParseResult;
import org.yaml.snakeyaml.DumperOptions;
import org.yaml.snakeyaml.Yaml;
import org.yaml.snakeyaml.introspector.BeanAccess;

View File

@@ -1,16 +1,16 @@
package io.nosqlbench.engine.rest.services.openapi;
import io.swagger.oas.models.OpenAPI;
import io.swagger.oas.models.Operation;
import io.swagger.oas.models.PathItem;
import io.swagger.oas.models.Paths;
import io.swagger.oas.models.headers.Header;
import io.swagger.oas.models.links.Link;
import io.swagger.oas.models.media.Schema;
import io.swagger.oas.models.parameters.Parameter;
import io.swagger.oas.models.parameters.RequestBody;
import io.swagger.oas.models.responses.ApiResponse;
import io.swagger.oas.models.responses.ApiResponses;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.oas.models.PathItem;
import io.swagger.v3.oas.models.Paths;
import io.swagger.v3.oas.models.headers.Header;
import io.swagger.v3.oas.models.links.Link;
import io.swagger.v3.oas.models.media.Schema;
import io.swagger.v3.oas.models.parameters.Parameter;
import io.swagger.v3.oas.models.parameters.RequestBody;
import io.swagger.v3.oas.models.responses.ApiResponse;
import io.swagger.v3.oas.models.responses.ApiResponses;
import java.lang.reflect.Method;
import java.util.ArrayList;
@@ -222,10 +222,12 @@ public class OpenApiView {
}
for (String linkKey : links.keySet()) {
Link modelLink = model.getComponents().getLinks().get(linkKey);
RequestBody body = modelLink.getRequestBody();
while (body.get$ref() != null) {
body = model.getComponents().getRequestBodies().get(body.get$ref());
}
// RequestBody body = modelLink.getRequestBody();
// while (body.get$ref() != null) {
// body = model.getComponents().getRequestBodies().get(body.get$ref());
// }
Object body = modelLink.getRequestBody();
modelLink.setRequestBody(body);
}
}

View File

@@ -1,8 +1,8 @@
package io.nosqlbench.engine.rest.services.openapi;
import io.swagger.oas.models.Operation;
import io.swagger.oas.models.PathItem;
import io.swagger.oas.models.parameters.Parameter;
import io.swagger.v3.oas.models.Operation;
import io.swagger.v3.oas.models.PathItem;
import io.swagger.v3.oas.models.parameters.Parameter;
import java.util.ArrayList;
import java.util.List;

View File

@@ -3,7 +3,7 @@
<groupId>io.nosqlbench</groupId>
<artifactId>mvn-defaults</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<packaging>pom</packaging>
<properties>
@@ -184,24 +184,50 @@
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java-api</artifactId>
<version>${docker.java.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java-core</artifactId>
<version>${docker.java.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java-transport-okhttp</artifactId>
<version>${docker.java.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.github.docker-java</groupId>
<artifactId>docker-java</artifactId>
<version>${docker.java.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>

View File

@@ -5,7 +5,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -24,127 +24,127 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-rest</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-cli</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-docs</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-core</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>engine-extensions</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-web</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-kafka</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-stdout</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-diag</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-tcp</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-http</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-jmx</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-dsegraph-shaded</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-cql-shaded</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-cqld3-shaded</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-cqlverify</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-mongodb</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-pulsar</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-cockroachdb</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-jms</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-direct</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
</dependencies>
@@ -231,7 +231,7 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-cqld4</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
</dependencies>
</profile>
@@ -244,7 +244,7 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>driver-mongodb</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
</dependencies>
</profile>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>io.nosqlbench</groupId>
<artifactId>mvn-defaults</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -23,14 +23,14 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<artifactId>nb-api</artifactId>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>virtdata-lang</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>

View File

@@ -7,7 +7,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>

View File

@@ -7,7 +7,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -20,7 +20,7 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>virtdata-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>

View File

@@ -4,7 +4,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -22,13 +22,13 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>virtdata-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>virtdata-lib-basics</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
</dependencies>

View File

@@ -7,7 +7,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -20,13 +20,13 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>virtdata-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>virtdata-lib-basics</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>

View File

@@ -4,7 +4,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -20,7 +20,7 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>virtdata-lib-basics</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
</dependencies>

View File

@@ -7,7 +7,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -18,7 +18,7 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>virtdata-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>

View File

@@ -4,7 +4,7 @@
<parent>
<artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath>
</parent>
@@ -18,36 +18,36 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>virtdata-realdata</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>virtdata-lib-realer</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>virtdata-api</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>virtdata-lib-random</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<artifactId>virtdata-lib-basics</artifactId>
</dependency>
<dependency>
<groupId>io.nosqlbench</groupId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
<artifactId>virtdata-lib-curves4</artifactId>
</dependency>
@@ -55,7 +55,7 @@
<dependency>
<groupId>io.nosqlbench</groupId>
<artifactId>docsys</artifactId>
<version>4.15.51-SNAPSHOT</version>
<version>4.15.52-SNAPSHOT</version>
</dependency>
</dependencies>