mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -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;
|
import java.util.function.LongFunction;
|
||||||
|
|
||||||
public class CqlD4RainbowTableDispenser extends Cqld4BaseOpDispenser {
|
public class CqlD4RainbowTableDispenser extends BaseOpDispenser<Cqld4RainbowTableOp> {
|
||||||
|
|
||||||
private final LongFunction<Statement> stmtFunc;
|
private final LongFunction<Statement> stmtFunc;
|
||||||
private final LongFunction<String> targetFunction;
|
private final LongFunction<String> targetFunction;
|
||||||
@ -40,8 +40,8 @@ public class CqlD4RainbowTableDispenser extends Cqld4BaseOpDispenser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Cqld4RainbowTable apply(long value) {
|
public Cqld4RainbowTableOp apply(long value) {
|
||||||
return new Cqld4RainbowTable(
|
return new Cqld4RainbowTableOp(
|
||||||
getSessionFunc().apply(value),
|
getSessionFunc().apply(value),
|
||||||
(RainbowTable) stmtFunc.apply(value),
|
(RainbowTable) stmtFunc.apply(value),
|
||||||
getMaxPages(),
|
getMaxPages(),
|
||||||
|
@ -24,7 +24,7 @@ import io.nosqlbench.engine.api.templating.ParsedOp;
|
|||||||
|
|
||||||
import java.util.function.LongFunction;
|
import java.util.function.LongFunction;
|
||||||
|
|
||||||
public class CqlD4SsTableDispenser extends Cqld4BaseOpDispenser {
|
public class CqlD4SsTableDispenser extends BaseOpDispenser<Cqld4SsTableOp> {
|
||||||
|
|
||||||
private final LongFunction<Statement> stmtFunc;
|
private final LongFunction<Statement> stmtFunc;
|
||||||
private final LongFunction<String> targetFunction;
|
private final LongFunction<String> targetFunction;
|
||||||
@ -40,7 +40,7 @@ public class CqlD4SsTableDispenser extends Cqld4BaseOpDispenser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Cqld4SSTable apply(long value) {
|
public Cqld4SsTableOp apply(long value) {
|
||||||
return new CqlD4SsTable(
|
return new CqlD4SsTable(
|
||||||
getSessionFunc().apply(value),
|
getSessionFunc().apply(value),
|
||||||
(SsTable) stmtFunc.apply(value),
|
(SsTable) stmtFunc.apply(value),
|
||||||
|
@ -26,7 +26,7 @@ import io.nosqlbench.engine.api.templating.ParsedOp;
|
|||||||
|
|
||||||
import java.util.function.LongFunction;
|
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<CqlSession> sessionFunc;
|
||||||
private final LongFunction<String> targetFunction;
|
private final LongFunction<String> targetFunction;
|
||||||
private final DriverAdapter adapter;
|
private final DriverAdapter adapter;
|
||||||
|
@ -26,7 +26,7 @@ import io.nosqlbench.engine.api.templating.ParsedOp;
|
|||||||
|
|
||||||
import java.util.function.LongFunction;
|
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<CqlSession> sessionFunc;
|
||||||
private final LongFunction<String> targetFunction;
|
private final LongFunction<String> targetFunction;
|
||||||
private final DriverAdapter adapter;
|
private final DriverAdapter adapter;
|
||||||
|
@ -20,23 +20,18 @@ import com.datastax.oss.driver.api.core.CqlSession;
|
|||||||
import io.nosqlbench.adapter.cqld4.RSProcessors;
|
import io.nosqlbench.adapter.cqld4.RSProcessors;
|
||||||
|
|
||||||
// Need to create RainbowTableStatement
|
// Need to create RainbowTableStatement
|
||||||
public class Cqld4RainbowTableOp extends Cqld4CqlOp {
|
public class Cqld4RainbowTableOp implements CycleOp<ResultSet>, VariableCapture, OpGenerator, OpResultSize {
|
||||||
private final CqlSession session;
|
private final CqlSession session;
|
||||||
private final RainbowTableStatement stmt;
|
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) {
|
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;
|
import io.nosqlbench.adapter.cqld4.RSProcessors;
|
||||||
|
|
||||||
// Need to create SsTableStatement
|
// Need to create SsTableStatement
|
||||||
public class Cqld4SsTableOp extends Cqld4CqlOp {
|
public class Cqld4SsTableOp implements CycleOp<ResultSet>, VariableCapture, OpGenerator, OpResultSize {
|
||||||
private final CqlSession session;
|
private final CqlSession session;
|
||||||
private final SsTableStatement stmt;
|
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) {
|
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