mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
remove driver field at the right time
This commit is contained in:
parent
9cc92c8f8e
commit
95f108c6ea
@ -463,6 +463,7 @@ public class SimpleActivity implements Activity, ProgressCapable {
|
|||||||
protected <O extends Op> OpSequence<OpDispenser<? extends O>> createOpSourceFromParsedOps(
|
protected <O extends Op> OpSequence<OpDispenser<? extends O>> createOpSourceFromParsedOps(
|
||||||
Map<String, DriverAdapter> adapterCache,
|
Map<String, DriverAdapter> adapterCache,
|
||||||
Map<String, OpMapper<Op>> mapperCache,
|
Map<String, OpMapper<Op>> mapperCache,
|
||||||
|
List<DriverAdapter> adapters,
|
||||||
List<ParsedOp> pops
|
List<ParsedOp> pops
|
||||||
) {
|
) {
|
||||||
List<Long> ratios = new ArrayList<>(pops.size());
|
List<Long> ratios = new ArrayList<>(pops.size());
|
||||||
@ -484,12 +485,9 @@ public class SimpleActivity implements Activity, ProgressCapable {
|
|||||||
for (int i = 0; i < pops.size(); i++) {
|
for (int i = 0; i < pops.size(); i++) {
|
||||||
long ratio = ratios.get(i);
|
long ratio = ratios.get(i);
|
||||||
ParsedOp pop = pops.get(i);
|
ParsedOp pop = pops.get(i);
|
||||||
String adapterName = pop.getOptionalStaticValue("driver", String.class)
|
DriverAdapter adapter = adapters.get(i);
|
||||||
.orElseThrow(() -> new OpConfigError(
|
OpMapper opMapper = adapter.getOpMapper();
|
||||||
"Unable to get driver name from ParsedOp:" + pop.toString()
|
OpDispenser<? extends Op> dispenser = opMapper.apply(pop);
|
||||||
));
|
|
||||||
OpMapper<Op> opOpMapper = mapperCache.get(adapterName);
|
|
||||||
OpDispenser<? extends Op> dispenser = opOpMapper.apply(pop);
|
|
||||||
// if (strict) {
|
// if (strict) {
|
||||||
// optemplate.assertConsumed();
|
// optemplate.assertConsumed();
|
||||||
// }
|
// }
|
||||||
|
Loading…
Reference in New Issue
Block a user