From 8c68e61d34c05888aba5fad139aee8b39e5c1b96 Mon Sep 17 00:00:00 2001 From: Yuru Liu Date: Thu, 14 Dec 2017 20:36:53 -0500 Subject: [PATCH 1/2] Splicemachine TPCC Finished --- config/splicemachine_tpcc_config.xml | 43 ++++++++++++ config/splicemachine_wikipedia_config.xml | 48 +++++++++++++ oltpbench.iml | 70 +++++++++++++++++++ pom.xml | 31 ++++++++ .../benchmarks/tpcc/TPCCLoader.java | 2 +- .../tpcc/dialects/splicemachine-dialects.xml | 19 +++++ src/com/oltpbenchmark/types/DatabaseType.java | 3 +- 7 files changed, 214 insertions(+), 2 deletions(-) create mode 100644 config/splicemachine_tpcc_config.xml create mode 100644 config/splicemachine_wikipedia_config.xml create mode 100644 oltpbench.iml create mode 100644 src/com/oltpbenchmark/benchmarks/tpcc/dialects/splicemachine-dialects.xml diff --git a/config/splicemachine_tpcc_config.xml b/config/splicemachine_tpcc_config.xml new file mode 100644 index 000000000..3db8f4f3b --- /dev/null +++ b/config/splicemachine_tpcc_config.xml @@ -0,0 +1,43 @@ + + + + + splicemachine + com.splicemachine.db.jdbc.ClientDriver + jdbc:splice://localhost:1527/splicedb + splice + admin + TRANSACTION_READ_COMMITTED + + + 16 + + + 48 + + + + unlimited + 45,43,4,4,4 + + + + + + + NewOrder + + + Payment + + + OrderStatus + + + Delivery + + + StockLevel + + + diff --git a/config/splicemachine_wikipedia_config.xml b/config/splicemachine_wikipedia_config.xml new file mode 100644 index 000000000..6a7073c3f --- /dev/null +++ b/config/splicemachine_wikipedia_config.xml @@ -0,0 +1,48 @@ + + + + + splicemachine + com.splicemachine.db.jdbc.ClientDriver + jdbc:splice://localhost:1527/splicedb + splice + admin + TRANSACTION_READ_COMMITTED + + + 100 + + + config/traces/wikipedia-100k.trace + 10 + 10.1. + + + 100 + + + + 1000 + 0.07,0.07,7.6725,91.2656,0.9219 + + + + + + + AddWatchList + + + RemoveWatchList + + + UpdatePage + + + GetPageAnonymous + + + GetPageAuthenticated + + + diff --git a/oltpbench.iml b/oltpbench.iml new file mode 100644 index 000000000..0b0ffe911 --- /dev/null +++ b/oltpbench.iml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 7ff601e37..6053e5932 100644 --- a/pom.xml +++ b/pom.xml @@ -150,5 +150,36 @@ ojdbc14 10.2.0.1.0 + + com.mysql + mysql-connector-java + 5.1.22 + + + org.apache.httpcomponents + httpclient + 4.3.1 + + + org.apache.httpcomponents + httpmime + 4.3.1 + + + org.apache.httpcomponents + httpcore + 4.3 + + + + org.postgresql + postgresql + 9.4.1209.jre6 + + + com.splicemachine + db-jdbc-ClientDriver + 2.6.0.1729 + \ No newline at end of file diff --git a/src/com/oltpbenchmark/benchmarks/tpcc/TPCCLoader.java b/src/com/oltpbenchmark/benchmarks/tpcc/TPCCLoader.java index 13fa06246..abdf11a46 100644 --- a/src/com/oltpbenchmark/benchmarks/tpcc/TPCCLoader.java +++ b/src/com/oltpbenchmark/benchmarks/tpcc/TPCCLoader.java @@ -645,7 +645,7 @@ protected int loadOrders(Connection conn, int w_id, int districtsPerWarehouse, i if (order_line.ol_delivery_d != null) { orlnPrepStmt.setTimestamp(idx++, order_line.ol_delivery_d); } else { - orlnPrepStmt.setNull(idx++, 0); + orlnPrepStmt.setTimestamp(idx++, null); } orlnPrepStmt.setDouble(idx++, order_line.ol_amount); orlnPrepStmt.setLong(idx++, order_line.ol_supply_w_id); diff --git a/src/com/oltpbenchmark/benchmarks/tpcc/dialects/splicemachine-dialects.xml b/src/com/oltpbenchmark/benchmarks/tpcc/dialects/splicemachine-dialects.xml new file mode 100644 index 000000000..1007088fb --- /dev/null +++ b/src/com/oltpbenchmark/benchmarks/tpcc/dialects/splicemachine-dialects.xml @@ -0,0 +1,19 @@ + + + + + + SELECT NO_O_ID + FROM NEW_ORDER + WHERE NO_D_ID = ? AND NO_W_ID = ? ORDER BY NO_O_ID ASC {LIMIT 1} + + + + + SELECT O_ID, O_CARRIER_ID, O_ENTRY_D + FROM OORDER + WHERE O_W_ID = ? AND O_D_ID = ? AND O_C_ID = ? ORDER BY O_ID DESC {LIMIT 1} + + + + diff --git a/src/com/oltpbenchmark/types/DatabaseType.java b/src/com/oltpbenchmark/types/DatabaseType.java index c1395b48c..613b6a92d 100644 --- a/src/com/oltpbenchmark/types/DatabaseType.java +++ b/src/com/oltpbenchmark/types/DatabaseType.java @@ -48,7 +48,8 @@ public enum DatabaseType { MONETDB("nl.cwi.monetdb.jdbc.MonetDriver", false, false), NUODB("com.nuodb.jdbc.Driver", true, false), TIMESTEN("com.timesten.jdbc.TimesTenDriver", true, false), - PELOTON("org.postgresql.Driver", false, false) + PELOTON("org.postgresql.Driver", false, false), + SPLICEMACHINE("com.splicemachine.db.jdbc.ClientDriver", true, false) ; private DatabaseType(String driver, boolean escapeNames, boolean includeColNames) { From 2118089e2e7bbd8be29a5608d50bb496e87404c0 Mon Sep 17 00:00:00 2001 From: Yuru Liu Date: Tue, 19 Dec 2017 21:31:15 -0500 Subject: [PATCH 2/2] fix style and delete Intellij file --- oltpbench.iml | 70 ------------------- .../benchmarks/tpcc/TPCCLoader.java | 2 +- 2 files changed, 1 insertion(+), 71 deletions(-) delete mode 100644 oltpbench.iml diff --git a/oltpbench.iml b/oltpbench.iml deleted file mode 100644 index 0b0ffe911..000000000 --- a/oltpbench.iml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/com/oltpbenchmark/benchmarks/tpcc/TPCCLoader.java b/src/com/oltpbenchmark/benchmarks/tpcc/TPCCLoader.java index abdf11a46..b5e047234 100644 --- a/src/com/oltpbenchmark/benchmarks/tpcc/TPCCLoader.java +++ b/src/com/oltpbenchmark/benchmarks/tpcc/TPCCLoader.java @@ -645,7 +645,7 @@ protected int loadOrders(Connection conn, int w_id, int districtsPerWarehouse, i if (order_line.ol_delivery_d != null) { orlnPrepStmt.setTimestamp(idx++, order_line.ol_delivery_d); } else { - orlnPrepStmt.setTimestamp(idx++, null); + orlnPrepStmt.setTimestamp(idx++, null); } orlnPrepStmt.setDouble(idx++, order_line.ol_amount); orlnPrepStmt.setLong(idx++, order_line.ol_supply_w_id);