From 95f108c6ea9d6a73476120a83bc35f1a12237052 Mon Sep 17 00:00:00 2001 From: Jonathan Shook Date: Thu, 30 Jun 2022 00:35:54 -0500 Subject: [PATCH] remove driver field at the right time --- .../engine/api/activityimpl/SimpleActivity.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/engine-api/src/main/java/io/nosqlbench/engine/api/activityimpl/SimpleActivity.java b/engine-api/src/main/java/io/nosqlbench/engine/api/activityimpl/SimpleActivity.java index 32ccd58d0..bde878b50 100644 --- a/engine-api/src/main/java/io/nosqlbench/engine/api/activityimpl/SimpleActivity.java +++ b/engine-api/src/main/java/io/nosqlbench/engine/api/activityimpl/SimpleActivity.java @@ -463,6 +463,7 @@ public class SimpleActivity implements Activity, ProgressCapable { protected OpSequence> createOpSourceFromParsedOps( Map adapterCache, Map> mapperCache, + List adapters, List pops ) { List ratios = new ArrayList<>(pops.size()); @@ -484,12 +485,9 @@ public class SimpleActivity implements Activity, ProgressCapable { for (int i = 0; i < pops.size(); i++) { long ratio = ratios.get(i); ParsedOp pop = pops.get(i); - String adapterName = pop.getOptionalStaticValue("driver", String.class) - .orElseThrow(() -> new OpConfigError( - "Unable to get driver name from ParsedOp:" + pop.toString() - )); - OpMapper opOpMapper = mapperCache.get(adapterName); - OpDispenser dispenser = opOpMapper.apply(pop); + DriverAdapter adapter = adapters.get(i); + OpMapper opMapper = adapter.getOpMapper(); + OpDispenser dispenser = opMapper.apply(pop); // if (strict) { // optemplate.assertConsumed(); // }