mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2024-11-26 02:30:39 -06:00
fixed scaffolding
This commit is contained in:
parent
885ad0cfd7
commit
1c8583347c
@ -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<Cqld4RainbowTableOp> {
|
||||
|
||||
private final LongFunction<Statement> stmtFunc;
|
||||
private final LongFunction<String> 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(),
|
||||
|
@ -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<Cqld4SsTableOp> {
|
||||
|
||||
private final LongFunction<Statement> stmtFunc;
|
||||
private final LongFunction<String> 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),
|
||||
|
@ -26,7 +26,7 @@ import io.nosqlbench.engine.api.templating.ParsedOp;
|
||||
|
||||
import java.util.function.LongFunction;
|
||||
|
||||
public class CqlD4RainbowTableMapper implements OpMapper<Cqld4CqlOp> {
|
||||
public class CqlD4RainbowTableMapper implements OpMapper<Cqld4RainbowTableOp> {
|
||||
private final LongFunction<CqlSession> sessionFunc;
|
||||
private final LongFunction<String> targetFunction;
|
||||
private final DriverAdapter adapter;
|
||||
|
@ -26,7 +26,7 @@ import io.nosqlbench.engine.api.templating.ParsedOp;
|
||||
|
||||
import java.util.function.LongFunction;
|
||||
|
||||
public class Cqld4SsTableMapper implements OpMapper<Cqld4CqlOp> {
|
||||
public class Cqld4SsTableMapper implements OpMapper<Cqld4SsTableOp> {
|
||||
private final LongFunction<CqlSession> sessionFunc;
|
||||
private final LongFunction<String> targetFunction;
|
||||
private final DriverAdapter adapter;
|
||||
|
@ -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<ResultSet>, 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();
|
||||
//
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -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<ResultSet>, 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();
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user