mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-02-25 18:55:28 -06:00
make BundledApps implement primitive interface
This commit is contained in:
@@ -27,7 +27,7 @@ public class RingAnalyzer implements BundledApp {
|
||||
private final static Logger logger = LogManager.getLogger(RingAnalyzer.class);
|
||||
|
||||
@Override
|
||||
public int appMain(String[] args) {
|
||||
public int applyAsInt(String[] args) {
|
||||
RingAnalyzerConfig cfg = new RingAnalyzerConfig();
|
||||
CommandLine cli = new CommandLine(cfg);
|
||||
CommandLine.ParseResult cl = cli.parseArgs(args);
|
||||
|
||||
@@ -86,11 +86,11 @@ public class CGWorkloadExporter implements BundledApp {
|
||||
private CGExporterConfig config;
|
||||
|
||||
public static void main(String[] args) {
|
||||
new CGWorkloadExporter().appMain(args);
|
||||
new CGWorkloadExporter().applyAsInt(args);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int appMain(String[] args) {
|
||||
public int applyAsInt(String[] args) {
|
||||
this.config = new CGExporterConfig(args);
|
||||
|
||||
logger.info("running CQL workload exporter with args:" + Arrays.toString(args));
|
||||
|
||||
@@ -44,7 +44,7 @@ public class CqlParserHarnessTest {
|
||||
@Test
|
||||
public void testAllTypes() {
|
||||
CGWorkloadExporter exporter = new CGWorkloadExporter();
|
||||
exporter.appMain(new String[]{"src/test/resources/testschemas/cql_alltypes.cql","_alltypes.yaml"});
|
||||
exporter.applyAsInt(new String[]{"src/test/resources/testschemas/cql_alltypes.cql","_alltypes.yaml"});
|
||||
exporter.setNamingTemplate("[OPTYPE-][COLUMN-][TYPEDEF-][TABLE-]-[KEYSPACE]");
|
||||
var data = exporter.getWorkloadAsYaml();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user