diff --git a/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/opdispensers/Cqld4RainbowTableDispenser.java b/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/opdispensers/Cqld4RainbowTableDispenser.java index 5e70d409f..3571e93cc 100644 --- a/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/opdispensers/Cqld4RainbowTableDispenser.java +++ b/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/opdispensers/Cqld4RainbowTableDispenser.java @@ -24,7 +24,7 @@ import io.nosqlbench.engine.api.templating.ParsedOp; import java.util.function.LongFunction; -public class CqlD4RainbowTableDispenser extends Cqld4BaseOpDispenser { +public class CqlD4RainbowTableDispenser extends BaseOpDispenser { private final LongFunction stmtFunc; private final LongFunction targetFunction; @@ -40,8 +40,8 @@ public class CqlD4RainbowTableDispenser extends Cqld4BaseOpDispenser { } @Override - public Cqld4RainbowTable apply(long value) { - return new Cqld4RainbowTable( + public Cqld4RainbowTableOp apply(long value) { + return new Cqld4RainbowTableOp( getSessionFunc().apply(value), (RainbowTable) stmtFunc.apply(value), getMaxPages(), diff --git a/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/opdispensers/Cqld4SsTableDispenser.java b/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/opdispensers/Cqld4SsTableDispenser.java index 894036fcd..80c0cb064 100644 --- a/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/opdispensers/Cqld4SsTableDispenser.java +++ b/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/opdispensers/Cqld4SsTableDispenser.java @@ -24,7 +24,7 @@ import io.nosqlbench.engine.api.templating.ParsedOp; import java.util.function.LongFunction; -public class CqlD4SsTableDispenser extends Cqld4BaseOpDispenser { +public class CqlD4SsTableDispenser extends BaseOpDispenser { private final LongFunction stmtFunc; private final LongFunction targetFunction; @@ -40,7 +40,7 @@ public class CqlD4SsTableDispenser extends Cqld4BaseOpDispenser { } @Override - public Cqld4SSTable apply(long value) { + public Cqld4SsTableOp apply(long value) { return new CqlD4SsTable( getSessionFunc().apply(value), (SsTable) stmtFunc.apply(value), diff --git a/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/opmappers/CqlD4RainbowTableMapper.java b/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/opmappers/CqlD4RainbowTableMapper.java index 980ab49d5..faa5711d7 100644 --- a/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/opmappers/CqlD4RainbowTableMapper.java +++ b/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/opmappers/CqlD4RainbowTableMapper.java @@ -26,7 +26,7 @@ import io.nosqlbench.engine.api.templating.ParsedOp; import java.util.function.LongFunction; -public class CqlD4RainbowTableMapper implements OpMapper { +public class CqlD4RainbowTableMapper implements OpMapper { private final LongFunction sessionFunc; private final LongFunction targetFunction; private final DriverAdapter adapter; diff --git a/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/opmappers/CqlD4SsTableMapper.java b/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/opmappers/CqlD4SsTableMapper.java index 73531453a..0c9a88a89 100644 --- a/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/opmappers/CqlD4SsTableMapper.java +++ b/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/opmappers/CqlD4SsTableMapper.java @@ -26,7 +26,7 @@ import io.nosqlbench.engine.api.templating.ParsedOp; import java.util.function.LongFunction; -public class Cqld4SsTableMapper implements OpMapper { +public class Cqld4SsTableMapper implements OpMapper { private final LongFunction sessionFunc; private final LongFunction targetFunction; private final DriverAdapter adapter; diff --git a/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/optypes/Cqld4RainbowTableOp.java b/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/optypes/Cqld4RainbowTableOp.java index 75f161657..e7b58a3b3 100644 --- a/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/optypes/Cqld4RainbowTableOp.java +++ b/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/optypes/Cqld4RainbowTableOp.java @@ -20,23 +20,18 @@ import com.datastax.oss.driver.api.core.CqlSession; import io.nosqlbench.adapter.cqld4.RSProcessors; // Need to create RainbowTableStatement -public class Cqld4RainbowTableOp extends Cqld4CqlOp { +public class Cqld4RainbowTableOp implements CycleOp, VariableCapture, OpGenerator, OpResultSize { private final CqlSession session; private final RainbowTableStatement stmt; + // Rename ResultSet to something more appropriate + public final ResultSet apply(long cycle) { + // TODO: actually write to sstables + // sstable passed to shared memory object + } + public Cqld4RainbowTableOp(CqlSession session, RainbowTableStatement stmt, int maxpages, boolean retryreplace) { - super(session, maxpages,retryreplace, new RSProcessors()); - this.stmt = stmt; - } - - @Override - public RainbowTableStatement getStmt() { - return stmt; - } - - @Override - public String getQueryString() { - return stmt.getQuery(); + // } } diff --git a/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/optypes/Cqld4SsTableOp.java b/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/optypes/Cqld4SsTableOp.java index 06364d688..44b0e8b48 100644 --- a/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/optypes/Cqld4SsTableOp.java +++ b/adapter-cqld4/src/main/java/io/nosqlbench/adapter/cqld4/optypes/Cqld4SsTableOp.java @@ -20,23 +20,18 @@ import com.datastax.oss.driver.api.core.CqlSession; import io.nosqlbench.adapter.cqld4.RSProcessors; // Need to create SsTableStatement -public class Cqld4SsTableOp extends Cqld4CqlOp { +public class Cqld4SsTableOp implements CycleOp, VariableCapture, OpGenerator, OpResultSize { private final CqlSession session; private final SsTableStatement stmt; + // Rename ResultSet to something more appropriate + public final ResultSet apply(long cycle) { + // TODO: actually write to sstables + // sstable passed to shared memory object + } + public Cqld4SsTableOp(CqlSession session, SsTableStatement stmt, int maxpages, boolean retryreplace) { - super(session, maxpages,retryreplace, new RSProcessors()); - this.stmt = stmt; - } - @Override - public SsTableStatement getStmt() { - return stmt; - } - - @Override - public String getQueryString() { - return stmt.getQuery(); } }