Merge remote-tracking branch 'nosqlbench/main' into main

This commit is contained in:
Yabin Meng 2021-03-16 15:02:48 -05:00
commit a725bcc11d
75 changed files with 556 additions and 618 deletions

View File

@ -98,11 +98,11 @@ jobs:
current_branch=$(git rev-parse --abbrev-ref HEAD) current_branch=$(git rev-parse --abbrev-ref HEAD)
if [[ ${current_branch} == *"main"* ]] if [[ ${current_branch} == *"main"* ]]
then then
echo "PRERELEASE=false" >> $GITHUB_ENV
echo "DOCKER_TAGS=nosqlbench/nosqlbench:latest,nosqlbench/nosqlbench:4x,nosqlbench/nosqlbench:${{ env.RELEASE_VERSION }}" >> $GITHUB_ENV
else
echo "PRERELEASE=true" >> $GITHUB_ENV echo "PRERELEASE=true" >> $GITHUB_ENV
echo "DOCKER_TAGS=nosqlbench/nosqlbench:${{ env.RELEASE_VERSION }}" >> $GITHUB_ENV echo "DOCKER_TAGS=nosqlbench/nosqlbench:nb4preview,nosqlbench/nosqlbench:${{ env.RELEASE_VERSION }}" >> $GITHUB_ENV
#else
# echo "PRERELEASE=false" >> $GITHUB_ENV
# echo "DOCKER_TAGS=nosqlbench/nosqlbench:latest,nosqlbench/nosqlbench:${{ env.RELEASE_VERSION }}" >> $GITHUB_ENV
fi fi
- name: prepare Maven release - name: prepare Maven release

View File

@ -113,7 +113,8 @@ are eager to get it into the hands of users who need it.
contributors alike. This takes on many forms. It is essential that we contributors alike. This takes on many forms. It is essential that we
keep looking for ways to connect the NoSQLBench community, doing more of keep looking for ways to connect the NoSQLBench community, doing more of
what works and less of what doesn't. If you want to help with community what works and less of what doesn't. If you want to help with community
development, please join our slack channel and raise your hand! development, please join our
[discord server](https://discord.gg/dBHRakusMN) and raise your hand!

View File

@ -54,15 +54,12 @@ armor, so that they feel capable of doing most things autonomously. Please keep
support form our community, and help us find those places where the docs are lacking. Maybe you can help us by adding support form our community, and help us find those places where the docs are lacking. Maybe you can help us by adding
some missing docs! some missing docs!
### NoSQLBench Slack ### NoSQLBench Discord Server
There is a new slack channel at nosqlbench.slack.com. In order to access the slack channel, you'll need an invite. You We have a discord server. This is where users and developers can discuss
can get that anything about NoSQLBench and support each other.
[here](https://join.slack.com/t/nosqlbench/shared_invite/zt-hvavu1tu-CLX_w7plZrv_A8kDBCw_3A), Please [join us](https://discord.gg/dBHRakusMN) there if you are a new
which will send you an invite in email: Slack Invite. This is just a simple google form that automates the invite user of NoSQLBench!
process.
Please join it if you are a new or existing NoSQLBench user and help us get it going!
## Contributing ## Contributing

View File

@ -1,26 +1 @@
- dbdbf6e8 (HEAD -> main, origin/main) merge fixes - 59a5ce89 Workarond for Pulsar bug
- 7ba0ca14 adapt pulsar driver to updated API naming
- 154876a3 resolve split version break after jetty security fix
- 304cba2f jetty security update
- 22ab5841 Minor document correction for clarification.
- 5639a544 post-merge fixups
- af4452be include block naming in opdef test
- ea8702c9 basic doc updates and cleanups
- 345877c0 allow both count and counter in old and new versions of error handler
- 63158fcd support mapped blocks
- f1a15230 Minor code change - change method name from IsBoolean() to isBoolean()
- 3ad3cc6b Minor document update
- 58a93bd7 Document update
- adf1ea03 Pulsar Batch API, Async API (partial), yaml file structure,
- 27856703 update cqld4 pom versions
- ada7aaad minor opdef fix
- 0880f0cd pulsar merge fixes
- 8b0f4615 cqld4 partial progress
- b3084fdd Pulsar Reader API with Avro schema support
- b0da4a14 Pulsar Consumer API with Avro schema support
- 3543dd8b support counter error handler name for cross-compatibility
- d59f3f0d remove temporary typo warning
- c3f01b12 make deprecation warning for v1 yaml format stronger
- eb784a13 backport question anchors with deprecation warning
- 50c03632 document op dispenser as OpDispenser type
- a27ea6cd reset cqld4 for reinit

View File

@ -9,7 +9,7 @@
<parent> <parent>
<artifactId>mvn-defaults</artifactId> <artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath> <relativePath>../mvn-defaults</relativePath>
</parent> </parent>
@ -18,7 +18,7 @@
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>nb-api</artifactId> <artifactId>nb-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
@ -31,75 +31,90 @@
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId> <artifactId>jetty-server</artifactId>
<version>11.0.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId> <artifactId>jetty-servlets</artifactId>
<version>9.4.35.v20201120</version> <version>11.0.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId> <artifactId>jetty-servlet</artifactId>
<version>11.0.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.eclipse.jetty</groupId> <groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-rewrite</artifactId> <artifactId>jetty-rewrite</artifactId>
<version>11.0.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.glassfish.jersey.core</groupId> <groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId> <artifactId>jersey-server</artifactId>
<version>3.0.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.glassfish.jersey.core</groupId> <groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId> <artifactId>jersey-common</artifactId>
<version>3.0.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.glassfish.jersey.containers</groupId> <groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-jetty-servlet</artifactId> <artifactId>jersey-container-jetty-servlet</artifactId>
<version>3.0.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.glassfish.jersey.inject</groupId> <groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId> <artifactId>jersey-hk2</artifactId>
<version>3.0.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId> <artifactId>commons-compress</artifactId>
<version>1.20</version>
</dependency> </dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.glassfish.jersey.media</groupId> <groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId> <artifactId>jersey-media-json-jackson</artifactId>
<version>3.0.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId> <groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId> <artifactId>jackson-jaxrs-json-provider</artifactId>
<version>2.12.2</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.3.0.1</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.4.0-b180830.0438</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.xml.bind</groupId> <groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId> <artifactId>jaxb-api</artifactId>
</dependency> <version>2.4.0-b180830.0359</version>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax.activation</groupId> <groupId>javax.activation</groupId>
<artifactId>activation</artifactId> <artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>virtdata-api</artifactId> <artifactId>virtdata-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -5,6 +5,8 @@ import io.nosqlbench.docsys.api.Docs;
import io.nosqlbench.docsys.api.WebServiceObject; import io.nosqlbench.docsys.api.WebServiceObject;
import io.nosqlbench.docsys.handlers.FavIconHandler; import io.nosqlbench.docsys.handlers.FavIconHandler;
import io.nosqlbench.nb.api.spi.SimpleServiceLoader; import io.nosqlbench.nb.api.spi.SimpleServiceLoader;
import jakarta.servlet.DispatcherType;
import jakarta.servlet.ServletRegistration;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.eclipse.jetty.rewrite.handler.RewriteHandler; import org.eclipse.jetty.rewrite.handler.RewriteHandler;
@ -26,8 +28,6 @@ import org.glassfish.jersey.server.ServerProperties;
import org.glassfish.jersey.server.model.ResourceMethod; import org.glassfish.jersey.server.model.ResourceMethod;
import org.glassfish.jersey.servlet.ServletContainer; import org.glassfish.jersey.servlet.ServletContainer;
import javax.servlet.DispatcherType;
import javax.servlet.ServletRegistration;
import java.awt.*; import java.awt.*;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.net.URI; import java.net.URI;

View File

@ -1,18 +1,17 @@
package io.nosqlbench.docsys.endpoints; package io.nosqlbench.docsys.endpoints;
import io.nosqlbench.docsys.api.WebServiceObject;
import io.nosqlbench.docsys.core.NBWebServer; import io.nosqlbench.docsys.core.NBWebServer;
import io.nosqlbench.nb.annotations.Service; import io.nosqlbench.nb.annotations.Service;
import io.nosqlbench.docsys.api.WebServiceObject; import jakarta.inject.Singleton;
import org.apache.logging.log4j.Logger; import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.Configuration;
import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.MediaType;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import javax.inject.Singleton;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Configuration;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
@Service(value = WebServiceObject.class, selector = "docserver-status") @Service(value = WebServiceObject.class, selector = "docserver-status")
@Singleton @Singleton

View File

@ -7,13 +7,13 @@ import io.nosqlbench.docsys.api.WebServiceObject;
import io.nosqlbench.docsys.core.DocsysPathLoader; import io.nosqlbench.docsys.core.DocsysPathLoader;
import io.nosqlbench.docsys.core.PathWalker; import io.nosqlbench.docsys.core.PathWalker;
import io.nosqlbench.nb.annotations.Service; import io.nosqlbench.nb.annotations.Service;
import jakarta.inject.Singleton;
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import javax.inject.Singleton;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.net.URLDecoder; import java.net.URLDecoder;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.nio.file.Files; import java.nio.file.Files;
@ -128,13 +128,6 @@ public class DocsysMarkdownEndpoint implements WebServiceObject {
return list; return list;
} }
// @GET
// @Path("file")
// @Produces(MediaType.TEXT_PLAIN)
// public String getFileByPath(@QueryParam("path") String pathspec) {
// return getFile(pathspec);
// }
//
/** /**
* @param pathspec the path as known to the manifest * @param pathspec the path as known to the manifest
* @return The contents of a file * @return The contents of a file
@ -153,25 +146,6 @@ public class DocsysMarkdownEndpoint implements WebServiceObject {
} }
} }
// private String getFile(String pathspec) {
// pathspec = URLDecoder.decode(pathspec, StandardCharsets.UTF_8);
// for (java.nio.file.Path path : enabled.getPaths()) {
// java.nio.file.Path resolved = path.resolve(pathspec);
// if (Files.isDirectory(resolved)) {
// throw new RuntimeException("Path is a directory: '" + pathspec + "'");
// }
// if (Files.exists(resolved)) {
// try {
// String content = Files.readString(resolved, StandardCharsets.UTF_8);
// return content;
// } catch (IOException e) {
// throw new RuntimeException(e);
// }
// }
// }
// throw new RuntimeException("Unable to find any valid file at '" + pathspec + "'");
// }
public java.nio.file.Path findPath(String pathspec) { public java.nio.file.Path findPath(String pathspec) {
pathspec = URLDecoder.decode(pathspec, StandardCharsets.UTF_8); pathspec = URLDecoder.decode(pathspec, StandardCharsets.UTF_8);
for (java.nio.file.Path path : enabled.getPaths()) { for (java.nio.file.Path path : enabled.getPaths()) {

View File

@ -1,12 +1,12 @@
package io.nosqlbench.docsys.handlers; package io.nosqlbench.docsys.handlers;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.eclipse.jetty.http.HttpStatus; import org.eclipse.jetty.http.HttpStatus;
import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.servlet.ServletHandler; import org.eclipse.jetty.servlet.ServletHandler;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
public class EndpointsHandler extends ServletHandler { public class EndpointsHandler extends ServletHandler {

View File

@ -1,17 +1,17 @@
package io.nosqlbench.docsys.handlers; package io.nosqlbench.docsys.handlers;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.eclipse.jetty.http.HttpHeader; import org.eclipse.jetty.http.HttpHeader;
import org.eclipse.jetty.http.HttpMethod; import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.handler.AbstractHandler; import org.eclipse.jetty.server.handler.AbstractHandler;
import org.eclipse.jetty.util.IO; import org.eclipse.jetty.util.IO;
import org.eclipse.jetty.util.resource.Resource; import org.eclipse.jetty.util.resource.Resource;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException; import java.io.IOException;
import java.net.URL; import java.net.URL;
import java.nio.file.Path; import java.nio.file.Path;

View File

@ -1,14 +1,14 @@
package io.nosqlbench.docsys.core; package io.nosqlbench.docsys.core;
import io.nosqlbench.docsys.api.WebServiceObject; import io.nosqlbench.docsys.api.WebServiceObject;
import org.apache.logging.log4j.Logger; import jakarta.inject.Singleton;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import javax.inject.Singleton;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;

View File

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

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>mvn-defaults</artifactId> <artifactId>mvn-defaults</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath> <relativePath>../mvn-defaults</relativePath>
</parent> </parent>
@ -23,13 +23,13 @@
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId> <artifactId>engine-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId> <artifactId>drivers-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -144,18 +144,19 @@ public class CqlActivity extends SimpleActivity implements Activity, ActivityDef
return session; return session;
} }
private String canonicalizeBindings(String input) { // for testing
public static String canonicalizeBindings(String input) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
Pattern questionPattern = Pattern.compile("\\?(?<arg>\\w+)"); Pattern questionPattern = Pattern.compile("\\?(?<arg>\\w+)");
Matcher matcher = questionPattern.matcher(input); Matcher matcher = questionPattern.matcher(input);
int count = 0; int count = 0;
while (matcher.find()) { while (matcher.find()) {
matcher.appendReplacement(sb, matcher.group("arg")); matcher.appendReplacement(sb, "{" + matcher.group("arg") + "}");
count++; count++;
} }
matcher.appendTail(sb); matcher.appendTail(sb);
if (count > 0) { if (count > 0) {
logger.warn("You are using a deprecated data binding syntax in '" + input + "'. This is supported in the classic CQL driver," + logger.warn("You are using deprecated data binding syntax in '" + input + "'. This is supported in the classic CQL driver," +
" but it is not recognized by other workloads. Please change to the {standard} binding syntax. The canonical" + " but it is not recognized by other workloads. Please change to the {standard} binding syntax. The canonical" +
" syntax for CQL is rendered automatically."); " syntax for CQL is rendered automatically.");
} }
@ -191,7 +192,7 @@ public class CqlActivity extends SimpleActivity implements Activity, ActivityDef
for (OpTemplate stmtDef : stmts) { for (OpTemplate stmtDef : stmts) {
ParsedStmt parsed = stmtDef.getParsed(this::canonicalizeBindings).orError(); ParsedStmt parsed = stmtDef.getParsed(CqlActivity::canonicalizeBindings).orError();
boolean prepared = stmtDef.getParamOrDefault("prepared", true); boolean prepared = stmtDef.getParamOrDefault("prepared", true);
boolean parameterized = stmtDef.getParamOrDefault("parameterized", false); boolean parameterized = stmtDef.getParamOrDefault("parameterized", false);
long ratio = stmtDef.getParamOrDefault("ratio", 1); long ratio = stmtDef.getParamOrDefault("ratio", 1);

View File

@ -1,32 +1,7 @@
package io.nosqlbench.activitytype.cql.statements.core; package io.nosqlbench.activitytype.cql.statements.core;
import java.io.File; import com.datastax.driver.core.*;
import java.io.IOException; import com.datastax.driver.core.policies.*;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.UnknownHostException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import javax.net.ssl.SSLContext;
import com.datastax.driver.core.Cluster;
import com.datastax.driver.core.NettyOptions;
import com.datastax.driver.core.ProtocolOptions;
import com.datastax.driver.core.RemoteEndpointAwareJdkSSLOptions;
import com.datastax.driver.core.Session;
import com.datastax.driver.core.policies.DefaultRetryPolicy;
import com.datastax.driver.core.policies.LoadBalancingPolicy;
import com.datastax.driver.core.policies.LoggingRetryPolicy;
import com.datastax.driver.core.policies.RetryPolicy;
import com.datastax.driver.core.policies.RoundRobinPolicy;
import com.datastax.driver.core.policies.WhiteListPolicy;
import com.datastax.driver.dse.DseCluster; import com.datastax.driver.dse.DseCluster;
import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.SocketChannel;
import io.netty.handler.codec.haproxy.HAProxyCommand; import io.netty.handler.codec.haproxy.HAProxyCommand;
@ -45,6 +20,18 @@ import io.nosqlbench.nb.api.errors.BasicError;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import javax.net.ssl.SSLContext;
import java.io.File;
import java.io.IOException;
import java.net.Inet6Address;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.UnknownHostException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.*;
public class CQLSessionCache implements Shutdownable { public class CQLSessionCache implements Shutdownable {
private final static Logger logger = LogManager.getLogger(CQLSessionCache.class); private final static Logger logger = LogManager.getLogger(CQLSessionCache.class);
@ -81,8 +68,8 @@ public class CQLSessionCache implements Shutdownable {
String driverType = activityDef.getParams().getOptionalString("cqldriver").orElse("dse"); String driverType = activityDef.getParams().getOptionalString("cqldriver").orElse("dse");
Cluster.Builder builder = Cluster.Builder builder =
driverType.toLowerCase().equals("dse") ? DseCluster.builder() : driverType.equalsIgnoreCase("dse") ? DseCluster.builder() :
driverType.toLowerCase().equals("oss") ? Cluster.builder() : null; driverType.equalsIgnoreCase("oss") ? Cluster.builder() : null;
if (builder == null) { if (builder == null) {
throw new RuntimeException("The driver type '" + driverType + "' is not recognized"); throw new RuntimeException("The driver type '" + driverType + "' is not recognized");
@ -185,6 +172,15 @@ public class CQLSessionCache implements Shutdownable {
.ifPresent(builder::withSpeculativeExecutionPolicy); .ifPresent(builder::withSpeculativeExecutionPolicy);
} }
activityDef.getParams().getOptionalString("protocol_version")
.map(String::toUpperCase)
.map(ProtocolVersion::valueOf)
.map(pv -> {
logger.info("protocol_version=>" + pv);
return pv;
})
.ifPresent(builder::withProtocolVersion);
activityDef.getParams().getOptionalString("socketoptions") activityDef.getParams().getOptionalString("socketoptions")
.map(sockopts -> { .map(sockopts -> {
logger.info("socketoptions=>" + sockopts); logger.info("socketoptions=>" + sockopts);

View File

@ -1,14 +1,13 @@
package io.nosqlbench.endpoints.cql; package io.nosqlbench.endpoints.cql;
import io.nosqlbench.generators.cql.lang.CqlWorkloadGen;
import io.nosqlbench.docsys.api.WebServiceObject; import io.nosqlbench.docsys.api.WebServiceObject;
import io.nosqlbench.generators.cql.lang.CqlWorkloadGen;
import io.nosqlbench.nb.annotations.Service; import io.nosqlbench.nb.annotations.Service;
import jakarta.inject.Singleton;
import javax.inject.Singleton; import jakarta.ws.rs.POST;
import javax.ws.rs.POST; import jakarta.ws.rs.Path;
import javax.ws.rs.Path; import jakarta.ws.rs.core.MediaType;
import javax.ws.rs.core.MediaType; import jakarta.ws.rs.core.Response;
import javax.ws.rs.core.Response;
@Service(value = WebServiceObject.class, selector = "cql-workload-generator") @Service(value = WebServiceObject.class, selector = "cql-workload-generator")
@Path("/services/cql/") @Path("/services/cql/")

View File

@ -62,14 +62,21 @@ activity types.
The only option supported for this version is `retrypolicy=logging`, The only option supported for this version is `retrypolicy=logging`,
which uses the default retry policy, but with logging added. which uses the default retry policy, but with logging added.
- **reconnectpolicy** default: none - Applies a reconnection policy in the driver - **reconnectpolicy** default: none - Applies a reconnection policy in the
Supports either `reconnectpolicy=exponential(minDelayInMs,maxDelayInMs)` or `reconnectpolicy=constant(delayInMs)`. driver Supports
The driver reconnects using this policy when the entire cluster becomes unavailable. either `reconnectpolicy=exponential(minDelayInMs,maxDelayInMs)`
or `reconnectpolicy=constant(delayInMs)`. The driver reconnects using
this policy when the entire cluster becomes unavailable.
- **protocol_version** default: unset, defaults to driver default behavior
- Set the CQL protocol version. Valid values are V1, V2, V3, V4, V5,
DSE_V1, DSE_V2. Protocol is usually auto-negotiated, however, the
initial connection may use a lower protocol to ensure connectivity to
older server versions. If you know you are running on a newer server
version, you can set this to match.
- **pooling** default: none - Applies the connection pooling options - **pooling** default: none - Applies the connection pooling options to
to the policy. the policy. Examples:
Examples:
- `pooling=4:10` - `pooling=4:10`
keep between 4 and 10 connections to LOCAL hosts keep between 4 and 10 connections to LOCAL hosts
- `pooling=4:10,2:5` - `pooling=4:10,2:5`

View File

@ -0,0 +1,14 @@
package io.nosqlbench.activitytype.cql.core;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
public class CqlActivityTest {
@Test
public void testCanonicalize() {
String cb = CqlActivity.canonicalizeBindings("A ?b C");
assertThat(cb).isEqualTo("A {b} C");
}
}

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>mvn-defaults</artifactId> <artifactId>mvn-defaults</artifactId>
<version>4.15.19-SNAPSHOT</version> <version>4.15.20-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath> <relativePath>../mvn-defaults</relativePath>
</parent> </parent>
@ -23,13 +23,13 @@
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId> <artifactId>engine-api</artifactId>
<version>4.15.19-SNAPSHOT</version> <version>4.15.20-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId> <artifactId>drivers-api</artifactId>
<version>4.15.19-SNAPSHOT</version> <version>4.15.20-SNAPSHOT</version>
</dependency> </dependency>
@ -61,7 +61,7 @@
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>virtdata-lib-basics</artifactId> <artifactId>virtdata-lib-basics</artifactId>
<version>4.15.19-SNAPSHOT</version> <version>4.15.20-SNAPSHOT</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>

View File

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

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>mvn-defaults</artifactId> <artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath> <relativePath>../mvn-defaults</relativePath>
</parent> </parent>
@ -20,13 +20,13 @@
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId> <artifactId>engine-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId> <artifactId>drivers-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>mvn-defaults</artifactId> <artifactId>mvn-defaults</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath> <relativePath>../mvn-defaults</relativePath>
</parent> </parent>
@ -23,13 +23,13 @@
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId> <artifactId>engine-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId> <artifactId>drivers-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>

View File

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

View File

@ -72,7 +72,7 @@ public class HttpFormatParser {
private final static Pattern DOENCODE = Pattern.compile("(URLENCODE|E)\\[\\[(?<data>.+?)\\]\\]"); private final static Pattern DOENCODE = Pattern.compile("(URLENCODE|E)\\[\\[(?<data>.+?)\\]\\]");
private static String rewriteExplicitSections(String template) { public static String rewriteExplicitSections(String template) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
Matcher matcher = DOENCODE.matcher(template); Matcher matcher = DOENCODE.matcher(template);
@ -86,14 +86,14 @@ public class HttpFormatParser {
} }
private static String rewriteStaticsOnly(String template) { public static String rewriteStaticsOnly(String template) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
String input = template; String input = template;
Matcher matcher = ParsedTemplate.STANDARD_ANCHOR.matcher(input); Matcher matcher = ParsedTemplate.STANDARD_ANCHOR.matcher(input);
int idx = 0; int idx = 0;
while (matcher.find()) { while (matcher.find()) {
String pre = input.substring(0, matcher.start()); String pre = input.substring(idx, matcher.start());
sb.append(URLEncoder.encode(pre, StandardCharsets.UTF_8)); sb.append(URLEncoder.encode(pre, StandardCharsets.UTF_8));
sb.append(matcher.group()); sb.append(matcher.group());
idx = matcher.end(); idx = matcher.end();

View File

@ -1,4 +1,4 @@
# nb -v run driver=http yaml=http-iot tags=phase:schema stargate_host=my_stargate_host # nb -v run driver=http yaml=http-iot tags=phase:schema host=my_stargate_host stargate_host=my_stargate_host auth_token=$AUTH_TOKEN
description: | description: |
This workload emulates a time-series data model and access patterns. This workload emulates a time-series data model and access patterns.
This should be identical to the cql variant except for: This should be identical to the cql variant except for:
@ -85,7 +85,7 @@ blocks:
params: params:
ratio: <<read_ratio:1>> ratio: <<read_ratio:1>>
statements: statements:
- main-select: GET /v2/keyspaces/<<keyspace:baselines>>/<<table:iot>>?where=E[[{"machine_id":{"$eq":"{machine_id}"}},"sensor_name":{"$eq":"{sensor_name}"},"page-size":{"$eq":"<<limit:10>>"}}]] - main-select: GET http://<<stargate_host:stargate>>:<<stargate_port:8082>>/v2/keyspaces/<<keyspace:baselines>>/<<table:iot>>?where=E[[{"machine_id":{"$eq":"{machine_id}"},"sensor_name":{"$eq":"{sensor_name}"}}]]&page-size=<<limit:10>>
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -106,7 +106,7 @@ blocks:
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{ {
"machine_id": "{machine_id}" "machine_id": "{machine_id}",
"sensor_name": "{sensor_name}", "sensor_name": "{sensor_name}",
"time": "{time}", "time": "{time}",
"sensor_value": "{sensor_value}", "sensor_value": "{sensor_value}",

View File

@ -1,4 +1,4 @@
# nb -v run driver=http yaml=http-keyvalue tags=phase:schema stargate_host=my_stargate_host # nb -v run driver=http yaml=http-keyvalue tags=phase:schema stargate_host=my_stargate_host host=my_stargate_host auth_token=$AUTH_TOKEN
description: | description: |
This workload emulates a key-value data model and access patterns. This workload emulates a key-value data model and access patterns.
This should be identical to the cql variant except for: This should be identical to the cql variant except for:
@ -7,7 +7,7 @@ description: |
scenarios: scenarios:
default: default:
- run driver=http tags==phase:schema threads==1 cycles==UNDEF - run driver=cql tags==phase:schema threads==1 cycles==UNDEF
- run driver=http tags==phase:rampup cycles===TEMPLATE(rampup-cycles,10000000) threads=auto - run driver=http tags==phase:rampup cycles===TEMPLATE(rampup-cycles,10000000) threads=auto
- run driver=http tags==phase:main cycles===TEMPLATE(main-cycles,10000000) threads=auto - run driver=http tags==phase:main cycles===TEMPLATE(main-cycles,10000000) threads=auto
bindings: bindings:
@ -23,42 +23,21 @@ blocks:
- name: schema - name: schema
tags: tags:
phase: schema phase: schema
params:
prepared: false
statements: statements:
- create-keyspace: POST http://<<stargate_host:stargate>>:<<stargate_port:8082>>/v2/schemas/keyspaces - create-keyspace: |
Accept: "application/json" create keyspace if not exists <<keyspace:baselines>>
X-Cassandra-Request-Id: "{request_id}" WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '<<rf:1>>'}
X-Cassandra-Token: "<<auth_token:my_auth_token>>" AND durable_writes = true;
Content-Type: "application/json"
body: |
{
"name": "<<keyspace:baselines>>"
}
tags: tags:
name: create-keyspace name: create-keyspace
- create-table: POST http://<<stargate_host:stargate>>:<<stargate_port:8082>>/v2/schemas/keyspaces/<<keyspace:baselines>>/tables - create-table: |
Accept: "application/json" create table if not exists <<keyspace:baselines>>.<<table:keyvalue>> (
X-Cassandra-Request-Id: "{request_id}" key text,
X-Cassandra-Token: "<<auth_token:my_auth_token>>" value text,
Content-Type: "application/json" PRIMARY KEY (key)
body: | );
{
"name": "<<table:keyvalue>>",
"columnDefinitions":
[
{
"name": "key",
"typeDefinition": "text"
},
{
"name": "value",
"typeDefinition": "text"
}
],
"primaryKey":
{
"partitionKey": ["key"]
}
}
tags: tags:
name: create-table name: create-table
- name: rampup - name: rampup
@ -84,7 +63,7 @@ blocks:
params: params:
ratio: 5 ratio: 5
statements: statements:
- main-select: GET /v2/keyspaces/<<keyspace:baselines>>/<<table:keyvalue>>?where=E[[{"key":{"$eq":"{rw_key}"}}}]] - main-select: GET http://<<stargate_host:stargate>>:<<stargate_port:8082>>/v2/keyspaces/<<keyspace:baselines>>/<<table:keyvalue>>/{rw_key}
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -105,7 +84,7 @@ blocks:
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{ {
"key": "{rw_key}" "key": "{rw_key}",
"value": "{rw_value}" "value": "{rw_value}"
} }
tags: tags:

View File

@ -1,4 +1,4 @@
# nb -v http-tabular rampup-cycles=1E6 main-cycles=1E9 stargate_host=my_stargate_host # nb -v http-tabular rampup-cycles=1E6 main-cycles=1E9 stargate_host=my_stargate_host host=my_stargate_host auth_token=$AUTH_TOKEN
description: | description: |
This workload emulates a time-series data model and access patterns. This workload emulates a time-series data model and access patterns.
This should be identical to the cql variant except for: This should be identical to the cql variant except for:
@ -8,7 +8,7 @@ description: |
scenarios: scenarios:
default: default:
- run driver=http tags==phase:schema threads==1 cycles==UNDEF - run driver=cql tags==phase:schema threads==1 cycles==UNDEF
- run driver=http tags==phase:rampup cycles===TEMPLATE(rampup-cycles,10000000) threads=auto - run driver=http tags==phase:rampup cycles===TEMPLATE(rampup-cycles,10000000) threads=auto
- run driver=http tags==phase:main cycles===TEMPLATE(main-cycles,10000000) threads=auto - run driver=http tags==phase:main cycles===TEMPLATE(main-cycles,10000000) threads=auto
bindings: bindings:
@ -31,47 +31,22 @@ blocks:
- name: schema - name: schema
tags: tags:
phase: schema phase: schema
params:
prepared: false
statements: statements:
- create-keyspace: POST http://<<stargate_host:stargate>>:<<stargate_port:8082>>/v2/schemas/keyspaces - create-keyspace: |
Accept: "application/json" create keyspace if not exists <<keyspace:baselines>>
X-Cassandra-Request-Id: "{request_id}" WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '<<rf:1>>'}
X-Cassandra-Token: "<<auth_token:my_auth_token>>" AND durable_writes = true;
Content-Type: "application/json"
body: |
{
"name": "<<keyspace:baselines>>"
}
tags: tags:
name: create-keyspace name: create-keyspace
- create-table: POST http://<<stargate_host:stargate>>:<<stargate_port:8082>>/v2/schemas/keyspaces/<<keyspace:baselines>>/tables - create-table: |
Accept: "application/json" create table if not exists <<keyspace:baselines>>.<<table:tabular>> (
X-Cassandra-Request-Id: "{request_id}" part text,
X-Cassandra-Token: "<<auth_token:my_auth_token>>" clust text,
Content-Type: "application/json" data text,
body: | PRIMARY KEY (part,clust)
{ );
"name": "<<table:tabular>>",
"columnDefinitions":
[
{
"name": "part",
"typeDefinition": "text"
},
{
"name": "clust",
"typeDefinition": "text"
},
{
"name": "data",
"typeDefinition": "text"
}
],
"primaryKey":
{
"partitionKey": ["part"],
"clusteringKey": ["clust"]
}
}
tags: tags:
name: create-table name: create-table
- name: rampup - name: rampup
@ -98,7 +73,7 @@ blocks:
params: params:
ratio: 5 ratio: 5
statements: statements:
- main-select: GET /v2/keyspaces/<<keyspace:baselines>>/<<table:tabular>>?where=E[[{"part":{"$eq":"{part_layout}"}},"page-size":{"$eq":"{limit}"}}]] - main-select: GET http://<<stargate_host:stargate>>:<<stargate_port:8082>>/v2/keyspaces/<<keyspace:baselines>>/<<table:tabular>>/{part_read}&page-size={limit}
Accept: "application/json" Accept: "application/json"
X-Cassandra-Request-Id: "{request_id}" X-Cassandra-Request-Id: "{request_id}"
X-Cassandra-Token: "<<auth_token:my_auth_token>>" X-Cassandra-Token: "<<auth_token:my_auth_token>>"
@ -119,7 +94,7 @@ blocks:
Content-Type: "application/json" Content-Type: "application/json"
body: | body: |
{ {
"part": "{part_write}" "part": "{part_write}",
"clust": "{clust_write}", "clust": "{clust_write}",
"data": "{data_write}" "data": "{data_write}"
} }

View File

@ -0,0 +1,33 @@
package io.nosqlbench.activitytype.cmds;
import org.junit.Test;
import java.util.Map;
import static org.assertj.core.api.Assertions.assertThat;
public class HttpFormatParserTest {
@Test
public void testSimpleFormat() {
Map<String, String> map = HttpFormatParser.parseInline("GET http://host:12345/path/{\"v\":{\"name\":\"value\"}");
assertThat(map).containsAllEntriesOf(
Map.of("method", "GET", "uri", "http://host:12345/path/{\"v\":{\"name\":\"value\"}")
);
}
@Test
public void testUrlEncodeBasic() {
Map<String, String> map2 = HttpFormatParser.parseInline("GET http://host:12345/path/E[[{\"v\":{\"name\":\"value\"}]]");
assertThat(map2).containsAllEntriesOf(
Map.of("method", "GET", "uri", "http://host:12345/path/%7B%22v%22%3A%7B%22name%22%3A%22value%22%7D"));
}
@Test
public void testUrlEncodeExceptBindings() {
Map<String, String> map3 = HttpFormatParser.parseInline("GET http://host:12345/path/E[[{\"v\":{\"{name}\":\"{value}\"}]]");
assertThat(map3).containsAllEntriesOf(
Map.of("method", "GET", "uri", "http://host:12345/path/%7B%22v%22%3A%7B%22{name}%22%3A%22{value}%22%7D"));
}
}

View File

@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>nosqlbench</artifactId> <artifactId>nosqlbench</artifactId>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@ -18,7 +18,7 @@
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId> <artifactId>engine-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>mvn-defaults</artifactId> <artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath> <relativePath>../mvn-defaults</relativePath>
</parent> </parent>
@ -22,13 +22,13 @@
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId> <artifactId>drivers-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId> <artifactId>engine-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>mvn-defaults</artifactId> <artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath> <relativePath>../mvn-defaults</relativePath>
</parent> </parent>
@ -44,13 +44,13 @@
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId> <artifactId>engine-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>driver-stdout</artifactId> <artifactId>driver-stdout</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<!-- <dependency>--> <!-- <dependency>-->

View File

@ -7,7 +7,7 @@
<parent> <parent>
<artifactId>mvn-defaults</artifactId> <artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath> <relativePath>../mvn-defaults</relativePath>
</parent> </parent>
@ -21,13 +21,13 @@
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId> <artifactId>engine-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId> <artifactId>drivers-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>mvn-defaults</artifactId> <artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath> <relativePath>../mvn-defaults</relativePath>
</parent> </parent>
@ -42,13 +42,13 @@
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId> <artifactId>engine-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>driver-stdout</artifactId> <artifactId>driver-stdout</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/commons-beanutils/commons-beanutils --> <!-- https://mvnrepository.com/artifact/commons-beanutils/commons-beanutils -->

View File

@ -38,7 +38,8 @@ public class PulsarConsumerMapper extends PulsarOpMapper {
return new PulsarConsumerOp( return new PulsarConsumerOp(
consumer, consumer,
clientSpace.getPulsarSchema(), clientSpace.getPulsarSchema(),
asyncApi asyncApi,
clientSpace.getPulsarClientConf().getConsumerTimeoutSeconds()
); );
} }
} }

View File

@ -2,37 +2,61 @@ package io.nosqlbench.driver.pulsar.ops;
import io.nosqlbench.driver.pulsar.util.AvroUtil; import io.nosqlbench.driver.pulsar.util.AvroUtil;
import io.nosqlbench.driver.pulsar.util.PulsarActivityUtil; import io.nosqlbench.driver.pulsar.util.PulsarActivityUtil;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.pulsar.client.api.*; import org.apache.pulsar.client.api.*;
import org.apache.pulsar.common.schema.SchemaType; import org.apache.pulsar.common.schema.SchemaType;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
public class PulsarConsumerOp implements PulsarOp { public class PulsarConsumerOp implements PulsarOp {
private final static Logger logger = LogManager.getLogger(PulsarConsumerOp.class);
private final Consumer<?> consumer; private final Consumer<?> consumer;
private final Schema<?> pulsarSchema; private final Schema<?> pulsarSchema;
private final boolean asyncPulsarOp; private final boolean asyncPulsarOp;
private final int timeoutSeconds;
public PulsarConsumerOp(Consumer<?> consumer, Schema<?> schema, boolean asyncPulsarOp) { public PulsarConsumerOp(Consumer<?> consumer, Schema<?> schema, boolean asyncPulsarOp, int timeoutSeconds) {
this.consumer = consumer; this.consumer = consumer;
this.pulsarSchema = schema; this.pulsarSchema = schema;
this.asyncPulsarOp = asyncPulsarOp; this.asyncPulsarOp = asyncPulsarOp;
this.timeoutSeconds = timeoutSeconds;
} }
public void syncConsume() { public void syncConsume() {
try { try {
Message<?> message = consumer.receive(); Message<?> message;
if (timeoutSeconds <= 0) {
// wait forever
message = consumer.receive();
} else {
// we cannot use Consumer#receive(timeout, timeunit) due to
// https://github.com/apache/pulsar/issues/9921
message = consumer
.receiveAsync()
.get(timeoutSeconds, TimeUnit.SECONDS);
}
SchemaType schemaType = pulsarSchema.getSchemaInfo().getType(); SchemaType schemaType = pulsarSchema.getSchemaInfo().getType();
if (PulsarActivityUtil.isAvroSchemaTypeStr(schemaType.name())) { if (PulsarActivityUtil.isAvroSchemaTypeStr(schemaType.name())) {
if (logger.isDebugEnabled()) {
String avroDefStr = pulsarSchema.getSchemaInfo().getSchemaDefinition(); String avroDefStr = pulsarSchema.getSchemaInfo().getSchemaDefinition();
org.apache.avro.generic.GenericRecord avroGenericRecord = org.apache.avro.generic.GenericRecord avroGenericRecord =
AvroUtil.GetGenericRecord_ApacheAvro(avroDefStr, message.getData()); AvroUtil.GetGenericRecord_ApacheAvro(avroDefStr, message.getData());
System.out.println("msg-key=" + message.getKey() + " msg-payload=" + avroGenericRecord.toString()); logger.debug("msg-key={} msg-payload={}", message.getKey(), avroGenericRecord.toString());
}
} else { } else {
System.out.println("msg-key=" + message.getKey() + " msg-payload=" + new String(message.getData())); if (logger.isDebugEnabled()) {
logger.debug("msg-key={} msg-payload={}", message.getKey(), new String(message.getData()));
}
} }
consumer.acknowledge(message.getMessageId()); consumer.acknowledge(message.getMessageId());
} catch (PulsarClientException e) { } catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
} }

View File

@ -228,6 +228,13 @@ public class PulsarNBClientConf {
else else
return confValue.toString(); return confValue.toString();
} }
public int getConsumerTimeoutSeconds() {
Object confValue = getConsumerConfValue("consumer.timeout");
if (confValue == null)
return -1; // infinite
else
return Integer.parseInt(confValue.toString());
}
public String getConsumerSubscriptionName() { public String getConsumerSubscriptionName() {
Object confValue = getConsumerConfValue("consumer.subscriptionName"); Object confValue = getConsumerConfValue("consumer.subscriptionName");
if (confValue == null) if (confValue == null)

View File

@ -7,7 +7,7 @@
<parent> <parent>
<artifactId>mvn-defaults</artifactId> <artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath> <relativePath>../mvn-defaults</relativePath>
</parent> </parent>
@ -22,13 +22,13 @@
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId> <artifactId>engine-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId> <artifactId>drivers-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -7,7 +7,7 @@
<parent> <parent>
<artifactId>mvn-defaults</artifactId> <artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath> <relativePath>../mvn-defaults</relativePath>
</parent> </parent>
@ -24,19 +24,19 @@
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId> <artifactId>engine-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId> <artifactId>drivers-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>driver-stdout</artifactId> <artifactId>driver-stdout</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -7,7 +7,7 @@
<parent> <parent>
<artifactId>mvn-defaults</artifactId> <artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath> <relativePath>../mvn-defaults</relativePath>
</parent> </parent>
@ -22,13 +22,13 @@
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId> <artifactId>engine-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId> <artifactId>drivers-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>mvn-defaults</artifactId> <artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath> <relativePath>../mvn-defaults</relativePath>
</parent> </parent>
@ -23,13 +23,13 @@
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>nb-api</artifactId> <artifactId>nb-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>virtdata-userlibs</artifactId> <artifactId>virtdata-userlibs</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>mvn-defaults</artifactId> <artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath> <relativePath>../mvn-defaults</relativePath>
</parent> </parent>
@ -23,25 +23,25 @@
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>nb-api</artifactId> <artifactId>nb-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>drivers-api</artifactId> <artifactId>drivers-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>nb-annotations</artifactId> <artifactId>nb-annotations</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>virtdata-userlibs</artifactId> <artifactId>virtdata-userlibs</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -35,4 +35,11 @@ public class RawStmtsDocList {
public List<RawStmtsDoc> getStmtsDocs() { public List<RawStmtsDoc> getStmtsDocs() {
return rawStmtsDocList; return rawStmtsDocList;
} }
public String toString() {
int docs = rawStmtsDocList.size();
int blocks = rawStmtsDocList.stream().map(RawStmtsDoc::getBlocks).mapToInt(List::size).sum();
long optemplates = rawStmtsDocList.stream().flatMap(d -> d.getBlocks().stream()).flatMap(s -> s.getRawStmtDefs().stream()).count();
return "docs:" + docs + " blocks:" + blocks + " optemplates:" + optemplates;
}
} }

View File

@ -190,16 +190,14 @@ public class CoreMotor<D> implements ActivityDefObserver, Motor<D>, Stoppable {
public void run() { public void run() {
try { try {
strideRateLimiter = activity.getStrideLimiter(); inputTimer = activity.getInstrumentation().getOrCreateInputTimer();
cycleRateLimiter = activity.getCycleLimiter();
phaseRateLimiter = activity.getPhaseLimiter();
stridesServiceTimer = activity.getInstrumentation().getOrCreateStridesServiceTimer(); stridesServiceTimer = activity.getInstrumentation().getOrCreateStridesServiceTimer();
stridesResponseTimer = activity.getInstrumentation().getStridesResponseTimerOrNull(); stridesResponseTimer = activity.getInstrumentation().getStridesResponseTimerOrNull();
optrackerBlockCounter = activity.getInstrumentation().getOrCreateOpTrackerBlockedCounter(); optrackerBlockCounter = activity.getInstrumentation().getOrCreateOpTrackerBlockedCounter();
strideRateLimiter = activity.getStrideLimiter();
inputTimer = activity.getInstrumentation().getOrCreateInputTimer(); cycleRateLimiter = activity.getCycleLimiter();
phaseRateLimiter = activity.getPhaseLimiter();
if (slotState.get() == Finished) { if (slotState.get() == Finished) {

View File

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

View File

@ -20,6 +20,7 @@ import io.nosqlbench.engine.core.script.Scenario;
import io.nosqlbench.engine.core.script.ScenariosExecutor; import io.nosqlbench.engine.core.script.ScenariosExecutor;
import io.nosqlbench.engine.core.script.ScriptParams; import io.nosqlbench.engine.core.script.ScriptParams;
import io.nosqlbench.engine.docker.DockerMetricsManager; import io.nosqlbench.engine.docker.DockerMetricsManager;
import io.nosqlbench.nb.api.SystemId;
import io.nosqlbench.nb.api.annotations.Annotation; import io.nosqlbench.nb.api.annotations.Annotation;
import io.nosqlbench.nb.api.annotations.Layer; import io.nosqlbench.nb.api.annotations.Layer;
import io.nosqlbench.nb.api.content.Content; import io.nosqlbench.nb.api.content.Content;
@ -285,6 +286,10 @@ public class NBCLI {
System.exit(0); System.exit(0);
} }
logger.info("Running NoSQLBench Version " + new VersionInfo().getVersion());
logger.info("client-hardware: " + SystemId.getHostSummary());
logger.debug("initializing annotators with config:'" + annotatorsConfig + "'"); logger.debug("initializing annotators with config:'" + annotatorsConfig + "'");
Annotators.init(annotatorsConfig); Annotators.init(annotatorsConfig);
Annotators.recordAnnotation( Annotators.recordAnnotation(

View File

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

View File

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

View File

@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>mvn-defaults</artifactId> <artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath> <relativePath>../mvn-defaults</relativePath>
</parent> </parent>
@ -20,15 +20,6 @@
<dependencies> <dependencies>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<dependency> <dependency>
<groupId>io.netty</groupId> <groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId> <artifactId>netty-handler</artifactId>
@ -65,7 +56,7 @@
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>engine-api</artifactId> <artifactId>engine-api</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>

View File

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

View File

@ -5,15 +5,17 @@ weight: 10
# Getting Support # Getting Support
In general, our goals with NoSQLBench are to make the help systems and examples wrap around the users like a suit of In general, our goals with NoSQLBench are to make the help systems and
armor, so that they feel capable of doing most things without having to ask for help. Please keep this in mind when examples wrap around the users like a suit of armor, so that they feel
looking for personal support form our community, and help us find those places where the docs are lacking. Maybe you can capable of doing most things without having to ask for help. Please keep
help us by adding some missing docs! this in mind when looking for personal support form our community, and
help us find those places where the docs are lacking. Maybe you can help
us by adding some missing docs!
## Built-In Docs ## Built-In Docs
The documentation for NoSQLBench is quite thorough. On the command line, you can see a list of built-in docs with the The documentation for NoSQLBench is quite thorough. On the command line,
command: you can see a list of built-in docs with the command:
nb help topics nb help topics
@ -21,37 +23,43 @@ To read any topic, simply use the command:
nb help <topic> nb help <topic>
The documentation system you are looking at right now includes the same docs you can find above already and more. They The documentation system you are looking at right now includes the same
are automatically included when NoSQLBench is built. docs you can find above already and more. They are automatically included
when NoSQLBench is built.
## NoSQLBench Slack ## NoSQLBench Discord Server
Please click the We have a discord server. This is where users and developers can discuss
[Invite Link for nosqlbench.slack.com](https://join.slack.com/t/nosqlbench/shared_invite/zt-grrg64g3-6SeVi2jaum0cxp51WnvOVA) anything about NoSQLBench and support each other.
to join us. Please [join us](https://discord.gg/dBHRakusMN) there if you are a new
user of NoSQLBench!
Please join it if you are a new or existing NoSQLBench user and help us get it going!
## General Feedback ## General Feedback
These guidelines are mirrored at the These guidelines are mirrored at the
[Submitting Feedback](https://github.com/nosqlbench/nosqlbench/wiki/Submitting-Feedback) wiki page at the nosqlbench [Submitting Feedback](https://github.com/nosqlbench/nosqlbench/wiki/Submitting-Feedback)
project site, which is also where any `[Submit Feedback]` links should will take you. wiki page at the nosqlbench project site, which is also where
any `[Submit Feedback]` links should will take you.
## Bug Fixes ## Bug Fixes
If you think you have found a bug, please If you think you have found a bug, please
[file a bug report](https://github.com/nosqlbench/nosqlbench/issues/new?labels=bug). nosqlbench is actively used within [file a bug report](https://github.com/nosqlbench/nosqlbench/issues/new?labels=bug)
DataStax, and verified bugs will get attention as resources permit. Bugs reports which are more detailed, or bug reports . nosqlbench is actively used within DataStax, and verified bugs will get
which include steps to reproduce will get attention first. attention as resources permit. Bugs reports which are more detailed, or
bug reports which include steps to reproduce will get attention first.
## Feature Requests ## Feature Requests
If you would like to see something in nosqlbench that is not there yet,please If you would like to see something in nosqlbench that is not there
[submit a feature request](https://github.com/nosqlbench/nosqlbench/issues/new?labels=feature). yet,please
[submit a feature request](https://github.com/nosqlbench/nosqlbench/issues/new?labels=feature)
.
## Documentation Requests ## Documentation Requests
If you would like to see a specific nosqlbench or testing topic added to the guidebook, please If you would like to see a specific nosqlbench or testing topic added to
[request docs content](https://github.com/nosqlbench/nosqlbench/issues/new?labels=docs). the guidebook, please
[request docs content](https://github.com/nosqlbench/nosqlbench/issues/new?labels=docs)
.

View File

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

View File

@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>mvn-defaults</artifactId> <artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath> <relativePath>../mvn-defaults</relativePath>
</parent> </parent>
@ -47,7 +47,7 @@
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>engine-cli</artifactId> <artifactId>engine-cli</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>

View File

@ -8,11 +8,11 @@ import io.nosqlbench.nb.annotations.Service;
import io.swagger.parser.OpenAPIParser; import io.swagger.parser.OpenAPIParser;
import io.swagger.parser.v2.SwaggerConverter; import io.swagger.parser.v2.SwaggerConverter;
import io.swagger.util.Json; import io.swagger.util.Json;
import jakarta.inject.Singleton;
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import javax.inject.Singleton;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.Map; import java.util.Map;
@Service(value = WebServiceObject.class, selector = "openapi") @Service(value = WebServiceObject.class, selector = "openapi")

View File

@ -13,14 +13,14 @@ import io.nosqlbench.engine.rest.services.WorkspaceFinder;
import io.nosqlbench.engine.rest.transfertypes.LiveScenarioView; import io.nosqlbench.engine.rest.transfertypes.LiveScenarioView;
import io.nosqlbench.engine.rest.transfertypes.RunScenarioRequest; import io.nosqlbench.engine.rest.transfertypes.RunScenarioRequest;
import io.nosqlbench.nb.annotations.Service; import io.nosqlbench.nb.annotations.Service;
import jakarta.inject.Singleton;
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.*;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import org.joda.time.DateTime; import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormat;
import javax.inject.Singleton;
import javax.ws.rs.*;
import javax.ws.rs.core.*;
import java.io.CharArrayWriter; import java.io.CharArrayWriter;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.util.*; import java.util.*;

View File

@ -4,18 +4,18 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import io.nosqlbench.docsys.api.WebServiceObject; import io.nosqlbench.docsys.api.WebServiceObject;
import io.nosqlbench.nb.annotations.Service; import io.nosqlbench.nb.annotations.Service;
import io.nosqlbench.virtdata.userlibs.apps.docsapp.AutoDocsWebService; import io.nosqlbench.virtdata.userlibs.apps.docsapp.AutoDocsWebService;
import jakarta.inject.Singleton;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Configuration;
import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import javax.inject.Singleton;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Configuration;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.Map; import java.util.Map;
@Service(value = WebServiceObject.class, selector = "service-status") @Service(value = WebServiceObject.class, selector = "service-status")

View File

@ -6,19 +6,22 @@ import io.nosqlbench.engine.api.scenarios.WorkloadDesc;
import io.nosqlbench.engine.rest.services.WorkspaceFinder; import io.nosqlbench.engine.rest.services.WorkspaceFinder;
import io.nosqlbench.nb.annotations.Service; import io.nosqlbench.nb.annotations.Service;
import io.nosqlbench.virtdata.userlibs.apps.docsapp.AutoDocsWebService; import io.nosqlbench.virtdata.userlibs.apps.docsapp.AutoDocsWebService;
import jakarta.inject.Singleton;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.Configuration;
import jakarta.ws.rs.core.Context;
import jakarta.ws.rs.core.MediaType;
import jakarta.ws.rs.core.Response;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import javax.inject.Singleton; import java.util.ArrayList;
import javax.ws.rs.GET; import java.util.List;
import javax.ws.rs.Path; import java.util.Map;
import javax.ws.rs.Produces; import java.util.Set;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Configuration;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Service(value = WebServiceObject.class, selector = "workload-finder") @Service(value = WebServiceObject.class, selector = "workload-finder")

View File

@ -6,13 +6,13 @@ import io.nosqlbench.engine.rest.services.WorkspaceFinder;
import io.nosqlbench.engine.rest.transfertypes.WorkspaceItemView; import io.nosqlbench.engine.rest.transfertypes.WorkspaceItemView;
import io.nosqlbench.engine.rest.transfertypes.WorkspaceView; import io.nosqlbench.engine.rest.transfertypes.WorkspaceView;
import io.nosqlbench.nb.annotations.Service; import io.nosqlbench.nb.annotations.Service;
import jakarta.inject.Singleton;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.ws.rs.*;
import jakarta.ws.rs.core.*;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import javax.inject.Singleton;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.*;
import javax.ws.rs.core.*;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.util.List; import java.util.List;

View File

@ -1,11 +1,11 @@
package io.nosqlbench.engine.rest.services; package io.nosqlbench.engine.rest.services;
import io.nosqlbench.engine.rest.transfertypes.WorkspaceView; import io.nosqlbench.engine.rest.transfertypes.WorkspaceView;
import jakarta.ws.rs.core.Configuration;
import jakarta.ws.rs.core.MediaType;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import javax.ws.rs.core.Configuration;
import javax.ws.rs.core.MediaType;
import java.io.IOException; import java.io.IOException;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.nio.file.*; import java.nio.file.*;

View File

@ -3,7 +3,7 @@
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>mvn-defaults</artifactId> <artifactId>mvn-defaults</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<properties> <properties>
@ -23,16 +23,10 @@
<dse.driver.version>1.9.0</dse.driver.version> <dse.driver.version>1.9.0</dse.driver.version>
<flexmark.version>0.61.6</flexmark.version> <flexmark.version>0.61.6</flexmark.version>
<greenrobot.version>3.0.0-RC1</greenrobot.version> <greenrobot.version>3.0.0-RC1</greenrobot.version>
<jackson.jaxrs.version>2.9.8</jackson.jaxrs.version>
<javapoet.version>1.11.1</javapoet.version> <javapoet.version>1.11.1</javapoet.version>
<javax.activation.version>1.1.1</javax.activation.version>
<javax.ws.rs.version>2.1</javax.ws.rs.version>
<jaxb.api.version>2.4.0-b180830.0359</jaxb.api.version> <jaxb.api.version>2.4.0-b180830.0359</jaxb.api.version>
<jaxb.core.version>2.3.0.1</jaxb.core.version> <jaxb.core.version>2.3.0.1</jaxb.core.version>
<jaxb.impl.version>2.4.0-b180830.0438</jaxb.impl.version> <jaxb.impl.version>2.4.0-b180830.0438</jaxb.impl.version>
<jersey.media.version>2.29</jersey.media.version>
<jersey.version>2.27</jersey.version>
<jetty.version>9.4.7.v20170914</jetty.version>
<jmh.version>1.22</jmh.version> <jmh.version>1.22</jmh.version>
<joda.time.version>2.9.9</joda.time.version> <joda.time.version>2.9.9</joda.time.version>
<junit.jupiter.version>5.3.2</junit.jupiter.version> <junit.jupiter.version>5.3.2</junit.jupiter.version>
@ -101,13 +95,6 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>${javax.activation.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.mpierce.metrics.reservoir</groupId> <groupId>org.mpierce.metrics.reservoir</groupId>
<artifactId>hdrhistogram-metrics-reservoir</artifactId> <artifactId>hdrhistogram-metrics-reservoir</artifactId>
@ -138,12 +125,6 @@
<version>${commons.text.version}</version> <version>${commons.text.version}</version>
</dependency> </dependency>
<!-- <dependency>-->
<!-- <groupId>org.slf4j</groupId>-->
<!-- <artifactId>slf4j-api</artifactId>-->
<!-- <version>${slf4j.version}</version>-->
<!-- </dependency>-->
<dependency> <dependency>
<groupId>org.openjdk.jmh</groupId> <groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId> <artifactId>jmh-core</artifactId>
@ -321,76 +302,16 @@
<version>4.8</version> <version>4.8</version>
</dependency> </dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-rewrite</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-common</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-jetty-servlet</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.inject</groupId>
<artifactId>jersey-hk2</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId> <artifactId>commons-compress</artifactId>
<version>${commons.compress.version}</version> <version>${commons.compress.version}</version>
</dependency> </dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>${javax.ws.rs.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>${jersey.media.version}</version>
</dependency>
<dependency> <dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId> <groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId> <artifactId>jackson-jaxrs-json-provider</artifactId>
<version>${jackson.jaxrs.version}</version> <version>2.9.8</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>${jaxb.api.version}</version>
</dependency> </dependency>
<dependency> <dependency>
@ -541,7 +462,8 @@
</executions> </executions>
<configuration> <configuration>
<!-- <argLine>&#45;&#45;enable-preview</argLine>--> <!-- <argLine>&#45;&#45;enable-preview</argLine>-->
<forkMode>always</forkMode> <forkCount>1</forkCount>
<reuseForks>false</reuseForks>
<includes> <includes>
<include>**/*Integrated*Test*.java</include> <include>**/*Integrated*Test*.java</include>
<include>**/*IntegrationTest.java</include> <include>**/*IntegrationTest.java</include>

View File

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

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>mvn-defaults</artifactId> <artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath> <relativePath>../mvn-defaults</relativePath>
</parent> </parent>
@ -31,7 +31,7 @@
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>nb-annotations</artifactId> <artifactId>nb-annotations</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>

View File

@ -1,16 +1,21 @@
package io.nosqlbench.nb.api; package io.nosqlbench.nb.api;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import oshi.SystemInfo; import oshi.SystemInfo;
import oshi.hardware.CentralProcessor;
import oshi.hardware.HardwareAbstractionLayer; import oshi.hardware.HardwareAbstractionLayer;
import oshi.hardware.NetworkIF; import oshi.hardware.NetworkIF;
import java.util.*; import java.util.*;
public class SystemId { public class SystemId {
public static String getNodeId() { public static String getNodeId() {
SystemInfo sysinfo = new SystemInfo(); SystemInfo sysinfo = new SystemInfo();
HardwareAbstractionLayer hal = sysinfo.getHardware(); HardwareAbstractionLayer hal = sysinfo.getHardware();
List<NetworkIF> interfaces = hal.getNetworkIFs(); List<NetworkIF> interfaces = hal.getNetworkIFs();
Optional<String> first = interfaces.stream() Optional<String> first = interfaces.stream()
.filter(i -> !i.getName().startsWith("docker" )) .filter(i -> !i.getName().startsWith("docker" ))
.filter(i -> !i.getName().equals("lo" )) .filter(i -> !i.getName().equals("lo" ))
@ -27,10 +32,44 @@ public class SystemId {
return 0; return 0;
}) })
.flatMap(iface -> Arrays.stream(iface.getIPv4addr().clone())) .flatMap(iface -> Arrays.stream(iface.getIPv4addr().clone()))
.filter(addr -> !(addr.startsWith("127." ))) .filter(addr -> !(addr.startsWith("127.")))
.findFirst(); .findFirst();
String systemID = first.orElse("UNKNOWN_SYSTEM_ID" ); String systemID = first.orElse("UNKNOWN_SYSTEM_ID");
return systemID; return systemID;
} }
public static String getHostSummary() {
SystemInfo sysinfo = new SystemInfo();
HardwareAbstractionLayer hal = sysinfo.getHardware();
CentralProcessor p = hal.getProcessor();
Gson gson = new GsonBuilder().create();
Set<String> ifspeeds = new HashSet<>();
hal.getNetworkIFs().forEach(
x -> {
long spd = x.getSpeed();
if (spd < (1024 * 1024 * 1000)) {
ifspeeds.add(String.format("%.0fMib", (double) (spd / (1024 * 1024))));
} else {
ifspeeds.add(String.format("%.0fGib", (double) (spd / (1024 * 1024 * 1000))));
}
}
);
Map<String, Object> details = Map.of(
"physical-cores", String.valueOf(p.getPhysicalProcessorCount()),
"logical-cores", String.valueOf(p.getLogicalProcessors().size()),
"max-frequency-ghz", String.format("%.2f", (p.getMaxFreq() / 1_000_000_000_000.0d)),
"sockets", String.valueOf(p.getPhysicalPackageCount()),
"processor-name", String.valueOf(p.getProcessorIdentifier().getName()),
"memory-GiB", String.format("%.2f", hal.getMemory().getTotal() / (1024.0 * 1024.0 * 1024.0)),
"heap-max-GiB", String.format("%.2f", Runtime.getRuntime().maxMemory() / (1024.0 * 1024.0 * 1024.0)),
"if-speeds", ifspeeds
);
return gson.toJson(details);
}
} }

View File

@ -0,0 +1,12 @@
package io.nosqlbench.nb.api;
import org.junit.Test;
public class SystemIdTest {
@Test
public void testHostInfo() {
String info = SystemId.getHostSummary();
System.out.println(info);
}
}

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>mvn-defaults</artifactId> <artifactId>mvn-defaults</artifactId>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
<relativePath>../mvn-defaults</relativePath> <relativePath>../mvn-defaults</relativePath>
</parent> </parent>
@ -24,143 +24,111 @@
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>engine-rest</artifactId> <artifactId>engine-rest</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>engine-cli</artifactId> <artifactId>engine-cli</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>engine-docs</artifactId> <artifactId>engine-docs</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>engine-core</artifactId> <artifactId>engine-core</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>engine-extensions</artifactId> <artifactId>engine-extensions</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<!-- <dependency>-->
<!-- <groupId>io.nosqlbench</groupId>-->
<!-- <artifactId>driver-web</artifactId>-->
<!-- <version>3.12.83-SNAPSHOT</version>-->
<!-- </dependency>-->
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>driver-web</artifactId> <artifactId>driver-web</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>driver-kafka</artifactId> <artifactId>driver-kafka</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>driver-stdout</artifactId> <artifactId>driver-stdout</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>driver-diag</artifactId> <artifactId>driver-diag</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>driver-tcp</artifactId> <artifactId>driver-tcp</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>driver-http</artifactId> <artifactId>driver-http</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>driver-jmx</artifactId> <artifactId>driver-jmx</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>driver-dsegraph-shaded</artifactId> <artifactId>driver-dsegraph-shaded</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>driver-cql-shaded</artifactId> <artifactId>driver-cql-shaded</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>driver-cqlverify</artifactId> <artifactId>driver-cqlverify</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>driver-mongodb</artifactId> <artifactId>driver-mongodb</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>driver-pulsar</artifactId> <artifactId>driver-pulsar</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<!-- <dependency>-->
<!-- <groupId>io.nosqlbench</groupId>-->
<!-- <artifactId>nb-runtime</artifactId>-->
<!-- <version>2.12.51-SNAPSHOT</version>-->
<!-- </dependency>-->
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>driver-cockroachdb</artifactId> <artifactId>driver-cockroachdb</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.github.docker-java</groupId>-->
<!-- <artifactId>docker-java-api</artifactId>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.github.docker-java</groupId>-->
<!-- <artifactId>docker-java-core</artifactId>-->
<!-- </dependency>-->
</dependencies> </dependencies>
<build> <build>
@ -200,17 +168,6 @@
</executions> </executions>
</plugin> </plugin>
<!-- <filters>-->
<!-- <filter>-->
<!-- <artifact>*:*</artifact>-->
<!-- <excludes>-->
<!-- <exclude>META-INF/*.SF</exclude>-->
<!-- <exclude>META-INF/*.DSA</exclude>-->
<!-- <exclude>META-INF/*.RSA</exclude>-->
<!-- </excludes>-->
<!-- </filter>-->
<!-- </filters>-->
<plugin> <plugin>
<groupId>org.codehaus.mojo</groupId> <groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId> <artifactId>exec-maven-plugin</artifactId>
@ -269,7 +226,7 @@
<dependency> <dependency>
<groupId>io.nosqlbench</groupId> <groupId>io.nosqlbench</groupId>
<artifactId>driver-mongodb</artifactId> <artifactId>driver-mongodb</artifactId>
<version>4.15.20-SNAPSHOT</version> <version>4.15.29-SNAPSHOT</version>
</dependency> </dependency>
</dependencies> </dependencies>
</profile> </profile>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,17 +1,16 @@
package io.nosqlbench.virtdata.userlibs.apps; package io.nosqlbench.virtdata.userlibs.apps;
import io.nosqlbench.docsys.api.WebServiceObject;
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.ResolverDiagnostics; import io.nosqlbench.virtdata.core.bindings.ResolverDiagnostics;
import io.nosqlbench.virtdata.core.bindings.VirtData; import io.nosqlbench.virtdata.core.bindings.VirtData;
import io.nosqlbench.docsys.api.WebServiceObject; import jakarta.inject.Singleton;
import jakarta.ws.rs.GET;
import javax.inject.Singleton; import jakarta.ws.rs.Path;
import javax.ws.rs.GET; import jakarta.ws.rs.Produces;
import javax.ws.rs.Path; import jakarta.ws.rs.QueryParam;
import javax.ws.rs.Produces; import jakarta.ws.rs.core.MediaType;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
@Service(value = WebServiceObject.class, selector = "virtdata") @Service(value = WebServiceObject.class, selector = "virtdata")
@Singleton @Singleton

View File

@ -2,19 +2,19 @@ package io.nosqlbench.virtdata.userlibs.apps.docsapp;
import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.databind.SerializationFeature;
import com.fasterxml.jackson.jaxrs.annotation.JacksonFeatures; import com.fasterxml.jackson.jaxrs.annotation.JacksonFeatures;
import io.nosqlbench.nb.annotations.Service;
import io.nosqlbench.virtdata.core.bindings.VirtDataDocs;
import io.nosqlbench.docsys.api.WebServiceObject; import io.nosqlbench.docsys.api.WebServiceObject;
import io.nosqlbench.nb.annotations.Service;
import io.nosqlbench.virtdata.api.processors.DocFuncData; import io.nosqlbench.virtdata.api.processors.DocFuncData;
import io.nosqlbench.virtdata.core.bindings.VirtDataDocs;
import jakarta.inject.Singleton;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import jakarta.ws.rs.core.MediaType;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
import javax.inject.Singleton;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;