mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2024-12-22 07:03:35 -06:00
remainder of changes for scenario rework that need to be itemized
This commit is contained in:
parent
a2ac3e3f75
commit
ae19037bce
@ -17,15 +17,14 @@
|
||||
package io.nosqlbench.adapter.amqp;
|
||||
|
||||
import io.nosqlbench.adapter.amqp.ops.AmqpTimeTrackOp;
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.BaseDriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
@ -2,13 +2,13 @@ package io.nosqlbench.adapter.amqp;
|
||||
|
||||
/*
|
||||
* Copyright (c) 2022 nosqlbench
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@ -19,8 +19,8 @@ package io.nosqlbench.adapter.amqp;
|
||||
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapterLoader.class, selector = "amqp")
|
||||
|
@ -19,7 +19,7 @@ package io.nosqlbench.adapter.amqp;
|
||||
import io.nosqlbench.adapter.amqp.dispensers.AmqpMsgRecvOpDispenser;
|
||||
import io.nosqlbench.adapter.amqp.dispensers.AmqpMsgSendOpDispenser;
|
||||
import io.nosqlbench.adapter.amqp.ops.AmqpTimeTrackOp;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpDispenser;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
|
@ -23,10 +23,10 @@ import io.nosqlbench.adapter.amqp.exception.AmqpAdapterInvalidParamException;
|
||||
import io.nosqlbench.adapter.amqp.exception.AmqpAdapterUnexpectedException;
|
||||
import io.nosqlbench.adapter.amqp.util.AmqpAdapterUtil;
|
||||
import io.nosqlbench.adapter.amqp.util.AmqpClientConf;
|
||||
import io.nosqlbench.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.api.config.standard.Param;
|
||||
import io.nosqlbench.nb.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.Param;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
@ -20,8 +20,8 @@ import com.codahale.metrics.Counter;
|
||||
import com.codahale.metrics.Histogram;
|
||||
import com.codahale.metrics.Timer;
|
||||
import io.nosqlbench.adapter.amqp.dispensers.AmqpBaseOpDispenser;
|
||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
||||
package io.nosqlbench.adapter.cqld4;
|
||||
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapter.class, selector = "cql")
|
||||
|
@ -17,16 +17,15 @@
|
||||
package io.nosqlbench.adapter.cqld4;
|
||||
|
||||
import io.nosqlbench.adapter.cqld4.opmappers.Cqld4CoreOpMapper;
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.BaseDriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.flowtypes.Op;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
@ -2,13 +2,13 @@ package io.nosqlbench.adapter.cqld4;
|
||||
|
||||
/*
|
||||
* Copyright (c) 2022 nosqlbench
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@ -19,8 +19,8 @@ package io.nosqlbench.adapter.cqld4;
|
||||
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapterLoader.class, selector = "cqld4")
|
||||
|
@ -27,11 +27,11 @@ import com.datastax.oss.driver.internal.core.loadbalancing.helper.NodeFilterToDi
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import io.nosqlbench.adapter.cqld4.optionhelpers.OptionHelpers;
|
||||
import io.nosqlbench.api.config.standard.*;
|
||||
import io.nosqlbench.api.content.Content;
|
||||
import io.nosqlbench.api.content.NBIO;
|
||||
import io.nosqlbench.api.engine.util.SSLKsFactory;
|
||||
import io.nosqlbench.api.errors.BasicError;
|
||||
import io.nosqlbench.nb.api.config.standard.*;
|
||||
import io.nosqlbench.nb.api.nbio.Content;
|
||||
import io.nosqlbench.nb.api.nbio.NBIO;
|
||||
import io.nosqlbench.nb.api.engine.util.SSLKsFactory;
|
||||
import io.nosqlbench.nb.api.errors.BasicError;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
@ -19,7 +19,7 @@ package io.nosqlbench.adapter.cqld4;
|
||||
import com.datastax.oss.driver.api.core.cql.*;
|
||||
import com.datastax.oss.driver.api.core.type.DataType;
|
||||
import com.datastax.oss.protocol.internal.ProtocolConstants;
|
||||
import io.nosqlbench.api.errors.BasicError;
|
||||
import io.nosqlbench.nb.api.errors.BasicError;
|
||||
|
||||
/**
|
||||
* @see <a href="https://github.com/apache/cassandra/blob/bf96367f4d55692017e144980cf17963e31df127/doc/native_protocol_v5.spec">native protocol v5</a>
|
||||
|
@ -30,7 +30,7 @@ import com.datastax.oss.driver.api.core.type.VectorType;
|
||||
import com.datastax.oss.driver.api.core.type.codec.ExtraTypeCodecs;
|
||||
import com.datastax.oss.driver.api.core.type.codec.TypeCodec;
|
||||
import io.nosqlbench.adapter.cqld4.optypes.Cqld4CqlOp;
|
||||
import io.nosqlbench.api.errors.OpConfigError;
|
||||
import io.nosqlbench.nb.api.errors.OpConfigError;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
@ -26,7 +26,7 @@ import io.nosqlbench.adapter.cqld4.optypes.Cqld4CqlOp;
|
||||
import io.nosqlbench.adapter.cqld4.optypes.Cqld4CqlPreparedStatement;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
import io.nosqlbench.api.errors.OpConfigError;
|
||||
import io.nosqlbench.nb.api.errors.OpConfigError;
|
||||
import io.nosqlbench.virtdata.core.templates.ParsedTemplateString;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
@ -28,8 +28,8 @@ import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
import io.nosqlbench.engine.api.templating.TypeAndTarget;
|
||||
import io.nosqlbench.api.config.params.ParamsParser;
|
||||
import io.nosqlbench.api.errors.BasicError;
|
||||
import io.nosqlbench.nb.api.config.params.ParamsParser;
|
||||
import io.nosqlbench.nb.api.errors.BasicError;
|
||||
import io.nosqlbench.virtdata.core.templates.ParsedTemplateString;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -18,7 +18,7 @@ package io.nosqlbench.adapter.cqld4.opmappers;
|
||||
|
||||
import com.datastax.oss.driver.api.core.CqlSession;
|
||||
import io.nosqlbench.adapter.cqld4.Cqld4Space;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpDispenser;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
|
@ -28,7 +28,7 @@ import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.flowtypes.Op;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
import io.nosqlbench.engine.api.templating.TypeAndTarget;
|
||||
import io.nosqlbench.api.errors.OpConfigError;
|
||||
import io.nosqlbench.nb.api.errors.OpConfigError;
|
||||
import io.nosqlbench.virtdata.core.bindings.Bindings;
|
||||
import io.nosqlbench.virtdata.core.bindings.BindingsTemplate;
|
||||
import io.nosqlbench.virtdata.core.templates.ParsedTemplateString;
|
||||
|
@ -22,8 +22,8 @@ import com.datastax.oss.driver.api.core.config.OptionsMap;
|
||||
import com.datastax.oss.driver.api.core.config.TypedDriverOption;
|
||||
import com.datastax.oss.driver.internal.core.connection.ExponentialReconnectionPolicy;
|
||||
import com.datastax.oss.driver.internal.core.specex.ConstantSpeculativeExecutionPolicy;
|
||||
import io.nosqlbench.api.config.standard.*;
|
||||
import io.nosqlbench.api.errors.BasicError;
|
||||
import io.nosqlbench.nb.api.config.standard.*;
|
||||
import io.nosqlbench.nb.api.errors.BasicError;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
package io.nosqlbench.analysis;
|
||||
|
||||
import io.nosqlbench.api.apps.BundledApp;
|
||||
import io.nosqlbench.nb.api.apps.BundledApp;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import picocli.CommandLine;
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
package io.nosqlbench.cqlgen.api;
|
||||
|
||||
import io.nosqlbench.components.NBNamedElement;
|
||||
import io.nosqlbench.nb.api.components.NBNamedElement;
|
||||
import io.nosqlbench.cqlgen.model.CqlModel;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
@ -16,12 +16,12 @@
|
||||
|
||||
package io.nosqlbench.cqlgen.binders;
|
||||
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.cqlgen.model.CqlColumnBase;
|
||||
import io.nosqlbench.cqlgen.model.CqlModel;
|
||||
import io.nosqlbench.cqlgen.model.CqlTable;
|
||||
import io.nosqlbench.cqlgen.core.CGElementNamer;
|
||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabeledElement;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
package io.nosqlbench.cqlgen.bindspecs;
|
||||
|
||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabeledElement;
|
||||
|
||||
public interface BindingSpec {
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
package io.nosqlbench.cqlgen.bindspecs;
|
||||
|
||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabeledElement;
|
||||
|
||||
public class BindingSpecImpl implements BindingSpec {
|
||||
private NBLabeledElement target;
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
package io.nosqlbench.cqlgen.core;
|
||||
|
||||
import io.nosqlbench.api.content.Content;
|
||||
import io.nosqlbench.api.content.NBIO;
|
||||
import io.nosqlbench.nb.api.nbio.Content;
|
||||
import io.nosqlbench.nb.api.nbio.NBIO;
|
||||
import io.nosqlbench.cqlgen.api.BindingsLibrary;
|
||||
import io.nosqlbench.cqlgen.binders.Binding;
|
||||
import io.nosqlbench.cqlgen.model.CqlColumnBase;
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
package io.nosqlbench.cqlgen.core;
|
||||
|
||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabeledElement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
|
@ -18,9 +18,9 @@ package io.nosqlbench.cqlgen.core;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import io.nosqlbench.api.apps.BundledApp;
|
||||
import io.nosqlbench.api.content.Content;
|
||||
import io.nosqlbench.api.content.NBIO;
|
||||
import io.nosqlbench.nb.api.apps.BundledApp;
|
||||
import io.nosqlbench.nb.api.nbio.Content;
|
||||
import io.nosqlbench.nb.api.nbio.NBIO;
|
||||
import io.nosqlbench.cqlgen.api.BindingsLibrary;
|
||||
import io.nosqlbench.cqlgen.binders.Binding;
|
||||
import io.nosqlbench.cqlgen.binders.BindingsAccumulator;
|
||||
|
@ -16,9 +16,9 @@
|
||||
|
||||
package io.nosqlbench.cqlgen.model;
|
||||
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBNamedElement;
|
||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBNamedElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabeledElement;
|
||||
|
||||
public abstract class CqlColumnBase implements NBNamedElement, NBLabeledElement {
|
||||
|
||||
|
@ -17,9 +17,9 @@
|
||||
package io.nosqlbench.cqlgen.model;
|
||||
|
||||
import com.datastax.oss.driver.internal.core.util.Strings;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBNamedElement;
|
||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBNamedElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.cqlgen.core.CGKeyspaceStats;
|
||||
|
||||
import java.util.*;
|
||||
|
@ -16,9 +16,9 @@
|
||||
|
||||
package io.nosqlbench.cqlgen.model;
|
||||
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBNamedElement;
|
||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBNamedElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.cqlgen.core.CGTableStats;
|
||||
import io.nosqlbench.cqlgen.transformers.ComputedTableStats;
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
package io.nosqlbench.cqlgen.model;
|
||||
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
|
||||
public class CqlTableColumn extends CqlColumnBase {
|
||||
|
||||
|
@ -16,9 +16,9 @@
|
||||
|
||||
package io.nosqlbench.cqlgen.model;
|
||||
|
||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBNamedElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBNamedElement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
package io.nosqlbench.cqlgen.model;
|
||||
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
|
||||
public class CqlTypeColumn extends CqlColumnBase {
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
package io.nosqlbench.cqlgen.transformers;
|
||||
|
||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.virtdata.library.basics.shared.from_long.to_string.Combinations;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
package io.nosqlbench.cqlgen.transformers;
|
||||
|
||||
import io.nosqlbench.api.config.standard.NBConfigurable;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigurable;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.cqlgen.api.CGModelTransformer;
|
||||
import io.nosqlbench.cqlgen.api.CGTransformerConfigurable;
|
||||
import io.nosqlbench.cqlgen.core.CGWorkloadExporter;
|
||||
|
@ -22,11 +22,11 @@
|
||||
*/
|
||||
package io.nosqlbench.cqlgen.transformers;
|
||||
|
||||
import io.nosqlbench.api.config.standard.*;
|
||||
import io.nosqlbench.cqlgen.api.CGModelTransformer;
|
||||
import io.nosqlbench.cqlgen.core.CGWorkloadExporter;
|
||||
import io.nosqlbench.cqlgen.model.*;
|
||||
import io.nosqlbench.cqlgen.transformers.namecache.*;
|
||||
import io.nosqlbench.nb.api.config.standard.*;
|
||||
import io.nosqlbench.virtdata.core.bindings.DataMapper;
|
||||
import io.nosqlbench.virtdata.core.bindings.VirtData;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
@ -16,11 +16,11 @@
|
||||
|
||||
package io.nosqlbench.cqlgen.transformers;
|
||||
|
||||
import io.nosqlbench.api.config.standard.*;
|
||||
import io.nosqlbench.cqlgen.api.CGModelTransformer;
|
||||
import io.nosqlbench.cqlgen.core.CGSchemaStats;
|
||||
import io.nosqlbench.cqlgen.model.CqlModel;
|
||||
import io.nosqlbench.cqlgen.model.CqlTable;
|
||||
import io.nosqlbench.nb.api.config.standard.*;
|
||||
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
package io.nosqlbench.cqlgen.transformers.namecache;
|
||||
|
||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabeledElement;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.function.Function;
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
package io.nosqlbench.cqlgen.transformers.namecache;
|
||||
|
||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabeledElement;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedHashMap;
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
package io.nosqlbench.cqlgen.transformers.namecache;
|
||||
|
||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabeledElement;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedHashMap;
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
package io.nosqlbench.cqlgen.transformers.namecache;
|
||||
|
||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabeledElement;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
|
@ -17,8 +17,8 @@
|
||||
package io.nosqlbench.engine.extensions.vectormath;
|
||||
|
||||
import com.datastax.oss.driver.api.core.cql.Row;
|
||||
import io.nosqlbench.components.NBBaseComponent;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.components.NBBaseComponent;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
@ -16,9 +16,8 @@
|
||||
|
||||
package io.nosqlbench.engine.extensions.vectormath;
|
||||
|
||||
import io.nosqlbench.api.config.LabeledScenarioContext;
|
||||
import io.nosqlbench.api.extensions.ScriptingExtensionPluginInfo;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.extensions.ScriptingExtensionPluginInfo;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
@ -16,11 +16,11 @@ description: |
|
||||
|
||||
scenarios:
|
||||
cassandra:
|
||||
drop: run tags='block:drop' threads==undef cycles==undef
|
||||
drop: run tags='block:drop' threads==undef cycles==undef context=cassandra
|
||||
# nb5 cql-vector2 cassandra.schema host=localhost localdc=datacenter1 dimensions=100
|
||||
schema: run tags='op=create_.*' threads==undef cycles==undef
|
||||
schema: run tags='op=create_.*' threads==undef cycles==undef context=cassandra
|
||||
# nb5 cql-vector2 cassandra.rampup host=localhost localdc=datacenter1 dimensions=100 trainsize=1000000 dataset=glove-100-angular rate=10000
|
||||
rampup: run tags='block:rampup' threads=auto cycles=TEMPLATE(trainsize,set-the-trainsize) errors=counter,warn
|
||||
rampup: run tags='block:rampup' threads=auto cycles=TEMPLATE(trainsize,set-the-trainsize) errors=counter,warn context=cassandra
|
||||
# nb5 cql-vector2 cassandra.search_and_index testsize=10000 host=localhost localdc=datacenter1 dimensions=100 dataset=glove-100-angular --report-csv-to rmetrics:.*:5s
|
||||
read_recall: >-
|
||||
run alias=search_and_index tags='block:search_and_index,optype=select' labels='target:cassandra'
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
package io.nosqlbench.converters.cql.exporters;
|
||||
|
||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.cqlgen.core.CGElementNamer;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -58,7 +58,7 @@
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.nosqlbench</groupId>
|
||||
<artifactId>engine-api</artifactId>
|
||||
<artifactId>engine-core</artifactId>
|
||||
<version>${revision}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
@ -25,13 +25,13 @@ import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.BaseDriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.decorators.SyntheticOpTemplateProvider;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
import io.nosqlbench.api.config.params.NBParams;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.api.config.standard.NBReconfigurable;
|
||||
import io.nosqlbench.nb.api.config.params.NBParams;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.NBReconfigurable;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
@ -2,13 +2,13 @@ package io.nosqlbench.adapter.diag;
|
||||
|
||||
/*
|
||||
* Copyright (c) 2022 nosqlbench
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@ -18,8 +18,8 @@ package io.nosqlbench.adapter.diag;
|
||||
*/
|
||||
|
||||
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapterLoader.class, selector = "diag")
|
||||
|
@ -19,10 +19,10 @@ package io.nosqlbench.adapter.diag;
|
||||
import io.nosqlbench.adapter.diag.optasks.DiagTask;
|
||||
import io.nosqlbench.adapters.api.activityimpl.BaseOpDispenser;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.api.config.standard.NBReconfigurable;
|
||||
import io.nosqlbench.components.NBParentComponentInjection;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.NBReconfigurable;
|
||||
import io.nosqlbench.nb.api.components.NBParentComponentInjection;
|
||||
import io.nosqlbench.engine.api.activityapi.ratelimits.RateLimiter;
|
||||
import io.nosqlbench.nb.annotations.ServiceSelector;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
@ -19,9 +19,9 @@ package io.nosqlbench.adapter.diag;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpDispenser;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.api.config.standard.NBReconfigurable;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.NBReconfigurable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
|
@ -18,11 +18,11 @@ package io.nosqlbench.adapter.diag;
|
||||
|
||||
import io.nosqlbench.engine.api.activityapi.core.ActivityDefObserver;
|
||||
import io.nosqlbench.engine.api.activityapi.ratelimits.RateLimiter;
|
||||
import io.nosqlbench.api.engine.activityimpl.ActivityDef;
|
||||
import io.nosqlbench.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.api.config.standard.Param;
|
||||
import io.nosqlbench.nb.api.engine.activityimpl.ActivityDef;
|
||||
import io.nosqlbench.nb.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.Param;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
@ -16,9 +16,9 @@
|
||||
|
||||
package io.nosqlbench.adapter.diag.optasks;
|
||||
|
||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -16,10 +16,10 @@
|
||||
|
||||
package io.nosqlbench.adapter.diag.optasks;
|
||||
|
||||
import io.nosqlbench.api.config.standard.NBConfigurable;
|
||||
import io.nosqlbench.api.config.standard.NBReconfigurable;
|
||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.components.NBParentComponentInjection;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigurable;
|
||||
import io.nosqlbench.nb.api.config.standard.NBReconfigurable;
|
||||
import io.nosqlbench.nb.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.nb.api.components.NBParentComponentInjection;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.function.BiFunction;
|
||||
|
@ -16,11 +16,11 @@
|
||||
|
||||
package io.nosqlbench.adapter.diag.optasks;
|
||||
|
||||
import io.nosqlbench.api.config.standard.*;
|
||||
import io.nosqlbench.engine.api.activityapi.ratelimits.RateLimiter;
|
||||
import io.nosqlbench.engine.api.activityapi.ratelimits.RateLimiters;
|
||||
import io.nosqlbench.engine.api.activityapi.ratelimits.simrate.SimRateSpec;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
import io.nosqlbench.nb.api.config.standard.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -17,10 +17,10 @@
|
||||
package io.nosqlbench.adapter.diag.optasks;
|
||||
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
import io.nosqlbench.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.api.config.standard.Param;
|
||||
import io.nosqlbench.nb.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.Param;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -17,12 +17,12 @@
|
||||
package io.nosqlbench.adapter.diag.optasks;
|
||||
|
||||
import com.codahale.metrics.Gauge;
|
||||
import io.nosqlbench.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.api.config.standard.Param;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBParentComponentInjection;
|
||||
import io.nosqlbench.nb.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.Param;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBParentComponentInjection;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
import io.nosqlbench.virtdata.api.bindings.VirtDataConversions;
|
||||
import io.nosqlbench.virtdata.core.bindings.DataMapper;
|
||||
|
@ -16,12 +16,11 @@
|
||||
|
||||
package io.nosqlbench.adapter.diag.optasks;
|
||||
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
import io.nosqlbench.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.api.config.standard.Param;
|
||||
import io.nosqlbench.nb.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.Param;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -16,8 +16,11 @@
|
||||
|
||||
package io.nosqlbench.adapter.diag.optasks;
|
||||
|
||||
import io.nosqlbench.api.config.standard.*;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
import io.nosqlbench.nb.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.Param;
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
@ -16,10 +16,10 @@
|
||||
|
||||
package io.nosqlbench.adapter.diag.optasks;
|
||||
|
||||
import io.nosqlbench.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.api.config.standard.Param;
|
||||
import io.nosqlbench.nb.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.Param;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
import java.util.Map;
|
||||
|
@ -16,10 +16,10 @@
|
||||
|
||||
package io.nosqlbench.adapter.diag.optasks;
|
||||
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.api.config.standard.TestComponent;
|
||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.TestComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import org.assertj.core.data.Offset;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -16,18 +16,17 @@
|
||||
|
||||
package io.nosqlbench.adapter.dynamodb;
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.adapter.dynamodb.optypes.DynamoDBOp;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.BaseDriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Maturity;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
|
@ -2,13 +2,13 @@ package io.nosqlbench.adapter.dynamodb;
|
||||
|
||||
/*
|
||||
* Copyright (c) 2022 nosqlbench
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@ -19,8 +19,8 @@ package io.nosqlbench.adapter.dynamodb;
|
||||
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapterLoader.class, selector = "dynamodb")
|
||||
|
@ -25,7 +25,7 @@ import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
import io.nosqlbench.engine.api.templating.TypeAndTarget;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
|
||||
public class DynamoDBOpMapper implements OpMapper<DynamoDBOp> {
|
||||
|
||||
|
@ -21,11 +21,11 @@ import com.amazonaws.client.builder.AwsClientBuilder;
|
||||
import com.amazonaws.services.dynamodbv2.AmazonDynamoDB;
|
||||
import com.amazonaws.services.dynamodbv2.AmazonDynamoDBClientBuilder;
|
||||
import com.amazonaws.services.dynamodbv2.document.DynamoDB;
|
||||
import io.nosqlbench.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.api.config.standard.Param;
|
||||
import io.nosqlbench.api.errors.OpConfigError;
|
||||
import io.nosqlbench.nb.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.Param;
|
||||
import io.nosqlbench.nb.api.errors.OpConfigError;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
|
@ -24,7 +24,7 @@ import io.nosqlbench.adapter.dynamodb.optypes.DynamoDBOp;
|
||||
import io.nosqlbench.adapters.api.activityimpl.BaseOpDispenser;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
import io.nosqlbench.api.errors.OpConfigError;
|
||||
import io.nosqlbench.nb.api.errors.OpConfigError;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.function.LongFunction;
|
||||
|
@ -41,12 +41,33 @@
|
||||
<version>${revision}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.snakeyaml</groupId>
|
||||
<artifactId>snakeyaml-engine</artifactId>
|
||||
<version>2.7</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
<artifactId>gson</artifactId>
|
||||
<version>2.10.1</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.openapitools</groupId>
|
||||
<artifactId>openapi-generator</artifactId>
|
||||
<version>7.0.0-beta</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger.parser.v3</groupId>
|
||||
<artifactId>swagger-parser</artifactId>
|
||||
<version>2.1.14</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-core</artifactId>
|
||||
<version>2.2.10</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
@ -16,22 +16,21 @@
|
||||
|
||||
package io.nosqlbench.adapter.http;
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.adapter.http.core.HttpFormatParser;
|
||||
import io.nosqlbench.adapter.http.core.HttpOp;
|
||||
import io.nosqlbench.adapter.http.core.HttpOpMapper;
|
||||
import io.nosqlbench.adapter.http.core.HttpSpace;
|
||||
import io.nosqlbench.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.api.config.standard.Param;
|
||||
import io.nosqlbench.nb.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.Param;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.BaseDriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
|
@ -2,13 +2,13 @@ package io.nosqlbench.adapter.http;
|
||||
|
||||
/*
|
||||
* Copyright (c) 2022 nosqlbench
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@ -19,8 +19,8 @@ package io.nosqlbench.adapter.http;
|
||||
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapterLoader.class, selector = "http")
|
||||
|
@ -0,0 +1,166 @@
|
||||
/*
|
||||
* Copyright (c) 2023 nosqlbench
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.nosqlbench.adapter.http.apps;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import io.swagger.models.Model;
|
||||
import io.swagger.v3.oas.models.OpenAPI;
|
||||
import io.swagger.v3.oas.models.Operation;
|
||||
import io.swagger.v3.oas.models.PathItem;
|
||||
import io.swagger.v3.oas.models.media.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class BodySchemaAssembly {
|
||||
private Map<String,String> bindingCache = new LinkedHashMap<>();
|
||||
public String assembleBodyTemplate(OpenAPI model, String elementName, Schema schema, String path, PathItem pathinfo, Operation op) {
|
||||
|
||||
Object prototype = findPrototype(model, elementName, schema);
|
||||
Gson gson = new GsonBuilder().setPrettyPrinting().create();
|
||||
String prototypeText = gson.toJson(prototype);
|
||||
return prototypeText;
|
||||
|
||||
}
|
||||
|
||||
private Object findPrototype(OpenAPI model, String name, Schema<?> schema) {
|
||||
return switch (schema) {
|
||||
case StringSchema str -> prototypeForString(model, name, str);
|
||||
case ObjectSchema obj -> prototypeForObject(model, name, obj);
|
||||
case ArraySchema ary -> prototypeForAry(model, name, ary);
|
||||
case ComposedSchema com -> prototypeForComposed(model, name, com);
|
||||
case NumberSchema num -> prototypeForNumber(model, name, num);
|
||||
case BinarySchema bin -> prototypeForBinary(model, name, bin);
|
||||
case MapSchema map -> prototypeForMap(model, name, map);
|
||||
case IntegerSchema intg -> prototypeForInt(model, name, intg);
|
||||
case BooleanSchema bs -> prototypeForBs(model, name, bs);
|
||||
default ->
|
||||
throw new RuntimeException("implement schema mapper for " + schema.getClass().getSimpleName());
|
||||
};
|
||||
}
|
||||
|
||||
private Object prototypeForBs(OpenAPI model, String name, BooleanSchema bs) {
|
||||
bindingCache.put(name, OpenApiExporter.getRefOr(model,bs).getType());
|
||||
return "{" + name + "}";
|
||||
}
|
||||
|
||||
private Object prototypeForInt(OpenAPI model, String name, IntegerSchema intg) {
|
||||
bindingCache.put(name, OpenApiExporter.getRefOr(model,intg).getType());
|
||||
return "{" + name + "}";
|
||||
}
|
||||
|
||||
private Object prototypeForBinary(OpenAPI model, String name, BinarySchema bin) {
|
||||
bindingCache.put(name, OpenApiExporter.getRefOr(model,bin).getType());
|
||||
return "{" + name + "}";
|
||||
}
|
||||
|
||||
private Object prototypeForNumber(OpenAPI model, String name, NumberSchema num) {
|
||||
bindingCache.put(name, OpenApiExporter.getRefOr(model,num).getType());
|
||||
return "{" + name + "}";
|
||||
}
|
||||
|
||||
private String prototypeForString(OpenAPI model, String name, StringSchema schema) {
|
||||
bindingCache.put(name, OpenApiExporter.getRefOr(model,schema).getType());
|
||||
return "{" + name + "}";
|
||||
}
|
||||
|
||||
private List<?> prototypeForAry(OpenAPI model, String name, ArraySchema ary) {
|
||||
List<Object> protolist = new ArrayList<>();
|
||||
|
||||
Schema itemSchema = ary.getItems();
|
||||
if (itemSchema==null && ary.getOneOf()!=null && !ary.getOneOf().isEmpty()) {
|
||||
itemSchema = OpenApiExporter.getRefOr(model,ary.getOneOf().get(0));
|
||||
}
|
||||
if (itemSchema==null && ary.getAnyOf()!=null && !ary.getAnyOf().isEmpty()) {
|
||||
itemSchema = OpenApiExporter.getRefOr(model,ary.getAnyOf().get(0));
|
||||
}
|
||||
if (itemSchema==null) {
|
||||
throw new RuntimeException("Unable to determine item schema for ary: " + name + ", toString:" + ary);
|
||||
}
|
||||
protolist.add(findPrototype(model, name, OpenApiExporter.getRefOr(model,itemSchema)));
|
||||
return protolist;
|
||||
}
|
||||
|
||||
private Object prototypeForMap(OpenAPI model, String name, MapSchema map) {
|
||||
Map<String, Object> protomap = new LinkedHashMap<>();
|
||||
Map<String, Schema> properties = map.getProperties();
|
||||
|
||||
if (properties!=null && !properties.isEmpty()) {
|
||||
for (String pkey : properties.keySet()) {
|
||||
Schema ptype = OpenApiExporter.getRefOr(model,properties.get(pkey));
|
||||
protomap.put(pkey, findPrototype(model, pkey,ptype));
|
||||
}
|
||||
}
|
||||
return protomap;
|
||||
}
|
||||
|
||||
private Map<String, ?> prototypeForObject(OpenAPI model, String name, ObjectSchema obj) {
|
||||
Map<String, Object> protomap = new LinkedHashMap<>();
|
||||
Map<String, Schema> properties = obj.getProperties();
|
||||
|
||||
if (properties!=null && !properties.isEmpty()) {
|
||||
for (String pkey : properties.keySet()) {
|
||||
Schema ptype = OpenApiExporter.getRefOr(model,properties.get(pkey));
|
||||
protomap.put(pkey, findPrototype(model, pkey,ptype));
|
||||
}
|
||||
}
|
||||
return protomap;
|
||||
}
|
||||
|
||||
private Object prototypeForComposed(OpenAPI model, String name, ComposedSchema cmp) {
|
||||
Map<String, Object> protomap = new LinkedHashMap<>();
|
||||
Map<String, Schema> properties =new LinkedHashMap<>();
|
||||
List<Schema> composition = cmp.getAllOf();
|
||||
if (composition==null) {
|
||||
List<Schema> anyof = cmp.getAnyOf();
|
||||
if (anyof!=null) {
|
||||
composition=List.of(OpenApiExporter.getRefOr(model,anyof.get(0)));
|
||||
}
|
||||
}
|
||||
if (composition==null) {
|
||||
List<Schema> oneOf = cmp.getOneOf();
|
||||
if (oneOf!=null) {
|
||||
composition=List.of(OpenApiExporter.getRefOr(model,oneOf.get(0)));
|
||||
}
|
||||
}
|
||||
if (composition.size()==1) {
|
||||
return findPrototype(model, name, composition.get(0));
|
||||
} else {
|
||||
for (String pkey : properties.keySet()) {
|
||||
Schema ptype = OpenApiExporter.getRefOr(model,properties.get(pkey));
|
||||
protomap.put(pkey, findPrototype(model, pkey,ptype));
|
||||
}
|
||||
return protomap;
|
||||
}
|
||||
|
||||
}
|
||||
public Map<String,String> getBindingCache() {
|
||||
LinkedHashMap<String, String> toreturn = new LinkedHashMap<>();
|
||||
this.bindingCache.forEach((k,v) -> {
|
||||
String recipe = switch (v) {
|
||||
case "string" -> "ToString()";
|
||||
default -> "Identity()";
|
||||
};
|
||||
toreturn.put(k,recipe);
|
||||
});
|
||||
return toreturn;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,414 @@
|
||||
/*
|
||||
* Copyright (c) 2023 nosqlbench
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.nosqlbench.adapter.http.apps;
|
||||
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
import io.nosqlbench.nb.api.apps.BundledApp;
|
||||
import io.nosqlbench.nb.api.nbio.NBIO;
|
||||
import io.swagger.v3.oas.models.*;
|
||||
import io.swagger.v3.oas.models.media.*;
|
||||
import io.swagger.v3.oas.models.parameters.Parameter;
|
||||
import io.swagger.v3.oas.models.parameters.RequestBody;
|
||||
import io.swagger.v3.parser.OpenAPIV3Parser;
|
||||
import io.swagger.v3.parser.core.models.SwaggerParseResult;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.snakeyaml.engine.v2.api.Dump;
|
||||
import org.snakeyaml.engine.v2.api.DumpSettings;
|
||||
import org.snakeyaml.engine.v2.common.FlowStyle;
|
||||
import org.snakeyaml.engine.v2.common.NonPrintableStyle;
|
||||
import org.snakeyaml.engine.v2.common.ScalarStyle;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.PrintStream;
|
||||
import java.lang.reflect.Method;
|
||||
import java.net.URI;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.StandardOpenOption;
|
||||
import java.util.*;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
@Service(value= BundledApp.class,selector = "openapi-exporter")
|
||||
public class OpenApiExporter implements BundledApp {
|
||||
|
||||
private final static Logger logger = LogManager.getLogger(OpenApiExporter.class);
|
||||
private final Map<String,Map<String,String>> typeMapById = new LinkedHashMap<>();
|
||||
|
||||
private static record Argv(
|
||||
String infile,
|
||||
String outfile, String baseurl, Map<String,String> headers,
|
||||
Set<String> enableMethods,
|
||||
int limit
|
||||
) {}
|
||||
|
||||
private Argv argv;
|
||||
|
||||
@Override
|
||||
public int applyAsInt(String[] args) {
|
||||
argv = parseArgs(args);
|
||||
String source_spec = NBIO.fs().pathname(argv.infile).first()
|
||||
.orElseThrow(() -> new RuntimeException("unable to read " + argv.infile))
|
||||
.asString();
|
||||
|
||||
// PARSE
|
||||
OpenAPIV3Parser parser = new OpenAPIV3Parser();
|
||||
SwaggerParseResult parseResult = parser.readContents(source_spec);
|
||||
OpenAPI model = parseResult.getOpenAPI();
|
||||
|
||||
// TRANSFORM
|
||||
Map<String,Object> workload = new LinkedHashMap<>();
|
||||
Map<String,Map<String,String>> scenarios = new LinkedHashMap<>();
|
||||
scenarios.put("default",Map.of("all","run driver=http"));
|
||||
workload.put("scenarios",scenarios);
|
||||
workload.put("params",Map.of("ok-status",".+"));
|
||||
|
||||
Map<String,Object> transformed = transformModelToWorkload(model);
|
||||
Map<String, String> bindings = stubBindings(typeMapById);
|
||||
bindings.forEach((k,v) -> { System.out.println(k+":"+v); });
|
||||
workload.put("bindings", bindings);
|
||||
workload.putAll(transformed);
|
||||
|
||||
|
||||
DumpSettings dumpSettings = DumpSettings.builder()
|
||||
.setDefaultFlowStyle(FlowStyle.BLOCK)
|
||||
.setIndent(2)
|
||||
.setDefaultScalarStyle(ScalarStyle.PLAIN)
|
||||
.setMaxSimpleKeyLength(1000)
|
||||
.setWidth(100)
|
||||
.setSplitLines(true)
|
||||
.setIndentWithIndicator(true)
|
||||
.setMultiLineFlow(true)
|
||||
.setNonPrintableStyle(NonPrintableStyle.ESCAPE)
|
||||
.build();
|
||||
|
||||
// DUMP FILE
|
||||
Dump dump = new Dump(dumpSettings);
|
||||
String workloadText = dump.dumpToString(workload);
|
||||
PrintStream outstream = System.out;
|
||||
if (argv.outfile()!=null && !argv.outfile().isEmpty()) {
|
||||
Path outpath = Path.of(argv.outfile());
|
||||
if (Files.isRegularFile(outpath)) {
|
||||
logger.warn("overwriting file " + outpath.toString());
|
||||
}
|
||||
try {
|
||||
outstream= new PrintStream(Files.newOutputStream(outpath, StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.CREATE));
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
outstream.println(workloadText);
|
||||
return 0;
|
||||
}
|
||||
|
||||
private Map<String, String> stubBindings(Map<String, Map<String, String>> typeMapById) {
|
||||
Map<String,String> stub = new LinkedHashMap<>();
|
||||
for (String id : typeMapById.keySet()) {
|
||||
Map<String, String> namesAndTypes = typeMapById.get(id);
|
||||
for (String varname : namesAndTypes.keySet()) {
|
||||
String vartype = namesAndTypes.get(varname);
|
||||
String defaultDef = switch (vartype) {
|
||||
case "string" -> "ToString();";
|
||||
default -> "Identity()";
|
||||
};
|
||||
stub.put("_" + id + "_" + varname, vartype);
|
||||
stub.put(varname,defaultDef);
|
||||
}
|
||||
}
|
||||
return stub;
|
||||
}
|
||||
|
||||
public OpenApiExporter() {
|
||||
}
|
||||
|
||||
private Map<String, Object> transformModelToWorkload(OpenAPI model) {
|
||||
Map<String,Object> workload = new LinkedHashMap<>();
|
||||
Map<String,Object> opsblock = new LinkedHashMap<>();
|
||||
Map<String,Object> opdefs = new LinkedHashMap<>();
|
||||
|
||||
Paths paths = model.getPaths();
|
||||
ArrayList<String> sortedPaths = new ArrayList<>(paths.keySet());
|
||||
Collections.sort(sortedPaths);
|
||||
for (String pathName : sortedPaths) {
|
||||
PathItem pathItem = paths.get(pathName);
|
||||
Map<PathItem.HttpMethod, Operation> opmap = pathItem.readOperationsMap();
|
||||
|
||||
for (PathItem.HttpMethod opMethod : opmap.keySet()) {
|
||||
Operation op = opmap.get(opMethod);
|
||||
if (!argv.enableMethods.isEmpty() && !argv.enableMethods.contains(opMethod.name().toLowerCase())) {
|
||||
System.err.println("skipping method " + opMethod.name() + " id:" + op.getOperationId());
|
||||
continue;
|
||||
}
|
||||
Operation opInfo = opmap.get(opMethod);
|
||||
Map<String,Object> opdef = new LinkedHashMap<>();
|
||||
opdef.put("op",buildRequestBlock(model, pathName, pathItem, opMethod, op));
|
||||
Optional.ofNullable(opInfo.getSummary()).ifPresent(summary -> opdef.put("description",summary));
|
||||
Optional.ofNullable(opInfo.getDescription()).ifPresent(summary -> opdef.put("description",summary));
|
||||
opdefs.put(opInfo.getOperationId()+"_"+opMethod.name().toLowerCase(),opdef);
|
||||
|
||||
if (argv.limit()>0 && opdefs.size()>=argv.limit()) {
|
||||
System.err.println("stopping after " + argv.limit() + " templates.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (argv.limit()>0 && opdefs.size()>=argv.limit()) {
|
||||
System.err.println("stopping after " + argv.limit() + " templates.");
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
opsblock.put("ops",opdefs);
|
||||
workload.put("blocks",Map.of("block1",opsblock));
|
||||
|
||||
return workload;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
int exitCode = new OpenApiExporter().applyAsInt(args);
|
||||
System.exit(exitCode);
|
||||
}
|
||||
|
||||
private Argv parseArgs(String[] args) {
|
||||
LinkedList<String> argv = new LinkedList<>(Arrays.asList(args));
|
||||
Set<String> enabledMethods = new HashSet<>();
|
||||
Map<String,String> headers = new LinkedHashMap<>();
|
||||
ListIterator<String> iter = argv.listIterator();
|
||||
String baseurl = "{baseurl}";
|
||||
String infile = "specify-me.yaml";
|
||||
int limit = 0;
|
||||
String outfile = null;
|
||||
while (iter.hasNext()) {
|
||||
String word = iter.next();
|
||||
if (word.equals("-h")) {
|
||||
String header = iter.next();
|
||||
String[] parts = header.split(":", 2);
|
||||
if (parts.length==1) {
|
||||
throw new RuntimeException("You MUST provide aux headers in the name: value form. This one was not in that form: '" + header + "'");
|
||||
}
|
||||
headers.put(parts[0],parts[1].trim());
|
||||
} else if (word.equals("-m")) {
|
||||
String enable=iter.next();
|
||||
io.swagger.models.Method enabledMethod = io.swagger.models.Method.forValue(enable);
|
||||
enabledMethods.add(enabledMethod.name().toLowerCase());
|
||||
} else if (word.equals("-l")) {
|
||||
limit = Integer.parseInt(iter.next());
|
||||
} else if (word.equals("-b")) {
|
||||
baseurl = iter.next();
|
||||
} else if (word.equals("-I")) {
|
||||
infile = iter.next();
|
||||
} else if (word.equals("-O")) {
|
||||
outfile = iter.next();
|
||||
} else {
|
||||
System.out.println("""
|
||||
EXAMPLE: nb5 openapi-exporter -I myspec.yaml -O myworkload.yaml -b "TEMPLATE(baseurl)"
|
||||
|
||||
-I <inputfile> Set the input file for the OpenAPI spec, as in:
|
||||
-I myspec.yaml
|
||||
|
||||
[-O <outputfile>] Set the output file for the workload, as in:
|
||||
-O myworkload.yaml
|
||||
If unspecified, the result is printed to stdout.
|
||||
|
||||
[-m [method]] Include methods in generated workload. This argument can be specified multiple times, as in:
|
||||
-m get -m post
|
||||
If unspecified, then all methods are included by default.
|
||||
|
||||
[-h "<header>"] Add a header to each request. This can be specified multiple times, as in:
|
||||
-h "Authorization: Bearer sometoken" -h "X-Special-Header: I love spicy chicken wings."
|
||||
If unspecified, then no additional headers are added beyond those in the spec.
|
||||
|
||||
[-l <limit> ] Limit the generated op templates to some number, usually used to test a small scale
|
||||
version of the rendered workload before doing the full scale test, as in:
|
||||
-l 10
|
||||
If unspecified, all operations included in the spec are rendered as op templates.
|
||||
|
||||
[-b <baseurl> ] Set the base url which will be used with every request. This is often set to
|
||||
a template var form and the specified when the workload is run, as in:
|
||||
-b "TEMPLATE(baseurl)" ...
|
||||
If unspecified "{baseurl}" is used, which will require a binding to be set for it.
|
||||
""");
|
||||
}
|
||||
}
|
||||
return new Argv(infile, outfile, baseurl, headers,enabledMethods, limit);
|
||||
}
|
||||
|
||||
// private Map<String,Object> buildOpBodyTemplate(OpenAPI model, String path, PathItem pathitem, PathItem.HttpMethod method, Operation op) {
|
||||
// Map<String,Object> opfields = new LinkedHashMap<>();
|
||||
// opfields.put("op", buildRequestBlock(model, path, pathitem, method, op));
|
||||
// return opfields;
|
||||
// }
|
||||
|
||||
private String buildRequestBlock(OpenAPI model, String path, PathItem pathinfo, PathItem.HttpMethod method, Operation op) {
|
||||
StringBuilder body = new StringBuilder();
|
||||
Map<String, String> headers = new LinkedHashMap<>();
|
||||
|
||||
// String urlPath = buildUrlPath(model, path, pathinfo, op);
|
||||
// Main Line
|
||||
body.append(method.name()).append(" ").append(argv.baseurl()+path).append(" ").append("HTTP/2.0").append("\n");
|
||||
|
||||
Curl curlData= loadCurlData(op);
|
||||
headers.putAll(curlData.headers);
|
||||
// Overlay/Overwrite any duplicates
|
||||
headers.putAll(argv.headers);
|
||||
headers.forEach((k,v) -> {
|
||||
body.append(k).append(": ").append(v).append("\n");
|
||||
});
|
||||
|
||||
if (op.getParameters()!=null) {
|
||||
List<Parameter> requiredQueryParams = op.getParameters().stream()
|
||||
.filter(Parameter::getRequired)
|
||||
// .filter(p -> p.getIn().equals("query"))
|
||||
.toList();
|
||||
for (Parameter paramModel : requiredQueryParams) {
|
||||
paramModel = getRefOr(model,paramModel);
|
||||
updateBindings(op, paramModel.getName(), getRefOr(model, paramModel.getSchema()).getType());
|
||||
}
|
||||
}
|
||||
|
||||
RequestBody rqBody = op.getRequestBody();
|
||||
if (rqBody!=null) {
|
||||
Content content = rqBody.getContent();
|
||||
if (content.size()>1) {
|
||||
logger.warn("There were multiple types of content supported for " + op.getOperationId() + ", but we are using the first one only.");
|
||||
}
|
||||
Map.Entry<String, MediaType> contentEntry = content.entrySet().iterator().next();
|
||||
String contentType = contentEntry.getKey();
|
||||
MediaType firstBodyMediaType = contentEntry.getValue();
|
||||
|
||||
Schema bodySchema = getRefOr(model,firstBodyMediaType.getSchema());
|
||||
BodySchemaAssembly contentAssembly = new BodySchemaAssembly();
|
||||
String bodyTemplate = contentAssembly.assembleBodyTemplate(model, "body", bodySchema, path, pathinfo, op);
|
||||
Map<String, String> bindingCache = contentAssembly.getBindingCache();
|
||||
typeMapById.computeIfAbsent(op.getOperationId(),i -> new LinkedHashMap<>()).putAll(bindingCache);
|
||||
|
||||
MediaType mediaType = content.get(contentType);
|
||||
|
||||
body.append("\n\n").append(bodyTemplate);
|
||||
}
|
||||
return body.toString();
|
||||
}
|
||||
|
||||
private void updateBindings(Operation op, String name, String type) {
|
||||
Map<String, String> idmap = typeMapById.computeIfAbsent(op.getOperationId(), k -> new LinkedHashMap<>());
|
||||
if (!idmap.containsKey(op.getOperationId())) {
|
||||
idmap.put(name,type);
|
||||
}
|
||||
}
|
||||
|
||||
private Curl loadCurlData(Operation op) {
|
||||
if (op.getExtensions().containsKey("x-oaiMeta")) {
|
||||
Map<String,Object> xoaiMeta = (Map<String,Object>) op.getExtensions().get("x-oaiMeta");
|
||||
if (xoaiMeta!=null && xoaiMeta.containsKey("examples")) {
|
||||
String curltext;
|
||||
Object examples = xoaiMeta.get("examples");
|
||||
if (examples instanceof Map map) {
|
||||
if (map.containsKey("request")) {
|
||||
Object requestObject = map.get("request");
|
||||
if (requestObject instanceof Map rqmap) {
|
||||
if (rqmap.containsKey("curl")) {
|
||||
curltext = rqmap.get("curl").toString();
|
||||
Curl curlModel = parseCurl(curltext);
|
||||
return curlModel;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} else if (examples instanceof List list) {
|
||||
if (!(list.get(0) instanceof Map lm)) {
|
||||
throw new RuntimeException("unknown inner type:" + list.get(0).getClass());
|
||||
}
|
||||
List<Map<String,Map<String,String>>> exampleList = new ArrayList<>();
|
||||
for (Object o : list) {
|
||||
exampleList.add((Map<String,Map<String,String>>)o);
|
||||
}
|
||||
List<Map<String, Map<String, String>>> curlEntry = exampleList.stream().filter(m -> m.containsKey("request") && m.get("request").containsKey("curl")).toList();
|
||||
curltext = curlEntry.get(0).get("request").get("curl");
|
||||
Curl curlModel = parseCurl(curltext);
|
||||
return curlModel;
|
||||
} else {
|
||||
throw new RuntimeException("unknown type for curl extraction: " + examples);
|
||||
}
|
||||
} else {
|
||||
logger.warn("no x-oaiMeta/examples to pull example headers and uri from");
|
||||
}
|
||||
} else {
|
||||
logger.warn("No x-oaiMeta to pull example headers and uri from");
|
||||
}
|
||||
return new Curl(null,Map.of());
|
||||
|
||||
}
|
||||
|
||||
private final static Pattern urlPattern = Pattern.compile(" *curl( -X POST)? +\"?(?<url>https:\\/\\/[^ \"]+)\"? *\\\\(?<remainder>.*)$", Pattern.DOTALL | Pattern.MULTILINE);
|
||||
private final static Pattern headersPattern = Pattern.compile(" *-H +\"(?<name>[^:]+) +(?<value>[^\"]+)\"",Pattern.DOTALL|Pattern.MULTILINE);
|
||||
private final record Curl(
|
||||
URI uri,
|
||||
Map<String,String> headers
|
||||
) {}
|
||||
private Curl parseCurl(String curl) {
|
||||
Map<String,String> headers = new LinkedHashMap<>();
|
||||
Matcher urlMatcher = urlPattern.matcher(curl);
|
||||
if (urlMatcher.matches()) {
|
||||
String url = urlMatcher.group("url");
|
||||
URI uri = URI.create(url);
|
||||
String remainder = urlMatcher.group("remainder");
|
||||
Matcher headerMatcher = headersPattern.matcher(remainder);
|
||||
while (headerMatcher.find()) {
|
||||
String name = headerMatcher.group("name");
|
||||
String value = headerMatcher.group("value");
|
||||
headers.put(name,value);
|
||||
}
|
||||
return new Curl(uri,headers);
|
||||
} else {
|
||||
throw new RuntimeException("Unable to parse curl example:\n"+curl);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
public static <T> T getRefOr(OpenAPI model, T or) {
|
||||
if (or==null) {
|
||||
return null;
|
||||
}
|
||||
String modelref = null;
|
||||
try {
|
||||
Method refmethod = or.getClass().getMethod("get$ref");
|
||||
modelref = refmethod.invoke(or).toString();
|
||||
} catch (Exception ignored) {}
|
||||
if (modelref==null) {
|
||||
return or;
|
||||
}
|
||||
final String ref = modelref;
|
||||
Class<T> orClass = (Class<T>)or.getClass();
|
||||
|
||||
|
||||
String[] ids = modelref.split("/");
|
||||
return switch (ids[0]) {
|
||||
case "#" -> switch (ids[1]) {
|
||||
case "components" -> switch(ids[2]) {
|
||||
case "schemas" -> Optional.ofNullable(orClass.cast(model.getComponents().getSchemas().get(ids[3])))
|
||||
.orElseThrow(() -> new RuntimeException("schema " + ids[3] + " not found for path " + ref));
|
||||
default -> throw new RuntimeException("Add support: component type '" + ids[2] + " not found for path " + ref);
|
||||
};
|
||||
default -> throw new RuntimeException("Add support: components not found for path " + ref);
|
||||
};
|
||||
default -> throw new RuntimeException("unrecognized ref format: '" + ref + "'");
|
||||
};
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
# OpenAPI workload exporter
|
||||
The openapi exporter is a bundled app within NB5 which reads an OpenAPI yaml
|
||||
and produces an auto-generated workload yaml to run with NoSQLBench.
|
||||
|
||||
At this time it is still in active development, so stay tuned for further news!
|
@ -16,8 +16,8 @@
|
||||
|
||||
package io.nosqlbench.adapter.http.core;
|
||||
|
||||
import io.nosqlbench.api.config.params.ParamsParser;
|
||||
import io.nosqlbench.api.errors.BasicError;
|
||||
import io.nosqlbench.nb.api.config.params.ParamsParser;
|
||||
import io.nosqlbench.nb.api.errors.BasicError;
|
||||
import io.nosqlbench.virtdata.core.templates.BindPointParser;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
|
@ -17,9 +17,9 @@
|
||||
package io.nosqlbench.adapter.http.core;
|
||||
|
||||
import com.codahale.metrics.Histogram;
|
||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
|
||||
public class HttpMetrics implements NBLabeledElement {
|
||||
private final NBComponent parent;
|
||||
|
@ -21,7 +21,7 @@ import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
|
||||
import java.util.function.LongFunction;
|
||||
|
||||
|
@ -16,13 +16,13 @@
|
||||
|
||||
package io.nosqlbench.adapter.http.core;
|
||||
|
||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.api.config.standard.Param;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.Param;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
package io.nosqlbench.adapter.http.statuscodes;
|
||||
|
||||
import io.nosqlbench.api.content.Content;
|
||||
import io.nosqlbench.api.content.NBIO;
|
||||
import io.nosqlbench.nb.api.nbio.Content;
|
||||
import io.nosqlbench.nb.api.nbio.NBIO;
|
||||
import org.apache.commons.csv.CSVFormat;
|
||||
import org.apache.commons.csv.CSVParser;
|
||||
import org.apache.commons.csv.CSVRecord;
|
||||
|
@ -18,17 +18,15 @@ package io.nosqlbench.adapter.http;
|
||||
|
||||
import io.nosqlbench.adapter.http.core.HttpOpMapper;
|
||||
import io.nosqlbench.adapter.http.core.HttpSpace;
|
||||
import io.nosqlbench.api.config.standard.TestComponent;
|
||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.TestComponent;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.adapters.api.activityconfig.OpsLoader;
|
||||
import io.nosqlbench.adapters.api.activityconfig.yaml.OpTemplate;
|
||||
import io.nosqlbench.adapters.api.activityconfig.yaml.OpTemplateFormat;
|
||||
import io.nosqlbench.adapters.api.activityconfig.yaml.OpsDocList;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
|
@ -17,14 +17,14 @@
|
||||
package io.nosqlbench.adapter.jdbc;
|
||||
|
||||
import io.nosqlbench.adapter.jdbc.optypes.JDBCOp;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.BaseDriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
@ -16,24 +16,19 @@
|
||||
|
||||
package io.nosqlbench.adapter.jdbc;
|
||||
|
||||
import io.nosqlbench.adapter.jdbc.exceptions.JDBCAdapterInvalidParamException;
|
||||
import io.nosqlbench.adapter.jdbc.opdispensers.JDBCDMLOpDispenser;
|
||||
import io.nosqlbench.adapter.jdbc.opdispensers.JDBCDDLOpDispenser;
|
||||
import io.nosqlbench.adapter.jdbc.optypes.JDBCOp;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpDispenser;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.adapters.api.templating.ParsedOp;
|
||||
import io.nosqlbench.engine.api.templating.TypeAndTarget;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.sql.Connection;
|
||||
import java.util.function.LongFunction;
|
||||
|
||||
public class JDBCOpMapper implements OpMapper<JDBCOp> {
|
||||
private final static Logger logger = LogManager.getLogger(JDBCOpMapper.class);
|
||||
|
||||
|
@ -20,11 +20,11 @@ import com.zaxxer.hikari.HikariConfig;
|
||||
import com.zaxxer.hikari.HikariDataSource;
|
||||
import io.nosqlbench.adapter.jdbc.exceptions.JDBCAdapterInvalidParamException;
|
||||
import io.nosqlbench.adapter.jdbc.exceptions.JDBCAdapterUnexpectedException;
|
||||
import io.nosqlbench.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.api.config.standard.Param;
|
||||
import io.nosqlbench.api.errors.OpConfigError;
|
||||
import io.nosqlbench.nb.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.Param;
|
||||
import io.nosqlbench.nb.api.errors.OpConfigError;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
@ -20,8 +20,8 @@ package io.nosqlbench.adapter.jdbc.utils;
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.adapter.jdbc.JDBCDriverAdapter;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapterLoader.class, selector = "jdbc")
|
||||
|
@ -16,16 +16,15 @@
|
||||
|
||||
package io.nosqlbench.adapter.kafka;
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.adapter.kafka.ops.KafkaOp;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.BaseDriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
@ -2,13 +2,13 @@ package io.nosqlbench.adapter.kafka;
|
||||
|
||||
/*
|
||||
* Copyright (c) 2022 nosqlbench
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@ -19,8 +19,8 @@ package io.nosqlbench.adapter.kafka;
|
||||
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapterLoader.class, selector = "kafka")
|
||||
|
@ -19,7 +19,7 @@ package io.nosqlbench.adapter.kafka;
|
||||
import io.nosqlbench.adapter.kafka.dispensers.MessageConsumerOpDispenser;
|
||||
import io.nosqlbench.adapter.kafka.dispensers.MessageProducerOpDispenser;
|
||||
import io.nosqlbench.adapter.kafka.ops.KafkaOp;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpDispenser;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
|
@ -20,10 +20,10 @@ import io.nosqlbench.adapter.kafka.ops.OpTimeTrackKafkaConsumer;
|
||||
import io.nosqlbench.adapter.kafka.ops.OpTimeTrackKafkaProducer;
|
||||
import io.nosqlbench.adapter.kafka.util.KafkaAdapterUtil;
|
||||
import io.nosqlbench.adapter.kafka.util.KafkaClientConf;
|
||||
import io.nosqlbench.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.api.config.standard.Param;
|
||||
import io.nosqlbench.nb.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.Param;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
import org.apache.commons.lang3.math.NumberUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
@ -20,9 +20,8 @@ import com.codahale.metrics.Counter;
|
||||
import com.codahale.metrics.Histogram;
|
||||
import com.codahale.metrics.Timer;
|
||||
import io.nosqlbench.adapter.kafka.dispensers.KafkaBaseOpDispenser;
|
||||
import io.nosqlbench.api.engine.metrics.instruments.NBMetricHistogram;
|
||||
import io.nosqlbench.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.labels.NBLabeledElement;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
@ -19,8 +19,8 @@ package io.nosqlbench.adapter.mongodb.core;
|
||||
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapterLoader.class, selector = "mongodb")
|
||||
|
@ -17,8 +17,8 @@
|
||||
package io.nosqlbench.adapter.mongodb.core;
|
||||
|
||||
import io.nosqlbench.adapter.mongodb.dispensers.MongoCommandOpDispenser;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.api.errors.BasicError;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.errors.BasicError;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpDispenser;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
|
@ -22,12 +22,12 @@ import com.mongodb.ServerApi;
|
||||
import com.mongodb.ServerApiVersion;
|
||||
import com.mongodb.client.MongoClient;
|
||||
import com.mongodb.client.MongoClients;
|
||||
import io.nosqlbench.components.NBNamedElement;
|
||||
import io.nosqlbench.nb.api.components.NBNamedElement;
|
||||
import com.mongodb.client.MongoDatabase;
|
||||
import io.nosqlbench.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.api.config.standard.Param;
|
||||
import io.nosqlbench.nb.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.Param;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.bson.Document;
|
||||
|
@ -16,15 +16,14 @@
|
||||
|
||||
package io.nosqlbench.adapter.mongodb.core;
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.BaseDriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.flowtypes.Op;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
@ -1,17 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2022 nosqlbench
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
@ -16,16 +16,15 @@
|
||||
|
||||
package io.nosqlbench.adapter.pinecone;
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.adapter.pinecone.ops.PineconeOp;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.BaseDriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
@ -2,13 +2,13 @@ package io.nosqlbench.adapter.pinecone;
|
||||
|
||||
/*
|
||||
* Copyright (c) 2022 nosqlbench
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@ -19,8 +19,8 @@ package io.nosqlbench.adapter.pinecone;
|
||||
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapterLoader.class, selector = "pinecone")
|
||||
|
@ -19,7 +19,7 @@ package io.nosqlbench.adapter.pinecone;
|
||||
import io.nosqlbench.adapter.pinecone.opdispensers.*;
|
||||
import io.nosqlbench.adapter.pinecone.ops.PineconeOp;
|
||||
import io.nosqlbench.adapter.pinecone.ops.PineconeOpTypes;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpDispenser;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
|
@ -16,10 +16,10 @@
|
||||
|
||||
package io.nosqlbench.adapter.pinecone;
|
||||
|
||||
import io.nosqlbench.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.api.config.standard.Param;
|
||||
import io.nosqlbench.nb.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.Param;
|
||||
import io.pinecone.PineconeClient;
|
||||
import io.pinecone.PineconeClientConfig;
|
||||
import io.pinecone.PineconeConnection;
|
||||
|
@ -16,9 +16,8 @@
|
||||
|
||||
package io.nosqlbench.engine.extensions.vectormath;
|
||||
|
||||
import com.google.protobuf.Descriptors;
|
||||
import io.nosqlbench.components.NBBaseComponent;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.components.NBBaseComponent;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.pinecone.proto.QueryResponse;
|
||||
import io.pinecone.proto.ScoredVector;
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
package io.nosqlbench.engine.extensions.vectormath;
|
||||
|
||||
import io.nosqlbench.api.extensions.ScriptingExtensionPluginInfo;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.extensions.ScriptingExtensionPluginInfo;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
@ -19,7 +19,7 @@ package io.nosqlbench.engine.extensions.vectormath;
|
||||
|
||||
import com.google.protobuf.Struct;
|
||||
import com.google.protobuf.Value;
|
||||
import io.nosqlbench.components.NBBaseComponent;
|
||||
import io.nosqlbench.nb.api.components.NBBaseComponent;
|
||||
import io.pinecone.proto.QueryResponse;
|
||||
import io.pinecone.proto.ScoredVector;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -16,17 +16,16 @@
|
||||
|
||||
package io.nosqlbench.adapter.pulsar;
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.adapter.pulsar.ops.PulsarOp;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.BaseDriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverSpaceCache;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
|
@ -2,13 +2,13 @@ package io.nosqlbench.adapter.pulsar;
|
||||
|
||||
/*
|
||||
* Copyright (c) 2022 nosqlbench
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
@ -19,8 +19,8 @@ package io.nosqlbench.adapter.pulsar;
|
||||
|
||||
|
||||
import io.nosqlbench.adapter.diag.DriverAdapterLoader;
|
||||
import io.nosqlbench.api.labels.NBLabels;
|
||||
import io.nosqlbench.components.NBComponent;
|
||||
import io.nosqlbench.nb.api.labels.NBLabels;
|
||||
import io.nosqlbench.nb.api.components.NBComponent;
|
||||
import io.nosqlbench.nb.annotations.Service;
|
||||
|
||||
@Service(value = DriverAdapterLoader.class, selector = "pulsar")
|
||||
|
@ -18,7 +18,7 @@ package io.nosqlbench.adapter.pulsar;
|
||||
|
||||
import io.nosqlbench.adapter.pulsar.dispensers.*;
|
||||
import io.nosqlbench.adapter.pulsar.ops.PulsarOp;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpDispenser;
|
||||
import io.nosqlbench.adapters.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.adapters.api.activityimpl.uniform.DriverAdapter;
|
||||
|
@ -18,10 +18,10 @@ package io.nosqlbench.adapter.pulsar;
|
||||
|
||||
import io.nosqlbench.adapter.pulsar.util.PulsarAdapterUtil;
|
||||
import io.nosqlbench.adapter.pulsar.util.PulsarClientConf;
|
||||
import io.nosqlbench.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.api.config.standard.Param;
|
||||
import io.nosqlbench.nb.api.config.standard.ConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfigModel;
|
||||
import io.nosqlbench.nb.api.config.standard.NBConfiguration;
|
||||
import io.nosqlbench.nb.api.config.standard.Param;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user