make BundledApps implement primitive interface

This commit is contained in:
Jonathan Shook
2022-08-16 00:42:58 -05:00
parent b395f14918
commit a0344d65c9
11 changed files with 35 additions and 17 deletions

View File

@@ -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);

View File

@@ -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));

View File

@@ -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();