diff --git a/oshdb-helpers/oshdb-application-template/src/main/java/org/heigit/ohsome/oshdb/helpers/applicationtemplate/OSHDBApplication.java b/oshdb-helpers/oshdb-application-template/src/main/java/org/heigit/ohsome/oshdb/helpers/applicationtemplate/OSHDBApplication.java index 8f16cb04e..92505bea3 100644 --- a/oshdb-helpers/oshdb-application-template/src/main/java/org/heigit/ohsome/oshdb/helpers/applicationtemplate/OSHDBApplication.java +++ b/oshdb-helpers/oshdb-application-template/src/main/java/org/heigit/ohsome/oshdb/helpers/applicationtemplate/OSHDBApplication.java @@ -56,7 +56,7 @@ static class ConfigOrUrl { @Option(names = {"--keytables"}, description = "keytablesUrl jdbc:...") protected String keytableUrl; - @Option(names = {"--prefix"}, description = "prefix to use") + @Option(names = {"--prefix"}, description = "prefix to use for ignite") protected String prefix; @Option(names = { diff --git a/oshdb-helpers/oshdb-database-driver/src/main/java/org/heigit/ohsome/oshdb/helpers/db/OSHDBDriver.java b/oshdb-helpers/oshdb-database-driver/src/main/java/org/heigit/ohsome/oshdb/helpers/db/OSHDBDriver.java index 48555fc5b..6afc815f9 100644 --- a/oshdb-helpers/oshdb-database-driver/src/main/java/org/heigit/ohsome/oshdb/helpers/db/OSHDBDriver.java +++ b/oshdb-helpers/oshdb-database-driver/src/main/java/org/heigit/ohsome/oshdb/helpers/db/OSHDBDriver.java @@ -80,19 +80,17 @@ private static int connectToH2(Properties props, Execute connect) var multithreading = getInterpolated(props, MULTITHREADING_PROPERTY_NAME).filter("true"::equalsIgnoreCase) .isPresent(); - return connectToH2(h2, prefix, multithreading, connect); + return connectToH2(h2, multithreading, connect); } // OSHDBJdbc throws "Exception" @SuppressWarnings("java:S112") - private static int connectToH2(String h2, String prefix, boolean multithreading, + private static int connectToH2(String h2, boolean multithreading, Execute connect) throws Exception { try (final var oshdb = new OSHDBH2(h2)) { - oshdb.prefix(prefix); oshdb.multithreading(multithreading); var props = new Properties(); props.setProperty(OSHDBDriver.OSHDB_PROPERTY_NAME, h2); - props.setProperty(PREFIX_PROPERTY_NAME, prefix); final var connection = new OSHDBConnection(props, oshdb); return connect.apply(connection); } @@ -117,8 +115,7 @@ private static int connectToIgnite(Properties props, Execute connect) var hcKeytables = new HikariConfig(); hcKeytables.setJdbcUrl(keyTablesUrl); try (var dsKeytables = new HikariDataSource(hcKeytables); - var oshdb = new OSHDBIgnite(ignite, dsKeytables)) { - oshdb.prefix(prefix); + var oshdb = new OSHDBIgnite(ignite, prefix, dsKeytables)) { var connection = new OSHDBConnection(props, oshdb); return connect.apply(connection); }