diff --git a/config/workload_all_pg.xml b/config/workload_all_pg.xml new file mode 100644 index 0000000..6d77682 --- /dev/null +++ b/config/workload_all_pg.xml @@ -0,0 +1,56 @@ + + + postgres + org.postgresql.Driver + 5432 + postgres + postgres + Password321 + TRANSACTION_REPEATABLE_READ + + + + + + 128 + true + true + true + 180000 + true + false + false + + + + NewOrder + 45 + + + Payment + 43 + + + OrderStatus + 4 + + + Delivery + 4 + + + StockLevel + 4 + + + + 1800 + 10000 + + 2 + 2 + + diff --git a/src/com/oltpbenchmark/api/BenchmarkModule.java b/src/com/oltpbenchmark/api/BenchmarkModule.java index d237655..44b7f71 100644 --- a/src/com/oltpbenchmark/api/BenchmarkModule.java +++ b/src/com/oltpbenchmark/api/BenchmarkModule.java @@ -132,11 +132,17 @@ public final Connection makeConnection() throws SQLException { } int r = dataSourceCounter.getAndIncrement() % workConf.getNodes().size(); + String url_db = ""; + if(workConf.getDBName()=="yugabyte") + url_db = "yugabytedb"; + else if(workConf.getDBName()=="postgres") + url_db = "postgresql"; String connectStr; if (workConf.getJdbcURL() != null && workConf.getJdbcURL().length()>0) { connectStr=workConf.getJdbcURL(); } else { - connectStr = String.format("jdbc:yugabytedb://%s:%d/%s", + connectStr = String.format("jdbc:%s://%s:%d/%s", + workConf.getDBName(), workConf.getNodes().get(r), workConf.getPort(), workConf.getDBName());