mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2024-11-24 09:40:30 -06:00
actions-for-docs (#919)
* updated docs action with version state * script updates * misc doc system updates * Update build.yml remove versions logic, since zip contains version info now. * Update build.yml corrected git add command * update version format * updated docs site url
This commit is contained in:
parent
97e992bce8
commit
ff188d4860
5
.github/workflows/build.yml
vendored
5
.github/workflows/build.yml
vendored
@ -64,6 +64,7 @@ jobs:
|
|||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: set git username
|
- name: set git username
|
||||||
run: git config --global user.email "${{ secrets.NBDROID_EMAIL }}"
|
run: git config --global user.email "${{ secrets.NBDROID_EMAIL }}"
|
||||||
|
|
||||||
@ -95,12 +96,12 @@ jobs:
|
|||||||
|
|
||||||
- name: set CNAME
|
- name: set CNAME
|
||||||
run: |
|
run: |
|
||||||
echo "previewdocs.nosqlbench.io" > nosqlbench-build-docs/site/static/CNAME
|
echo "builddocs.nosqlbench.io" > nosqlbench-build-docs/site/static/CNAME
|
||||||
|
|
||||||
- name: commit changes
|
- name: commit changes
|
||||||
run: |
|
run: |
|
||||||
cd nosqlbench-build-docs
|
cd nosqlbench-build-docs
|
||||||
git add -A
|
git add exported_docs.zip
|
||||||
|
|
||||||
- name: push changes
|
- name: push changes
|
||||||
env:
|
env:
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
|
exported_docs.zip
|
||||||
.nosqlbench/**
|
.nosqlbench/**
|
||||||
.run/**
|
.run/**
|
||||||
workspaces/**
|
workspaces/**
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
package io.nosqlbench.analysis;
|
package io.nosqlbench.analysis;
|
||||||
|
|
||||||
import io.nosqlbench.api.spi.BundledApp;
|
import io.nosqlbench.api.apps.BundledApp;
|
||||||
import io.nosqlbench.nb.annotations.Service;
|
import io.nosqlbench.nb.annotations.Service;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
@ -20,7 +20,7 @@ import com.google.gson.Gson;
|
|||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
import io.nosqlbench.api.content.Content;
|
import io.nosqlbench.api.content.Content;
|
||||||
import io.nosqlbench.api.content.NBIO;
|
import io.nosqlbench.api.content.NBIO;
|
||||||
import io.nosqlbench.api.spi.BundledApp;
|
import io.nosqlbench.api.apps.BundledApp;
|
||||||
import io.nosqlbench.cqlgen.binders.Binding;
|
import io.nosqlbench.cqlgen.binders.Binding;
|
||||||
import io.nosqlbench.cqlgen.binders.BindingsAccumulator;
|
import io.nosqlbench.cqlgen.binders.BindingsAccumulator;
|
||||||
import io.nosqlbench.cqlgen.api.BindingsLibrary;
|
import io.nosqlbench.cqlgen.api.BindingsLibrary;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# cqld4 driver
|
# cqld4
|
||||||
|
|
||||||
This is the newly revamped (beta) driver for CQL which uses the DataStax OSS Driver version 4. As
|
This is the newly revamped driver for CQL which uses the DataStax OSS Driver version 4. As
|
||||||
there was a significant restructuring of the APIs between CQL driver 4.x and previous versions, this
|
there was a significant restructuring of the APIs between CQL driver 4.x and previous versions, this
|
||||||
driver is a clean and separate implementation which aims to use the features of version 4.x of the
|
driver is a clean and separate implementation which aims to use the features of version 4.x of the
|
||||||
native driver directly as well as new internal NoSQLBench APIs.
|
native driver directly as well as new internal NoSQLBench APIs.
|
||||||
@ -38,20 +38,20 @@ mixing in JSON or remote URLs.
|
|||||||
|
|
||||||
Configure directly from a config file, or classpath resource:
|
Configure directly from a config file, or classpath resource:
|
||||||
|
|
||||||
# If this isn't found in the file system, the classpath will also be checked.
|
```shell
|
||||||
driverconfig=myconfig.json
|
# If this isn't found in the file system, the classpath will also be checked.
|
||||||
|
nb5 ... driverconfig=myconfig.json
|
||||||
|
```
|
||||||
|
|
||||||
Configure directly from JSON:
|
Configure directly from JSON:
|
||||||
|
```shell
|
||||||
driverconfig='{basic.request.timeout:"2 seconds"}'
|
nb5 ... driverconfig='{basic.request.timeout:"2 seconds"}'
|
||||||
|
```
|
||||||
|
|
||||||
Configure directly form a remote URL:
|
Configure directly form a remote URL:
|
||||||
|
```shell
|
||||||
driverconfig='http://gist.github.com...'
|
nb5 ... driverconfig='http://gist.github.com...'
|
||||||
|
```
|
||||||
Configure from multiple sources:
|
|
||||||
|
|
||||||
driverconfig=myconfig.json
|
|
||||||
|
|
||||||
### Basic Cqld4 driver options
|
### Basic Cqld4 driver options
|
||||||
|
|
||||||
@ -109,48 +109,50 @@ classic form have not changed.
|
|||||||
|
|
||||||
## CQLd4 Op Template Examples
|
## CQLd4 Op Template Examples
|
||||||
|
|
||||||
ops:
|
```yaml
|
||||||
|
ops:
|
||||||
|
|
||||||
# prepared statement
|
# prepared statement
|
||||||
# allows for parameterization via bindings, and uses prepared statements internally
|
# allows for parameterization via bindings, and uses prepared statements internally
|
||||||
example-prepared-cql-stmt:
|
example-prepared-cql-stmt:
|
||||||
prepared: |
|
prepared: |
|
||||||
select one, two from buckle.myshoe where ...
|
select one, two from buckle.myshoe where ...
|
||||||
|
|
||||||
# prepared statement (verbose form)
|
# prepared statement (verbose form)
|
||||||
example-prepared-cql-stmt-verbose:
|
example-prepared-cql-stmt-verbose:
|
||||||
type: prepared
|
type: prepared
|
||||||
stmt: |
|
stmt: |
|
||||||
select one, two from buckle.myshoe where ...
|
select one, two from buckle.myshoe where ...
|
||||||
|
|
||||||
# simple statement
|
# simple statement
|
||||||
# allows for parameterization via bindings, but does not use prepared statements internally
|
# allows for parameterization via bindings, but does not use prepared statements internally
|
||||||
example-simple-cql-stmt:
|
example-simple-cql-stmt:
|
||||||
simple: |
|
simple: |
|
||||||
select three, four from knock.onthedoor where ...
|
select three, four from knock.onthedoor where ...
|
||||||
|
|
||||||
# raw statement
|
# raw statement
|
||||||
# pre-renders the statement into a string, with no driver-supervised parameterization
|
# pre-renders the statement into a string, with no driver-supervised parameterization
|
||||||
# useful for testing variant DDL where some fields are not parameterizable
|
# useful for testing variant DDL where some fields are not parameterizable
|
||||||
# NOTE: the raw form does its best to quote non-literals where needed, but you may
|
# NOTE: the raw form does its best to quote non-literals where needed, but you may
|
||||||
# have to inject single or double quotes in special cases.
|
# have to inject single or double quotes in special cases.
|
||||||
example-raw-cql-stmt:
|
example-raw-cql-stmt:
|
||||||
raw: |
|
raw: |
|
||||||
create table if not exist {ksname}.{tblname} ...
|
create table if not exist {ksname}.{tblname} ...
|
||||||
|
|
||||||
# gremlin statement using the fluent API, as it would be written in a client application
|
# gremlin statement using the fluent API, as it would be written in a client application
|
||||||
example-fluent-graph-stmt:
|
example-fluent-graph-stmt:
|
||||||
fluent: >-
|
fluent: >-
|
||||||
g.V().hasLabel("device").has("deviceid", UUID.fromString({deviceid}))
|
g.V().hasLabel("device").has("deviceid", UUID.fromString({deviceid}))
|
||||||
# if imports are not specified, the following is auto imported.
|
# if imports are not specified, the following is auto imported.
|
||||||
# if imports are specified, you must also provide the __ class if needed
|
# if imports are specified, you must also provide the __ class if needed
|
||||||
imports:
|
imports:
|
||||||
- org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__
|
- org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__
|
||||||
|
|
||||||
# gremlin statement using string API (not recommended)
|
# gremlin statement using string API (not recommended)
|
||||||
example-raw-gremlin-stmt:
|
example-raw-gremlin-stmt:
|
||||||
gremlin: >-
|
gremlin: >-
|
||||||
g.V().hasLabel("device").has("deviceid", UUID.fromString('{deviceid})')
|
g.V().hasLabel("device").has("deviceid", UUID.fromString('{deviceid})')
|
||||||
|
```
|
||||||
|
|
||||||
## CQL Op Template - Optional Fields
|
## CQL Op Template - Optional Fields
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# cqlgen - A default CQL workload generator
|
# cqlgen
|
||||||
|
|
||||||
|
cqlgen is a default CQL workload generator
|
||||||
|
|
||||||
With NB5, the cqld4 driver comes with a workload generator that can be used to generate a
|
With NB5, the cqld4 driver comes with a workload generator that can be used to generate a
|
||||||
workload yaml from a CQL schema file.
|
workload yaml from a CQL schema file.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# dynamodb driver
|
# dynamodb
|
||||||
|
|
||||||
The DynamoDB driver supports a basic set of commands as specified at
|
The DynamoDB driver supports a basic set of commands as specified at
|
||||||
[Amazon DynamoDB Docs](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Operations_Amazon_DynamoDB.html).
|
[Amazon DynamoDB Docs](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Operations_Amazon_DynamoDB.html).
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# HTTP driver
|
# http
|
||||||
|
|
||||||
This driver allows you to make http requests using the native HTTP client
|
This driver allows you to make http requests using the native HTTP client
|
||||||
that is bundled with the JVM. It supports free-form construction of
|
that is bundled with the JVM. It supports free-form construction of
|
||||||
@ -23,8 +23,8 @@ Or, you can have a list:
|
|||||||
```yaml
|
```yaml
|
||||||
# A list of statements
|
# A list of statements
|
||||||
ops:
|
ops:
|
||||||
- http://google.com/
|
- http://google.com/
|
||||||
- http://amazon.com/
|
- http://amazon.com/
|
||||||
```
|
```
|
||||||
|
|
||||||
Or you can template the values used in the URI, and even add ratios:
|
Or you can template the values used in the URI, and even add ratios:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# MongoDB Driver
|
# MongoDB
|
||||||
|
|
||||||
This is a driver for MongoDB. It supports the `db.runCommand` API described in [here](https://docs.mongodb.com/manual/reference/command/).
|
This is a driver for MongoDB. It supports the `db.runCommand` API described in [here](https://docs.mongodb.com/manual/reference/command/).
|
||||||
|
|
||||||
@ -10,7 +10,9 @@ for details on command structure.
|
|||||||
|
|
||||||
Run a mongodb activity with definitions from activities/mongodb-basic.yaml
|
Run a mongodb activity with definitions from activities/mongodb-basic.yaml
|
||||||
|
|
||||||
... driver=mongodb yaml=activities/mongo-basic.yaml
|
```shell
|
||||||
|
nb5 driver=mongodb yaml=activities/mongo-basic.yaml
|
||||||
|
```
|
||||||
|
|
||||||
### MongoDB ActivityType Parameters
|
### MongoDB ActivityType Parameters
|
||||||
|
|
||||||
|
@ -1,15 +1,4 @@
|
|||||||
# Table of contents
|
# pulsar
|
||||||
- [1. Overview](#1-overview)
|
|
||||||
- [1.1. Issues Tracker](#1-1-issues-tracker)
|
|
||||||
- [2. Execute the NB Pulsar Driver Workload](#2-execute-the-nb-pulsar-driver-workload)
|
|
||||||
- [2.1. NB Pulsar Driver Yaml File High Level Structure](#2-1-nb-pulsar-driver-yaml-file-high-level-structure)
|
|
||||||
- [2.2. NB Pulsar Driver Configuration Parameters](#2-2-nb-pulsar-driver-configuration-parameters)
|
|
||||||
- [2.2.1. Global Level Parameters](#2-2-1-global-level-parameters)
|
|
||||||
- [2.2.2. Document Level Parameters](#2-2-2-document-level-parameters)
|
|
||||||
- [3. NB Pulsar Driver OpTemplates](#3-nb-pulsar-driver-optemplates)
|
|
||||||
- [4. Message Generation and Schema Support](#4-message-generation-and-schema-support)
|
|
||||||
- [4.1. Message Generation](#4-1-message-generation)
|
|
||||||
- [4.2. Schema Support](#4-2-schema-support)
|
|
||||||
|
|
||||||
# 1. Overview
|
# 1. Overview
|
||||||
|
|
||||||
|
@ -1,18 +1,7 @@
|
|||||||
---
|
---
|
||||||
weight: 0
|
weight: 0
|
||||||
title: S4J Adapter
|
title: S4J
|
||||||
---
|
---
|
||||||
# S4J Adapter
|
|
||||||
- [1. Overview](#1-overview)
|
|
||||||
- [2. Execute NB S4J Workload](#2-execute-nb-s4j-workload)
|
|
||||||
- [3. NB S4J Driver Configuration Parameter File](#3-nb-s4j-driver-configuration-parameter-file)
|
|
||||||
- [4. NB S4J Scenario Definition File](#4-nb-s4j-scenario-definition-file)
|
|
||||||
- [4.1. Document Level Parameters](#4-1-document-level-parameters)
|
|
||||||
- [4.2. NB S4J Workload Types](#4-2-nb-s4j-workload-types)
|
|
||||||
- [4.2.1. Publish Messages to a JMS Destination, Queue or Topic](#4-2-1-publish-messages-to-a-jms-destination-queue-or-topic)
|
|
||||||
- [4.2.2. Receiving Messages from a JMS Destination, Queue or Topic](#4-2-2-receiving-messages-from-a-jms-destination-queue-or-topic)
|
|
||||||
|
|
||||||
|
|
||||||
# 1. Overview
|
# 1. Overview
|
||||||
|
|
||||||
This driver is similar to [NB Pulsar driver](../../../../driver-pulsar/src/main/resources/pulsar.md) that allows NB based workload generation and performance testing against a Pulsar cluster. It also follows a similar pattern to configure and connect to the Pulsar cluster for workload execution.
|
This driver is similar to [NB Pulsar driver](../../../../driver-pulsar/src/main/resources/pulsar.md) that allows NB based workload generation and performance testing against a Pulsar cluster. It also follows a similar pattern to configure and connect to the Pulsar cluster for workload execution.
|
||||||
@ -23,7 +12,7 @@ However, the major difference is instead of simulating native Pulsar client work
|
|||||||
|
|
||||||
The following is an example of executing a NB S4J workload (defined as *pulsar_s4j.yaml*)
|
The following is an example of executing a NB S4J workload (defined as *pulsar_s4j.yaml*)
|
||||||
|
|
||||||
```
|
```shell
|
||||||
$ <nb_cmd> run driver=s4j cycles=10000 threads=4 num_conn=2 num_session=2 session_mode="client_ack" strict_msg_error_handling="false" web_url=http://localhost:8080 service_url=pulsar://localhost:6650 config=/path/to/nb_s4j_config.properties yaml=/path/to/pulsar_s4j.yaml -vv --logs-dir=s4j_log
|
$ <nb_cmd> run driver=s4j cycles=10000 threads=4 num_conn=2 num_session=2 session_mode="client_ack" strict_msg_error_handling="false" web_url=http://localhost:8080 service_url=pulsar://localhost:6650 config=/path/to/nb_s4j_config.properties yaml=/path/to/pulsar_s4j.yaml -vv --logs-dir=s4j_log
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -153,7 +142,7 @@ The NB S4J statement block for publishing messages to a JMS destination (either
|
|||||||
* The default message type (**msg_type**) is "byte". But optionally, you can specify other message types such as "text", "map", etc.
|
* The default message type (**msg_type**) is "byte". But optionally, you can specify other message types such as "text", "map", etc.
|
||||||
* The message payload (**msg_body**) is the only mandatory field.
|
* The message payload (**msg_body**) is the only mandatory field.
|
||||||
|
|
||||||
```
|
```yaml
|
||||||
blocks:
|
blocks:
|
||||||
msg-produce-block:
|
msg-produce-block:
|
||||||
ops:
|
ops:
|
||||||
@ -196,7 +185,8 @@ The generic NB S4J statement block for receiving messages to a JMS destination (
|
|||||||
* negative ack/ack timeout/deadletter topic related settings
|
* negative ack/ack timeout/deadletter topic related settings
|
||||||
* The settings here (as the scenario specific settings) will be merged with the
|
* The settings here (as the scenario specific settings) will be merged with the
|
||||||
* global settings in *s4j_config.properties* file
|
* global settings in *s4j_config.properties* file
|
||||||
```
|
|
||||||
|
```yaml
|
||||||
blocks:
|
blocks:
|
||||||
msg-produce-block:
|
msg-produce-block:
|
||||||
ops:
|
ops:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# stdout activity type
|
# stdout
|
||||||
|
|
||||||
This is an activity type which allows for the generation of data
|
This is an activity type which allows for the generation of data
|
||||||
into to stdout or a file. It reads the standard nosqlbench YAML
|
into to stdout or a file. It reads the standard nosqlbench YAML
|
||||||
@ -9,15 +9,21 @@ that uses the curly brace token form in statements.
|
|||||||
|
|
||||||
Run a stdout activity named 'stdout-test', with definitions from activities/stdout-test.yaml
|
Run a stdout activity named 'stdout-test', with definitions from activities/stdout-test.yaml
|
||||||
|
|
||||||
... driver=stdout workload=stdout-test
|
```shell
|
||||||
|
nb5 driver=stdout workload=stdout-test
|
||||||
|
```
|
||||||
|
|
||||||
Only run statement groups which match a tag regex
|
Only run statement groups which match a tag regex
|
||||||
|
|
||||||
... driver=stdout workload=stdout-test tags=group:'ddl.*'
|
```shell
|
||||||
|
nb5 driver=stdout workload=stdout-test tags=group:'ddl.*'
|
||||||
|
```
|
||||||
|
|
||||||
Run the matching 'dml' statements, with 100 cycles, from [1000..1100)
|
Run the matching 'dml' statements, with 100 cycles, from [1000..1100)
|
||||||
|
|
||||||
... driver=stdout workload=stdout-test tags=group:'dml.*' cycles=1000..11000 filename=test.csv
|
```shell
|
||||||
|
nb5 driver=stdout workload=stdout-test tags=group:'dml.*' cycles=1000..11000 filename=test.csv
|
||||||
|
```
|
||||||
|
|
||||||
This last example shows that the cycle range is [inclusive..exclusive),
|
This last example shows that the cycle range is [inclusive..exclusive),
|
||||||
to allow for stacking test intervals. This is standard across all
|
to allow for stacking test intervals. This is standard across all
|
||||||
@ -60,15 +66,21 @@ For more details on this format, please refer to the
|
|||||||
The statement format for this activity type is a simple string. Tokens between
|
The statement format for this activity type is a simple string. Tokens between
|
||||||
curly braces are used to refer to binding names, as in the following example:
|
curly braces are used to refer to binding names, as in the following example:
|
||||||
|
|
||||||
statements:
|
```yaml
|
||||||
- "It is {minutes} past {hour}."
|
ops:
|
||||||
|
op1: "It is {minutes} past {hour}."
|
||||||
|
```
|
||||||
|
|
||||||
If you want to suppress the trailing newline that is automatically added, then
|
If you want to suppress the trailing newline that is automatically added, then
|
||||||
you must either pass `newline=false` as an activity param, or specify it
|
you must either pass `newline=false` as an activity param, or specify it
|
||||||
in the statement params in your config as in:
|
in the statement params in your config as in:
|
||||||
|
|
||||||
params:
|
```yaml
|
||||||
newline: false
|
ops:
|
||||||
|
op1:
|
||||||
|
stmt: "It is {minutes} past {hour}."
|
||||||
|
newline: false
|
||||||
|
```
|
||||||
|
|
||||||
### Auto-generated statements
|
### Auto-generated statements
|
||||||
|
|
||||||
@ -76,13 +88,17 @@ If no statement is provided, then the defined binding names are used as-is
|
|||||||
to create a CSV-style line format. The values are concatenated with
|
to create a CSV-style line format. The values are concatenated with
|
||||||
comma delimiters, so a set of bindings like this:
|
comma delimiters, so a set of bindings like this:
|
||||||
|
|
||||||
|
```yaml
|
||||||
bindings:
|
bindings:
|
||||||
one: Identity()
|
one: Identity()
|
||||||
two: NumberNameToString()
|
two: NumberNameToString()
|
||||||
|
```
|
||||||
|
|
||||||
would create an automatic string template like this:
|
would create an automatic string template like this:
|
||||||
|
|
||||||
statements:
|
```yaml
|
||||||
- "{one},{two}\n"
|
ops:
|
||||||
|
op1: "{one},{two}\n"
|
||||||
|
```
|
||||||
|
|
||||||
The auto-generation behavior is forced when the format parameter is supplied.
|
The auto-generation behavior is forced when the format parameter is supplied.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Driver: tcpclient
|
# tcpclient
|
||||||
|
|
||||||
**tcpclient acts like a _client push_ version of stdout over TCP**
|
**tcpclient acts like a _client push_ version of stdout over TCP**
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# Driver: tcpserver
|
# tcpserver
|
||||||
|
|
||||||
**tcpserver acts like a _server push_ version of stdout over TCP**
|
**tcpserver acts like a _server push_ version of stdout over TCP**
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 nosqlbench
|
* Copyright (c) 2022-2023 nosqlbench
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -14,20 +14,17 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.nosqlbench.engine.api.activityimpl.uniform;
|
package io.nosqlbench.engine.api.activityimpl.docs;
|
||||||
|
|
||||||
import io.nosqlbench.api.docsapi.BundledMarkdownManifest;
|
import io.nosqlbench.api.docsapi.BundledMarkdownManifest;
|
||||||
import io.nosqlbench.api.docsapi.Docs;
|
import io.nosqlbench.api.docsapi.Docs;
|
||||||
import io.nosqlbench.api.docsapi.DocsBinder;
|
import io.nosqlbench.api.docsapi.DocsBinder;
|
||||||
import io.nosqlbench.api.docsapi.DocsNameSpace;
|
import io.nosqlbench.api.spi.SimpleServiceLoader;
|
||||||
|
import io.nosqlbench.engine.api.activityimpl.uniform.DriverAdapter;
|
||||||
import io.nosqlbench.nb.annotations.Maturity;
|
import io.nosqlbench.nb.annotations.Maturity;
|
||||||
import io.nosqlbench.nb.annotations.Service;
|
import io.nosqlbench.nb.annotations.Service;
|
||||||
import io.nosqlbench.api.spi.SimpleServiceLoader;
|
|
||||||
|
|
||||||
import java.nio.file.Path;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
@Service(value = BundledMarkdownManifest.class, selector = "drivers")
|
@Service(value = BundledMarkdownManifest.class, selector = "drivers")
|
||||||
public class BundledDriverAdapterDocs implements BundledMarkdownManifest {
|
public class BundledDriverAdapterDocs implements BundledMarkdownManifest {
|
@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2023 nosqlbench
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.nosqlbench.engine.api.specifications;
|
||||||
|
|
||||||
|
import io.nosqlbench.api.content.Content;
|
||||||
|
import io.nosqlbench.api.content.NBIO;
|
||||||
|
import io.nosqlbench.api.docsapi.BundledMarkdownManifest;
|
||||||
|
import io.nosqlbench.api.docsapi.Docs;
|
||||||
|
import io.nosqlbench.api.docsapi.DocsBinder;
|
||||||
|
import io.nosqlbench.nb.annotations.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service(value = BundledMarkdownManifest.class, selector = "specifications")
|
||||||
|
public class SpecDocsManifest implements BundledMarkdownManifest {
|
||||||
|
@Override
|
||||||
|
public DocsBinder getDocs() {
|
||||||
|
Docs docs = new Docs().namespace("workload_definition");
|
||||||
|
List<Content<?>> specfiles = NBIO.classpath().prefix("workload_definition/").extension(".md").list();
|
||||||
|
for (Content<?> specfile : specfiles) {
|
||||||
|
docs.addPath(specfile.asPath());
|
||||||
|
}
|
||||||
|
return docs;
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 nosqlbench
|
* Copyright (c) 2023 nosqlbench
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -14,10 +14,17 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.nosqlbench.api.spi;
|
package io.nosqlbench.engine.api.activityconfig.specifications;
|
||||||
|
|
||||||
import java.util.function.ToIntFunction;
|
import io.nosqlbench.api.docsapi.BundledMarkdownManifest;
|
||||||
|
import io.nosqlbench.api.docsapi.Docs;
|
||||||
|
import io.nosqlbench.api.docsapi.DocsBinder;
|
||||||
|
|
||||||
public interface BundledApp extends ToIntFunction<String[]> {
|
public class SpecificationDocsManifest implements BundledMarkdownManifest {
|
||||||
|
@Override
|
||||||
|
public DocsBinder getDocs() {
|
||||||
|
Docs docs = new Docs();
|
||||||
|
|
||||||
|
return docs;
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 nosqlbench
|
* Copyright (c) 2022-2023 nosqlbench
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.nosqlbench.engine.api.activityconfig.rawyaml;
|
package io.nosqlbench.engine.api.activityconfig.specifications;
|
||||||
|
|
||||||
import com.vladsch.flexmark.ast.FencedCodeBlock;
|
import com.vladsch.flexmark.ast.FencedCodeBlock;
|
||||||
import io.nosqlbench.nb.spectest.core.SpecTest;
|
import io.nosqlbench.nb.spectest.core.SpecTest;
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2022 nosqlbench
|
* Copyright (c) 2022-2023 nosqlbench
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@ -14,11 +14,12 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package io.nosqlbench.engine.api.activityconfig.rawyaml;
|
package io.nosqlbench.engine.api.activityconfig.specifications;
|
||||||
|
|
||||||
import com.google.gson.*;
|
import com.google.gson.*;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
import io.nosqlbench.engine.api.activityconfig.StatementsLoader;
|
import io.nosqlbench.engine.api.activityconfig.StatementsLoader;
|
||||||
|
import io.nosqlbench.engine.api.activityconfig.rawyaml.RawYamlLoader;
|
||||||
import io.nosqlbench.engine.api.activityconfig.yaml.OpTemplate;
|
import io.nosqlbench.engine.api.activityconfig.yaml.OpTemplate;
|
||||||
import io.nosqlbench.engine.api.activityconfig.yaml.StmtsDocList;
|
import io.nosqlbench.engine.api.activityconfig.yaml.StmtsDocList;
|
||||||
import io.nosqlbench.nb.spectest.api.STAssemblyValidator;
|
import io.nosqlbench.nb.spectest.api.STAssemblyValidator;
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
package io.nosqlbench.docsys.core;
|
package io.nosqlbench.docsys.core;
|
||||||
|
|
||||||
import io.nosqlbench.api.spi.BundledApp;
|
import io.nosqlbench.api.apps.BundledApp;
|
||||||
import io.nosqlbench.nb.annotations.Service;
|
import io.nosqlbench.nb.annotations.Service;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
@ -25,7 +25,7 @@ import io.nosqlbench.api.errors.BasicError;
|
|||||||
import io.nosqlbench.api.logging.NBLogLevel;
|
import io.nosqlbench.api.logging.NBLogLevel;
|
||||||
import io.nosqlbench.api.metadata.SessionNamer;
|
import io.nosqlbench.api.metadata.SessionNamer;
|
||||||
import io.nosqlbench.api.metadata.SystemId;
|
import io.nosqlbench.api.metadata.SystemId;
|
||||||
import io.nosqlbench.api.spi.BundledApp;
|
import io.nosqlbench.api.apps.BundledApp;
|
||||||
import io.nosqlbench.engine.api.activityapi.cyclelog.outputs.cyclelog.CycleLogDumperUtility;
|
import io.nosqlbench.engine.api.activityapi.cyclelog.outputs.cyclelog.CycleLogDumperUtility;
|
||||||
import io.nosqlbench.engine.api.activityapi.cyclelog.outputs.cyclelog.CycleLogImporterUtility;
|
import io.nosqlbench.engine.api.activityapi.cyclelog.outputs.cyclelog.CycleLogImporterUtility;
|
||||||
import io.nosqlbench.engine.api.activityapi.input.InputType;
|
import io.nosqlbench.engine.api.activityapi.input.InputType;
|
||||||
|
@ -445,6 +445,16 @@
|
|||||||
<testResources>
|
<testResources>
|
||||||
<testResource>
|
<testResource>
|
||||||
<directory>src/test/resources</directory>
|
<directory>src/test/resources</directory>
|
||||||
|
<excludes>
|
||||||
|
<exclude>log4j2-test.xml</exclude>
|
||||||
|
</excludes>
|
||||||
|
<filtering>true</filtering>
|
||||||
|
</testResource>
|
||||||
|
<testResource>
|
||||||
|
<directory>src/test/resources</directory>
|
||||||
|
<includes>
|
||||||
|
<include>log4j2-test.xml</include>
|
||||||
|
</includes>
|
||||||
<filtering>true</filtering>
|
<filtering>true</filtering>
|
||||||
</testResource>
|
</testResource>
|
||||||
</testResources>
|
</testResources>
|
||||||
|
51
nb-api/src/main/java/io/nosqlbench/api/apps/BundledApp.java
Normal file
51
nb-api/src/main/java/io/nosqlbench/api/apps/BundledApp.java
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2022-2023 nosqlbench
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.nosqlbench.api.apps;
|
||||||
|
|
||||||
|
import io.nosqlbench.api.content.Content;
|
||||||
|
import io.nosqlbench.api.content.NBIO;
|
||||||
|
import io.nosqlbench.api.docsapi.Docs;
|
||||||
|
import io.nosqlbench.api.docsapi.DocsBinder;
|
||||||
|
import io.nosqlbench.nb.annotations.Service;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
import java.util.function.ToIntFunction;
|
||||||
|
|
||||||
|
public interface BundledApp extends ToIntFunction<String[]> {
|
||||||
|
|
||||||
|
int applyAsInt(String[] value);
|
||||||
|
|
||||||
|
default String getBundledAppName() {
|
||||||
|
return this.getClass().getAnnotation(Service.class).selector();
|
||||||
|
}
|
||||||
|
|
||||||
|
default DocsBinder getBundledDocs() {
|
||||||
|
Docs docs = new Docs().namespace("apps");
|
||||||
|
|
||||||
|
String dev_docspath = "app-" + this.getBundledAppName() + "/src/main/resources/docs/" + this.getBundledAppName();
|
||||||
|
String cp_docspath = "docs/" + this.getBundledAppName();
|
||||||
|
Optional<Content<?>> bundled_docs = NBIO.local().name(dev_docspath, cp_docspath).first();
|
||||||
|
bundled_docs.map(Content::asPath).ifPresent(docs::addContentsOf);
|
||||||
|
|
||||||
|
Optional<Content<?>> maindoc = NBIO.local().name("/src/main/resources/" + this.getBundledAppName() + ".md", this.getBundledAppName() + ".md").first();
|
||||||
|
|
||||||
|
maindoc.map(Content::asPath).ifPresent(docs::addPath);
|
||||||
|
|
||||||
|
return docs.asDocsBinder();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2023 nosqlbench
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.nosqlbench.api.apps;
|
||||||
|
|
||||||
|
import io.nosqlbench.api.docsapi.BundledMarkdownManifest;
|
||||||
|
import io.nosqlbench.api.docsapi.Docs;
|
||||||
|
import io.nosqlbench.api.docsapi.DocsBinder;
|
||||||
|
import io.nosqlbench.api.spi.SimpleServiceLoader;
|
||||||
|
import io.nosqlbench.nb.annotations.Maturity;
|
||||||
|
import io.nosqlbench.nb.annotations.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Service(value = BundledMarkdownManifest.class, selector = "apps")
|
||||||
|
public class BundledAppDocs implements BundledMarkdownManifest {
|
||||||
|
@Override
|
||||||
|
public DocsBinder getDocs() {
|
||||||
|
DocsBinder docs = new Docs();
|
||||||
|
SimpleServiceLoader<BundledApp> loader = new SimpleServiceLoader<>(BundledApp.class, Maturity.Any);
|
||||||
|
List<SimpleServiceLoader.Component<? extends BundledApp>> namedProviders = loader.getNamedProviders();
|
||||||
|
for (SimpleServiceLoader.Component<? extends BundledApp> namedProvider : namedProviders) {
|
||||||
|
BundledApp app = namedProvider.provider.get();
|
||||||
|
DocsBinder bundledDocs = app.getBundledDocs();
|
||||||
|
docs = docs.merge(bundledDocs);
|
||||||
|
}
|
||||||
|
return docs;
|
||||||
|
}
|
||||||
|
}
|
@ -18,6 +18,7 @@ package io.nosqlbench.api.docsapi;
|
|||||||
|
|
||||||
import java.util.ServiceLoader;
|
import java.util.ServiceLoader;
|
||||||
|
|
||||||
|
|
||||||
public class BundledMarkdownLoader {
|
public class BundledMarkdownLoader {
|
||||||
|
|
||||||
public static DocsBinder loadBundledMarkdown() {
|
public static DocsBinder loadBundledMarkdown() {
|
||||||
|
@ -19,7 +19,7 @@ package io.nosqlbench.api.markdown.exporter;
|
|||||||
import io.nosqlbench.api.markdown.aggregator.MarkdownDocs;
|
import io.nosqlbench.api.markdown.aggregator.MarkdownDocs;
|
||||||
import io.nosqlbench.api.markdown.types.DocScope;
|
import io.nosqlbench.api.markdown.types.DocScope;
|
||||||
import io.nosqlbench.api.markdown.types.MarkdownInfo;
|
import io.nosqlbench.api.markdown.types.MarkdownInfo;
|
||||||
import io.nosqlbench.api.spi.BundledApp;
|
import io.nosqlbench.api.apps.BundledApp;
|
||||||
import io.nosqlbench.nb.annotations.Service;
|
import io.nosqlbench.nb.annotations.Service;
|
||||||
import joptsimple.*;
|
import joptsimple.*;
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ import io.nosqlbench.nb.spectest.api.STBuilderFacets;
|
|||||||
import io.nosqlbench.nb.spectest.api.STPathLoader;
|
import io.nosqlbench.nb.spectest.api.STPathLoader;
|
||||||
|
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedHashSet;
|
import java.util.LinkedHashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@ -86,6 +87,15 @@ public class SpecTest implements Runnable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<Path> matchingSpecFiles() {
|
||||||
|
List<Path> paths = new ArrayList<>();
|
||||||
|
for (Path path : paths) {
|
||||||
|
List<Path> matchingPaths = STFileScanner.findMatching(".*\\.md", paths.toArray(new Path[0]));
|
||||||
|
paths.addAll(matchingPaths);
|
||||||
|
}
|
||||||
|
return paths;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
Set<STNodeAssembly> testables = new LinkedHashSet<>();
|
Set<STNodeAssembly> testables = new LinkedHashSet<>();
|
||||||
|
@ -73,6 +73,10 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>src/main/resources</directory>
|
<directory>src/main/resources</directory>
|
||||||
|
<includes>
|
||||||
|
<include>version.properties</include>
|
||||||
|
<include>nb_version_info.md</include>
|
||||||
|
</includes>
|
||||||
<filtering>true</filtering>
|
<filtering>true</filtering>
|
||||||
</resource>
|
</resource>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
package io.nosqlbench.api.docsapi.docexporter;
|
package io.nosqlbench.api.docsapi.docexporter;
|
||||||
|
|
||||||
import io.nosqlbench.api.spi.BundledApp;
|
import io.nosqlbench.api.apps.BundledApp;
|
||||||
import io.nosqlbench.nb.annotations.Service;
|
import io.nosqlbench.nb.annotations.Service;
|
||||||
import joptsimple.OptionParser;
|
import joptsimple.OptionParser;
|
||||||
import joptsimple.OptionSet;
|
import joptsimple.OptionSet;
|
||||||
|
@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2023 nosqlbench
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package io.nosqlbench.api.docsapi.docexporter;
|
||||||
|
|
||||||
|
import io.nosqlbench.api.content.NBIO;
|
||||||
|
import io.nosqlbench.api.docsapi.BundledMarkdownManifest;
|
||||||
|
import io.nosqlbench.api.docsapi.Docs;
|
||||||
|
import io.nosqlbench.api.docsapi.DocsBinder;
|
||||||
|
import io.nosqlbench.nb.annotations.Service;
|
||||||
|
|
||||||
|
@Service(value=BundledMarkdownManifest.class,selector = "versions")
|
||||||
|
public class BundledVersionManifest implements BundledMarkdownManifest {
|
||||||
|
@Override
|
||||||
|
public DocsBinder getDocs() {
|
||||||
|
return new Docs()
|
||||||
|
.namespace("versions")
|
||||||
|
.addPath(NBIO.classpath().name("nb_version_info.md").one().asPath())
|
||||||
|
.asDocsBinder();
|
||||||
|
}
|
||||||
|
}
|
9
nbr/src/main/resources/nb_version_info.md
Normal file
9
nbr/src/main/resources/nb_version_info.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
# Version Info
|
||||||
|
|
||||||
|
The version of NB5 which provided some of the docs content is:
|
||||||
|
|
||||||
|
```
|
||||||
|
version=${project.version}
|
||||||
|
groupId=${project.groupId}
|
||||||
|
artifactId=${project.artifactId}
|
||||||
|
```
|
@ -16,10 +16,9 @@
|
|||||||
|
|
||||||
package io.nosqlbench.virtdata.userlibs.apps;
|
package io.nosqlbench.virtdata.userlibs.apps;
|
||||||
|
|
||||||
import io.nosqlbench.api.spi.BundledApp;
|
import io.nosqlbench.api.apps.BundledApp;
|
||||||
import io.nosqlbench.nb.annotations.Service;
|
import io.nosqlbench.nb.annotations.Service;
|
||||||
import io.nosqlbench.virtdata.userlibs.apps.diagnoseapp.VirtDataDiagnoseApp;
|
import io.nosqlbench.virtdata.userlibs.apps.diagnoseapp.VirtDataDiagnoseApp;
|
||||||
import io.nosqlbench.virtdata.userlibs.apps.docsapp.VirtDataGenDocsApp;
|
|
||||||
import io.nosqlbench.virtdata.userlibs.apps.valuechecker.VirtDataCheckPerfApp;
|
import io.nosqlbench.virtdata.userlibs.apps.valuechecker.VirtDataCheckPerfApp;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
package io.nosqlbench.virtdata.userlibs.apps.summarizer;
|
package io.nosqlbench.virtdata.userlibs.apps.summarizer;
|
||||||
|
|
||||||
import io.nosqlbench.api.spi.BundledApp;
|
import io.nosqlbench.api.apps.BundledApp;
|
||||||
import io.nosqlbench.nb.annotations.Service;
|
import io.nosqlbench.nb.annotations.Service;
|
||||||
import io.nosqlbench.virtdata.core.bindings.DataMapper;
|
import io.nosqlbench.virtdata.core.bindings.DataMapper;
|
||||||
import io.nosqlbench.virtdata.core.bindings.VirtData;
|
import io.nosqlbench.virtdata.core.bindings.VirtData;
|
||||||
|
Loading…
Reference in New Issue
Block a user