Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Sybasease+informix (tpcc and ycsb) #383

Open
wants to merge 4 commits into
base: main
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
54 changes: 54 additions & 0 deletions config/informix/sample_tpcc_config.xml
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will need some testing support. Please have a look at .github/workloads/maven.yml and/or #379 for some examples on how to add that. Thanks!

Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0"?>
<parameters>

<!-- Connection details -->
<type>INFORMIX</type>
<driver>com.informix.jdbc.IfxDriver</driver>
<url>jdbc:informix-sqli://localhost:9088/demo:INFORMIXSERVER=informix;user=informix;password=in4mix;sslMode=DISABLED</url>
<username>informix</username>
<password>in4mix</password>
<isolation>TRANSACTION_SERIALIZABLE</isolation>
<batchsize>128</batchsize>

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

<!-- The workload -->
<terminals>1</terminals>
<works>
<work>
<time>60</time>
<rate>10000</rate>
<weights>45,43,4,4,4</weights>
</work>
</works>

<!-- TPCC specific -->
<transactiontypes>
<transactiontype>
<name>NewOrder</name>
<!--<preExecutionWait>18000</preExecutionWait>-->
<!--<postExecutionWait>12000</postExecutionWait>-->
</transactiontype>
<transactiontype>
<name>Payment</name>
<!--<preExecutionWait>3000</preExecutionWait>-->
<!--<postExecutionWait>12000</postExecutionWait>-->
</transactiontype>
<transactiontype>
<name>OrderStatus</name>
<!--<preExecutionWait>2000</preExecutionWait>-->
<!--<postExecutionWait>10000</postExecutionWait>-->
</transactiontype>
<transactiontype>
<name>Delivery</name>
<!--<preExecutionWait>2000</preExecutionWait>-->
<!--<postExecutionWait>5000</postExecutionWait>-->
</transactiontype>
<transactiontype>
<name>StockLevel</name>
<!--<preExecutionWait>2000</preExecutionWait>-->
<!--<postExecutionWait>5000</postExecutionWait>-->
</transactiontype>
</transactiontypes>
</parameters>
47 changes: 47 additions & 0 deletions config/informix/sample_ycsb_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?xml version="1.0"?>
<parameters>

<!-- Connection details -->
<type>INFORMIX</type>
<driver>com.informix.jdbc.IfxDriver</driver>
<url>jdbc:informix-sqli://localhost:9088/demo:INFORMIXSERVER=informix;user=informix;password=in4mix;sslMode=DISABLED</url>
<username>informix</username>
<password>in4mix</password>
<isolation>TRANSACTION_SERIALIZABLE</isolation>
<batchsize>128</batchsize>

<!-- Scalefactor in YCSB is *1000 the number of rows in the USERTABLE-->
<scalefactor>1</scalefactor>

<!-- The workload -->
<terminals>1</terminals>
<works>
<work>
<time>60</time>
<rate>10000</rate>
<weights>50,5,15,10,10,10</weights>
</work>
</works>

<!-- YCSB Procedures declaration -->
<transactiontypes>
<transactiontype>
<name>ReadRecord</name>
</transactiontype>
<transactiontype>
<name>InsertRecord</name>
</transactiontype>
<transactiontype>
<name>ScanRecord</name>
</transactiontype>
<transactiontype>
<name>UpdateRecord</name>
</transactiontype>
<transactiontype>
<name>DeleteRecord</name>
</transactiontype>
<transactiontype>
<name>ReadModifyWriteRecord</name>
</transactiontype>
</transactiontypes>
</parameters>
55 changes: 55 additions & 0 deletions config/sybase/sample_tpcc_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0"?>
<parameters>

<!-- Connection details -->
<type>SybaseASE</type>
<driver>com.sybase.jdbc4.jdbc.SybDriver</driver>
<url>jdbc:sybase:Tds:localhost:8000/test</url>
<username>sa</username>
<password>myPassword</password>
<isolation>TRANSACTION_SERIALIZABLE</isolation>
<batchsize>128</batchsize>

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

<!-- The workload -->
<terminals>1</terminals>
<works>
<work>
<time>60</time>
<rate>10000</rate>
<weights>45,43,4,4,4</weights>
</work>
</works>

<!-- TPCC specific -->
<transactiontypes>
<transactiontype>
<name>NewOrder</name>
<!--<preExecutionWait>18000</preExecutionWait>-->
<!--<postExecutionWait>12000</postExecutionWait>-->
</transactiontype>
<transactiontype>
<name>Payment</name>
<!--<preExecutionWait>3000</preExecutionWait>-->
<!--<postExecutionWait>12000</postExecutionWait>-->
</transactiontype>
<transactiontype>
<name>OrderStatus</name>
<!--<preExecutionWait>2000</preExecutionWait>-->
<!--<postExecutionWait>10000</postExecutionWait>-->
</transactiontype>
<transactiontype>
<name>Delivery</name>
<!--<preExecutionWait>2000</preExecutionWait>-->
<!--<postExecutionWait>5000</postExecutionWait>-->
</transactiontype>
<transactiontype>
<name>StockLevel</name>
<!--<preExecutionWait>2000</preExecutionWait>-->
<!--<postExecutionWait>5000</postExecutionWait>-->
</transactiontype>
</transactiontypes>
</parameters>

48 changes: 48 additions & 0 deletions config/sybase/sample_ycsb_config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0"?>
<parameters>

<!-- Connection details -->
<type>SybaseASE</type>
<driver>com.sybase.jdbc4.jdbc.SybDriver</driver>
<url>jdbc:sybase:Tds:localhost:8000/demo</url>
<username>sa</username>
<password>myPassword</password>
<isolation>TRANSACTION_SERIALIZABLE</isolation>
<batchsize>128</batchsize>

<!-- Scalefactor in YCSB is *1000 the number of rows in the USERTABLE-->
<scalefactor>1</scalefactor>

<!-- The workload -->
<terminals>1</terminals>
<works>
<work>
<time>60</time>
<rate>10000</rate>
<weights>50,5,15,10,10,10</weights>
</work>
</works>

<!-- YCSB Procedures declaration -->
<transactiontypes>
<transactiontype>
<name>ReadRecord</name>
</transactiontype>
<transactiontype>
<name>InsertRecord</name>
</transactiontype>
<transactiontype>
<name>ScanRecord</name>
</transactiontype>
<transactiontype>
<name>UpdateRecord</name>
</transactiontype>
<transactiontype>
<name>DeleteRecord</name>
</transactiontype>
<transactiontype>
<name>ReadModifyWriteRecord</name>
</transactiontype>
</transactiontypes>
</parameters>

124 changes: 122 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,71 @@
</distributionManagement>

<profiles>
<profile>
<id>arcion</id>
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's this one?

<repositories>
<repository>
<id>jumpmind</id>
<name>jumpmind</name>
<url>https://maven.jumpmind.com/repo</url>
</repository>
</repositories>
<properties>
<classifier>arcion</classifier>
</properties>
<dependencies>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.36.0.3</version>
</dependency>
<dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>jcc</artifactId>
<version>11.5.8.0</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.4.0</version>
</dependency>

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.29</version>
</dependency>
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>2.7.8</version>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>21.1.0.0</version>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>11.2.3.jre17</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.ibm.informix/jdbc -->
<dependency>
<groupId>com.ibm.informix</groupId>
<artifactId>jdbc</artifactId>
<version>4.50.3</version>
</dependency>

<!-- https://mvnrepository.com/artifact/jdbc.sybase/jconn4 -->
<dependency>
<groupId>jdbc.sybase</groupId>
<artifactId>jconn4</artifactId>
<version>16.0</version>
</dependency>
</dependencies>
</profile>

<profile>
<id>sqlite</id>
<properties>
Expand All @@ -62,6 +127,33 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>db2</id>
<properties>
<classifier>db2</classifier>
</properties>
<dependencies>
<dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>jcc</artifactId>
<version>11.5.8.0</version>
</dependency>
</dependencies>
</profile>
<profile>
<id>sybase</id>
<properties>
<classifier>sybase</classifier>
</properties>
<!-- https://mvnrepository.com/artifact/jdbc.sybase/jconn4 -->
<dependencies>
<dependency>
<groupId>jdbc.sybase</groupId>
<artifactId>jconn4</artifactId>
<version>16.0</version>
</dependency>
</dependencies>
</profile>
<profile>
<id>postgres</id>
<properties>
Expand All @@ -75,6 +167,7 @@
</dependency>
</dependencies>
</profile>

<profile>
<id>mysql</id>
<properties>
Expand All @@ -97,7 +190,7 @@
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>3.1.4</version>
<version>2.7.8</version>
Copy link
Collaborator

Choose a reason for hiding this comment

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

please revert

</dependency>
</dependencies>
</profile>
Expand All @@ -110,7 +203,7 @@
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-spanner-jdbc</artifactId>
<version>2.9.16</version>
<version>2.9.13</version>
Copy link
Collaborator

Choose a reason for hiding this comment

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

please revert

</dependency>
</dependencies>
</profile>
Expand All @@ -127,6 +220,19 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>oracle</id>
<properties>
<classifier>oracle</classifier>
</properties>
<dependencies>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>21.1.0.0</version>
</dependency>
</dependencies>
</profile>
<profile>
<id>phoenix</id>
<properties>
Expand All @@ -153,6 +259,20 @@
</dependency>
</dependencies>
</profile>
<profile>
<id>informix</id>
<properties>
<classifier>informix</classifier>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/com.ibm.informix/jdbc -->
<dependency>
<groupId>com.ibm.informix</groupId>
<artifactId>jdbc</artifactId>
<version>4.50.3</version>
</dependency>
</dependencies>
</profile>
</profiles>

<dependencies>
Expand Down
7 changes: 5 additions & 2 deletions src/main/java/com/oltpbenchmark/WorkloadConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,13 @@ public void setDDLPath(String ddlPath) {
*/
public void init() {
try {
Class.forName(this.driverClass);
// The newInstance() call is a work around for some broken Java implementations
Class.forName(this.driverClass).newInstance();
} catch (ClassNotFoundException ex) {
throw new RuntimeException("Failed to initialize JDBC driver '" + this.driverClass + "'", ex);
}
} catch (java.lang.InstantiationException | java.lang.IllegalAccessException ex) {
throw new RuntimeException("Failed to initialize JDBC driver '" + this.driverClass + "'", ex);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: please fix the whitespace alignment

}

public int getTerminals() {
Expand Down
Loading