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

Difficulties attempting to test with NuoDB #306

Open
bryanosborne opened this issue Oct 18, 2019 · 3 comments
Open

Difficulties attempting to test with NuoDB #306

bryanosborne opened this issue Oct 18, 2019 · 3 comments

Comments

@bryanosborne
Copy link

How well supported is NuoDB? Would like to use oltpbench for NewSQL research to be published.

Receiving runtime error:

[josborne@caladan oltpbench]$ ./oltpbenchmark -v -b tpcc -c config/config.xml --create=true --load=true
17:56:44,899 (DBWorkload.java:267) INFO - ======================================================================

Benchmark: TPCC {com.oltpbenchmark.benchmarks.tpcc.TPCCBenchmark}
Configuration: config/config.xml
Type: NUODB
Driver: com.nuodb.jdbc.Driver
URL: jdbc:com.nuodb://arrakis/tpcc
Isolation: TRANSACTION_SERIALIZABLE
Scale Factor: 2.0

17:56:44,903 (DBWorkload.java:268) INFO - ======================================================================
17:56:44,923 (DBWorkload.java:527) INFO - Creating new TPCC database...
Error executing: CREATE TABLE CUSTOMER ( C_W_ID INT NOT NULL, C_D_ID INT NOT NULL, C_ID INT NOT NULL, C_DISCOUNT DECIMAL(4,4) NOT NULL, C_CREDIT STRING NOT NULL, C_LAST STRING NOT NULL, C_FIRST STRING NOT NULL, C_CREDIT_LIM DECIMAL(12,2) NOT NULL, C_BALANCE DECIMAL(12,2) NOT NULL, C_YTD_PAYMENT FLOAT NOT NULL, C_PAYMENT_CNT INT NOT NULL, C_DELIVERY_CNT INT NOT NULL, C_STREET_1 STRING NOT NULL, C_STREET_2 STRING NOT NULL, C_CITY STRING NOT NULL, C_STATE STRING NOT NULL, C_ZIP STRING NOT NULL, C_PHONE STRING NOT NULL, C_SINCE TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, C_MIDDLE STRING NOT NULL, C_DATA STRING NOT NULL, PRIMARY KEY (C_W_ID,C_D_ID,C_ID) )
Exception in thread "main" java.lang.RuntimeException: Unexpected error when trying to create the tpcc database
at com.oltpbenchmark.api.BenchmarkModule.createDatabase(BenchmarkModule.java:266)
at com.oltpbenchmark.api.BenchmarkModule.createDatabase(BenchmarkModule.java:246)
at com.oltpbenchmark.DBWorkload.runCreator(DBWorkload.java:815)
at com.oltpbenchmark.DBWorkload.main(DBWorkload.java:528)
Caused by: java.sql.SQLSyntaxErrorException: explicit or implicit schema required for table "CUSTOMER"
...

Is there a config.xml parameter to specify the NuoDB schema? (I thought NuoDB was supposed to just create unspecified-schema objects in the USER schema, but...)

Also, I can't find any detail info on the config.xml file.

Any assistance is greatly appreciated!

@bryanosborne
Copy link
Author

"Fixed" the code with a modification to BenchmarkModule.java. Works for MySQL and NuoDB,haven't tried with other DBMS. Hope this helps.

public final Connection makeConnection() throws SQLException {
    Properties properties = new Properties();
    properties.put("user", workConf.getDBUsername());
    properties.put("password", workConf.getDBPassword());
    if(workConf.getDBName() != null) properties.put("schema", workConf.getDBName());

    Connection conn = DriverManager.getConnection(workConf.getDBConnection(),properties);
    Catalog.setSeparator(conn);
    return (conn);
}

@apavlo
Copy link
Member

apavlo commented Jan 1, 2020

Can you send a PR?

@bryanosborne
Copy link
Author

Will do, Dr. P.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants