Skip to content

Commit

Permalink
Add the possibility to load multiple schemas
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidRG13 committed Jul 11, 2017
1 parent 8214579 commit ca2e545
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private static boolean parseCommandLine(String[] args) {
protected static void load() {
System.out.println("Starting Cassandra...");
String port = commandLine.getOptionValue("p");
String schema = commandLine.getOptionValue("s");
String schemaOption = commandLine.getOptionValue("s");
String installationFolder = commandLine.getOptionValue("d");
String timeout = commandLine.getOptionValue("t");

Expand All @@ -77,8 +77,11 @@ protected static void load() {

try {
EmbeddedCassandraServerHelper.startEmbeddedCassandra(new File(installationFolder, CASSANDRA_YAML), "temp", Long.parseLong(timeout));
if (hasValidValue(schema)) {
dataSetLoad(LOCALHOST, port, schema);
if (hasValidValue(schemaOption)) {
String[] schemas = schemaOption.split(",");
for (String schema : schemas) {
dataSetLoad(LOCALHOST, port, schema);
}
}
} catch (TTransportException | IOException e) {
e.printStackTrace();
Expand Down

0 comments on commit ca2e545

Please sign in to comment.