Skip to content
This repository has been archived by the owner on Aug 23, 2021. It is now read-only.

SpliceMachine Support #185

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions config/splicemachine_tpcc_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0"?>
<parameters>

<!-- Connection details -->
<dbtype>splicemachine</dbtype>
<driver>com.splicemachine.db.jdbc.ClientDriver</driver>
<DBUrl>jdbc:splice://localhost:1527/splicedb</DBUrl>
<username>splice</username>
<password>admin</password>
<isolation>TRANSACTION_READ_COMMITTED</isolation>

<!-- Scale factor is the number of warehouses in TPCC -->
<scalefactor>16</scalefactor>

<!-- The workload -->
<terminals>48</terminals>
<works>
<work>
<time>300</time>
<rate>unlimited</rate>
<weights>45,43,4,4,4</weights>
</work>
</works>

<!-- TPCC specific -->
<transactiontypes>
<transactiontype>
<name>NewOrder</name>
</transactiontype>
<transactiontype>
<name>Payment</name>
</transactiontype>
<transactiontype>
<name>OrderStatus</name>
</transactiontype>
<transactiontype>
<name>Delivery</name>
</transactiontype>
<transactiontype>
<name>StockLevel</name>
</transactiontype>
</transactiontypes>
</parameters>
48 changes: 48 additions & 0 deletions config/splicemachine_wikipedia_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0"?>
<parameters>

<!-- Connection details -->
<dbtype>splicemachine</dbtype>
<driver>com.splicemachine.db.jdbc.ClientDriver</driver>
<DBUrl>jdbc:splice://localhost:1527/splicedb</DBUrl>
<username>splice</username>
<password>admin</password>
<isolation>TRANSACTION_READ_COMMITTED</isolation>

<!-- Scale factor is the number of wikipages *1000 -->
<scalefactor>100</scalefactor>

<!-- Wikipedia Trace Options -->
<tracefile>config/traces/wikipedia-100k.trace</tracefile>
<traceOut>10</traceOut>
<base_ip>10.1.</base_ip>

<!-- The workload -->
<terminals>100</terminals>
<works>
<work>
<time>10</time>
<rate>1000</rate>
<weights>0.07,0.07,7.6725,91.2656,0.9219</weights>
</work>
</works>

<!-- Wikipedia Procedures Declaration -->
<transactiontypes>
<transactiontype>
<name>AddWatchList</name>
</transactiontype>
<transactiontype>
<name>RemoveWatchList</name>
</transactiontype>
<transactiontype>
<name>UpdatePage</name>
</transactiontype>
<transactiontype>
<name>GetPageAnonymous</name>
</transactiontype>
<transactiontype>
<name>GetPageAuthenticated</name>
</transactiontype>
</transactiontypes>
</parameters>
31 changes: 31 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,36 @@
<artifactId>ojdbc14</artifactId>
<version>10.2.0.1.0</version>
</dependency>
<dependency>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dedcode @dvanaken I don't think we want to include all these things, right?

<groupId>com.mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.22</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.3.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId>
<version>4.3</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.4.1209.jre6</version>
</dependency>
<dependency>
<groupId>com.splicemachine</groupId>
<artifactId>db-jdbc-ClientDriver</artifactId>
<version>2.6.0.1729</version>
</dependency>
</dependencies>
</project>
2 changes: 1 addition & 1 deletion src/com/oltpbenchmark/benchmarks/tpcc/TPCCLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0"?>
<dialects>
<dialect type="splicemachine">
<procedure name="Delivery">
<statement name="delivGetOrderIdSQL">
SELECT NO_O_ID
FROM NEW_ORDER
WHERE NO_D_ID = ? AND NO_W_ID = ? ORDER BY NO_O_ID ASC {LIMIT 1}
</statement>
</procedure>
<procedure name="OrderStatus">
<statement name="ordStatGetNewestOrdSQL">
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}
</statement>
</procedure>
</dialect>
</dialects>
3 changes: 2 additions & 1 deletion src/com/oltpbenchmark/types/DatabaseType.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down