mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
undo decorator interface
This commit is contained in:
parent
d89ea2a4d2
commit
f65f9b3c7d
@ -513,12 +513,13 @@ public class SimpleActivity implements Activity, ProgressCapable {
|
||||
if (beforeFiltering.size()>0) {
|
||||
throw new BasicError("There were no active statements with tag filter '"
|
||||
+ tagfilter + "', since all " + beforeFiltering.size()+ " were filtered out.");
|
||||
} else {
|
||||
if (this instanceof DefaultOpTemplateSupplier s) {
|
||||
stmts = s.getDefaultTemplates(stmtsDocList);
|
||||
Objects.requireNonNull(stmts);
|
||||
}
|
||||
}
|
||||
// else {
|
||||
// if (this instanceof DefaultOpTemplateSupplier s) {
|
||||
// stmts = s.getDefaultTemplates(stmtsDocList);
|
||||
// Objects.requireNonNull(stmts);
|
||||
// }
|
||||
// }
|
||||
if (stmts.size()==0) {
|
||||
throw new BasicError("There were no active statements with tag filter '" + tagfilter + "'");
|
||||
}
|
||||
|
@ -18,9 +18,11 @@ package io.nosqlbench.engine.api.activityimpl.uniform;
|
||||
|
||||
import io.nosqlbench.engine.api.activityapi.planning.OpSequence;
|
||||
import io.nosqlbench.engine.api.activityconfig.StatementsLoader;
|
||||
import io.nosqlbench.engine.api.activityconfig.yaml.OpTemplate;
|
||||
import io.nosqlbench.engine.api.activityconfig.yaml.StmtsDocList;
|
||||
import io.nosqlbench.engine.api.activityimpl.*;
|
||||
import io.nosqlbench.engine.api.activityimpl.ActivityDef;
|
||||
import io.nosqlbench.engine.api.activityimpl.OpDispenser;
|
||||
import io.nosqlbench.engine.api.activityimpl.OpMapper;
|
||||
import io.nosqlbench.engine.api.activityimpl.SimpleActivity;
|
||||
import io.nosqlbench.engine.api.activityimpl.uniform.flowtypes.Op;
|
||||
import io.nosqlbench.nb.api.config.standard.*;
|
||||
import io.nosqlbench.nb.api.errors.OpConfigError;
|
||||
@ -41,7 +43,7 @@ import java.util.function.Function;
|
||||
* @param <R> A type of runnable which wraps the operations for this type of driver.
|
||||
* @param <S> The context type for the activity, AKA the 'space' for a named driver instance and its associated object graph
|
||||
*/
|
||||
public class StandardActivity<R extends Op, S> extends SimpleActivity implements DefaultOpTemplateSupplier {
|
||||
public class StandardActivity<R extends Op, S> extends SimpleActivity {
|
||||
private final static Logger logger = LogManager.getLogger("ACTIVITY");
|
||||
|
||||
private final DriverAdapter<R, S> adapter;
|
||||
@ -120,12 +122,12 @@ public class StandardActivity<R extends Op, S> extends SimpleActivity implements
|
||||
// ActivityDefObserver.apply(activityDef, adapter, sequence);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OpTemplate> getDefaultTemplates(StmtsDocList optionalDocs) {
|
||||
if (adapter instanceof DefaultOpTemplateSupplier s) {
|
||||
return s.getDefaultTemplates(optionalDocs);
|
||||
} else {
|
||||
return List.of();
|
||||
}
|
||||
}
|
||||
// @Override
|
||||
// public List<OpTemplate> getDefaultTemplates(StmtsDocList optionalDocs) {
|
||||
// if (adapter instanceof DefaultOpTemplateSupplier s) {
|
||||
// return s.getDefaultTemplates(optionalDocs);
|
||||
// } else {
|
||||
// return List.of();
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user