From 8a7203e6174bcf232d59c0e75c19550313beb165 Mon Sep 17 00:00:00 2001 From: at15 Date: Wed, 7 Feb 2018 12:23:05 -0800 Subject: [PATCH 1/9] config: Remove legacy config - address https://github.com/oltpbenchmark/oltpbench/issues/209 - create two directory `benchmarks` and `databases` - traces, `plugin.xml` need separated PR - many config are ad-hoc with remote host url hard coded, some are there for several years without any change - if any of them are still needed, just go back to this commit (or any version before it) to grab them out ... --- .../sample_auctionmark_config.xml | 0 .../sample_chbenchmark_config.xml | 0 .../sample_epinions_config.xml | 0 .../{ => benchmarks}/sample_jpab_config.xml | 0 .../sample_linkbench_config.xml | 0 .../{ => benchmarks}/sample_noop_config.xml | 0 .../sample_resourcestresser_config.xml | 0 .../{ => benchmarks}/sample_seats_config.xml | 0 .../sample_sibench_config.xml | 0 .../sample_smallbank_config.xml | 0 .../{ => benchmarks}/sample_tatp_config.xml | 0 .../{ => benchmarks}/sample_tpcc_config.xml | 0 .../{ => benchmarks}/sample_tpch_config.xml | 0 .../sample_twitter_config.xml | 0 .../{ => benchmarks}/sample_voter_config.xml | 0 .../sample_wikipedia_config.xml | 0 .../{ => benchmarks}/sample_ycsb_config.xml | 0 config/ch_config_postgres.xml | 96 ----------- config/config.xml | 15 -- .../sample_cassandra_config.xml} | 0 config/mix_config_mysql.xml | 119 ------------- config/mix_config_postgres.xml | 160 ------------------ config/monetdb_tpch1.xml | 135 --------------- config/rates-wiki100k-io | 126 -------------- config/sample_db2tpcc_config.xml | 37 ---- config/sample_mstpcc_config.xml | 45 ----- config/sample_mysmixed_config.xml | 147 ---------------- config/sample_oratpcc_config.xml | 47 ----- config/sample_pgmixed_config.xml | 137 --------------- config/sample_pgtpcc_config.xml | 49 ------ config/sample_pgtpcc_upload.xml | 47 ----- config/sample_pgwiki_config.xml | 50 ------ config/sample_pgycsb_config.xml | 44 ----- config/sample_tpcc_mysql_upload.xml | 46 ----- config/tpcc_config_mysql.xml | 43 ----- config/tpcc_config_postgres.xml | 44 ----- config/tpch_sqlite.xml | 10 -- 37 files changed, 1397 deletions(-) rename config/{ => benchmarks}/sample_auctionmark_config.xml (100%) rename config/{ => benchmarks}/sample_chbenchmark_config.xml (100%) rename config/{ => benchmarks}/sample_epinions_config.xml (100%) rename config/{ => benchmarks}/sample_jpab_config.xml (100%) rename config/{ => benchmarks}/sample_linkbench_config.xml (100%) rename config/{ => benchmarks}/sample_noop_config.xml (100%) rename config/{ => benchmarks}/sample_resourcestresser_config.xml (100%) rename config/{ => benchmarks}/sample_seats_config.xml (100%) rename config/{ => benchmarks}/sample_sibench_config.xml (100%) rename config/{ => benchmarks}/sample_smallbank_config.xml (100%) rename config/{ => benchmarks}/sample_tatp_config.xml (100%) rename config/{ => benchmarks}/sample_tpcc_config.xml (100%) rename config/{ => benchmarks}/sample_tpch_config.xml (100%) rename config/{ => benchmarks}/sample_twitter_config.xml (100%) rename config/{ => benchmarks}/sample_voter_config.xml (100%) rename config/{ => benchmarks}/sample_wikipedia_config.xml (100%) rename config/{ => benchmarks}/sample_ycsb_config.xml (100%) delete mode 100644 config/ch_config_postgres.xml delete mode 100644 config/config.xml rename config/{ycsb_cassandra_config.xml => databases/sample_cassandra_config.xml} (100%) delete mode 100644 config/mix_config_mysql.xml delete mode 100644 config/mix_config_postgres.xml delete mode 100644 config/monetdb_tpch1.xml delete mode 100644 config/rates-wiki100k-io delete mode 100644 config/sample_db2tpcc_config.xml delete mode 100644 config/sample_mstpcc_config.xml delete mode 100644 config/sample_mysmixed_config.xml delete mode 100644 config/sample_oratpcc_config.xml delete mode 100644 config/sample_pgmixed_config.xml delete mode 100644 config/sample_pgtpcc_config.xml delete mode 100644 config/sample_pgtpcc_upload.xml delete mode 100644 config/sample_pgwiki_config.xml delete mode 100644 config/sample_pgycsb_config.xml delete mode 100644 config/sample_tpcc_mysql_upload.xml delete mode 100644 config/tpcc_config_mysql.xml delete mode 100644 config/tpcc_config_postgres.xml delete mode 100644 config/tpch_sqlite.xml diff --git a/config/sample_auctionmark_config.xml b/config/benchmarks/sample_auctionmark_config.xml similarity index 100% rename from config/sample_auctionmark_config.xml rename to config/benchmarks/sample_auctionmark_config.xml diff --git a/config/sample_chbenchmark_config.xml b/config/benchmarks/sample_chbenchmark_config.xml similarity index 100% rename from config/sample_chbenchmark_config.xml rename to config/benchmarks/sample_chbenchmark_config.xml diff --git a/config/sample_epinions_config.xml b/config/benchmarks/sample_epinions_config.xml similarity index 100% rename from config/sample_epinions_config.xml rename to config/benchmarks/sample_epinions_config.xml diff --git a/config/sample_jpab_config.xml b/config/benchmarks/sample_jpab_config.xml similarity index 100% rename from config/sample_jpab_config.xml rename to config/benchmarks/sample_jpab_config.xml diff --git a/config/sample_linkbench_config.xml b/config/benchmarks/sample_linkbench_config.xml similarity index 100% rename from config/sample_linkbench_config.xml rename to config/benchmarks/sample_linkbench_config.xml diff --git a/config/sample_noop_config.xml b/config/benchmarks/sample_noop_config.xml similarity index 100% rename from config/sample_noop_config.xml rename to config/benchmarks/sample_noop_config.xml diff --git a/config/sample_resourcestresser_config.xml b/config/benchmarks/sample_resourcestresser_config.xml similarity index 100% rename from config/sample_resourcestresser_config.xml rename to config/benchmarks/sample_resourcestresser_config.xml diff --git a/config/sample_seats_config.xml b/config/benchmarks/sample_seats_config.xml similarity index 100% rename from config/sample_seats_config.xml rename to config/benchmarks/sample_seats_config.xml diff --git a/config/sample_sibench_config.xml b/config/benchmarks/sample_sibench_config.xml similarity index 100% rename from config/sample_sibench_config.xml rename to config/benchmarks/sample_sibench_config.xml diff --git a/config/sample_smallbank_config.xml b/config/benchmarks/sample_smallbank_config.xml similarity index 100% rename from config/sample_smallbank_config.xml rename to config/benchmarks/sample_smallbank_config.xml diff --git a/config/sample_tatp_config.xml b/config/benchmarks/sample_tatp_config.xml similarity index 100% rename from config/sample_tatp_config.xml rename to config/benchmarks/sample_tatp_config.xml diff --git a/config/sample_tpcc_config.xml b/config/benchmarks/sample_tpcc_config.xml similarity index 100% rename from config/sample_tpcc_config.xml rename to config/benchmarks/sample_tpcc_config.xml diff --git a/config/sample_tpch_config.xml b/config/benchmarks/sample_tpch_config.xml similarity index 100% rename from config/sample_tpch_config.xml rename to config/benchmarks/sample_tpch_config.xml diff --git a/config/sample_twitter_config.xml b/config/benchmarks/sample_twitter_config.xml similarity index 100% rename from config/sample_twitter_config.xml rename to config/benchmarks/sample_twitter_config.xml diff --git a/config/sample_voter_config.xml b/config/benchmarks/sample_voter_config.xml similarity index 100% rename from config/sample_voter_config.xml rename to config/benchmarks/sample_voter_config.xml diff --git a/config/sample_wikipedia_config.xml b/config/benchmarks/sample_wikipedia_config.xml similarity index 100% rename from config/sample_wikipedia_config.xml rename to config/benchmarks/sample_wikipedia_config.xml diff --git a/config/sample_ycsb_config.xml b/config/benchmarks/sample_ycsb_config.xml similarity index 100% rename from config/sample_ycsb_config.xml rename to config/benchmarks/sample_ycsb_config.xml diff --git a/config/ch_config_postgres.xml b/config/ch_config_postgres.xml deleted file mode 100644 index a786f4368..000000000 --- a/config/ch_config_postgres.xml +++ /dev/null @@ -1,96 +0,0 @@ - - - - - mysql - org.postgresql.Driver - jdbc:postgresql://localhost:5432/tpcc - tpcc - tpcc - TRANSACTION_READ_COMMITTED - - - 2 - - - 2 - - - - false - 10000 - 3, 2, 3, 2 , 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 - - - - - - - Q1 - - - Q2 - - - Q3 - - - Q4 - - - Q5 - - - Q6 - - - Q7 - - - Q8 - - - Q9 - - - Q10 - - - Q11 - - - Q12 - - - Q13 - - - Q14 - - - - Q15 - - - Q16 - - - Q17 - - - Q18 - - - Q19 - - - Q20 - - - Q21 - - - Q22 - - - diff --git a/config/config.xml b/config/config.xml deleted file mode 100644 index 2e0fea189..000000000 --- a/config/config.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - com.mysql.jdbc.Driver - jdbc:mysql://127.0.0.1:3500/wiki1k - wiki1k - root - - - - - 10 - 5,5,5,5 - - - diff --git a/config/ycsb_cassandra_config.xml b/config/databases/sample_cassandra_config.xml similarity index 100% rename from config/ycsb_cassandra_config.xml rename to config/databases/sample_cassandra_config.xml diff --git a/config/mix_config_mysql.xml b/config/mix_config_mysql.xml deleted file mode 100644 index c67c8f09c..000000000 --- a/config/mix_config_mysql.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - - mysql - com.mysql.jdbc.Driver - jdbc:mysql://localhost:3306/tpcc - root - - TRANSACTION_SERIALIZABLE - - - 2 - - - 2 - - - - 10000 - 45,43,4,4,4 - 10, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 - - - - - - - Q1 - - - - Q3 - - - Q4 - - - Q5 - - - Q6 - - - Q7 - - - Q8 - - - Q9 - - - Q10 - - - Q11 - - - Q12 - - - Q13 - - - Q14 - - - - Q15 - - - Q16 - - - - Q18 - - - Q19 - - - - Q21 - - - Q22 - - - - - NewOrder - - - Payment - - - OrderStatus - - - Delivery - - - StockLevel - - - diff --git a/config/mix_config_postgres.xml b/config/mix_config_postgres.xml deleted file mode 100644 index bf53e9733..000000000 --- a/config/mix_config_postgres.xml +++ /dev/null @@ -1,160 +0,0 @@ - - - - - mysql - org.postgresql.Driver - jdbc:postgresql://localhost:5432/tpcc - tpcc - tpcc - TRANSACTION_READ_COMMITTED - - - 2 - - - - 4 - - - - - - - - - - - - - - - - - 200 - - - 45,43,4,4,4 - 3, 2, 3, 2 , 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5 - - - - - - 200 - disabled - - 3 - 1 - - - 45,43,4,4,4 - 3, 2, 3, 2 , 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5 - - - - - - 100 - unlimited - 45,43,4,4,4 - 3, 2, 3, 2 , 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, - 5, 5, 5, 5, 5, 5, 5 - - - - - - - - - Q1 - - - Q2 - - - Q3 - - - Q4 - - - Q5 - - - Q6 - - - Q7 - - - Q8 - - - Q9 - - - Q10 - - - Q11 - - - Q12 - - - Q13 - - - Q14 - - - - Q15 - - - Q16 - - - Q17 - - - Q18 - - - Q19 - - - Q20 - - - Q21 - - - Q22 - - - - - - - NewOrder - - - Payment - - - OrderStatus - - - Delivery - - - StockLevel - - - diff --git a/config/monetdb_tpch1.xml b/config/monetdb_tpch1.xml deleted file mode 100644 index c7380d2d9..000000000 --- a/config/monetdb_tpch1.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - monetdb - nl.cwi.monetdb.jdbc.MonetDriver - jdbc:monetdb://localhost:50000/tpch1 - monetdb - monetdb - TRANSACTION_READ_COMMITTED - data/tpch1 - - 1 - - - - 1 - - - true - unlimited - all - - - true - unlimited - even - - - true - unlimited - odd - - - - - - - odd - 1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0 - - - even - 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1 - - - - Q1 - 1 - - - Q2 - 2 - - - Q3 - 3 - - - Q4 - 4 - - - Q5 - 5 - - - Q6 - 6 - - - Q7 - 7 - - - Q8 - 8 - - - Q9 - 9 - - - Q10 - 10 - - - Q11 - 11 - - - Q12 - 12 - - - Q13 - 13 - - - Q14 - 14 - - - Q15 - 15 - - - Q16 - 16 - - - Q17 - 17 - - - Q18 - 18 - - - Q19 - 19 - - - Q20 - 20 - - - Q21 - 21 - - - Q22 - 22 - - - diff --git a/config/rates-wiki100k-io b/config/rates-wiki100k-io deleted file mode 100644 index b9ca02fc9..000000000 --- a/config/rates-wiki100k-io +++ /dev/null @@ -1,126 +0,0 @@ - - - com.mysql.jdbc.Driver - jdbc:mysql://vise4:3400/wiki100k - wiki100k - root - - 160 - config/traces/longtrace_100k.txt - 10.1. - - - - INVALID - 0 - - - WIKI_ADD_WATCHLIST - 1 - - - WIKI_REMOVE_WATCHLIST - 2 - - - WIKI_UPDATE_PAGE - 3 - - - WIKI_SELECT_PAGE_ANONYMOUS - 4 - - - WIKI_SELECT_PAGE_LOGGED_IN - 5 - - - - - - - 10000 - 0,0.07,0.07,7.6725,91.2656,0.9219 - - - - 1 - 0,0.07,0.07,7.6725,91.2656,0.9219 - - - - 100 - 0,0.07,0.07,7.6725,91.2656,0.9219 - - - - 1 - 0,0.07,0.07,7.6725,91.2656,0.9219 - - - - 200 - 0,0.07,0.07,7.6725,91.2656,0.9219 - - - - 1 - 0,0.07,0.07,7.6725,91.2656,0.9219 - - - - 300 - 0,0.07,0.07,7.6725,91.2656,0.9219 - - - - 1 - 0,0.07,0.07,7.6725,91.2656,0.9219 - - - - 400 - 0,0.07,0.07,7.6725,91.2656,0.9219 - - - - 1 - 0,0.07,0.07,7.6725,91.2656,0.9219 - - - - 500 - 0,0.07,0.07,7.6725,91.2656,0.9219 - - - - 1 - 0,0.07,0.07,7.6725,91.2656,0.9219 - - - - 600 - 0,0.07,0.07,7.6725,91.2656,0.9219 - - - - 1 - 0,0.07,0.07,7.6725,91.2656,0.9219 - - - - 700 - 0,0.07,0.07,7.6725,91.2656,0.9219 - - - - 1 - 0,0.07,0.07,7.6725,91.2656,0.9219 - - - - 800 - 0,0.07,0.07,7.6725,91.2656,0.9219 - - - diff --git a/config/sample_db2tpcc_config.xml b/config/sample_db2tpcc_config.xml deleted file mode 100644 index 04d1133d4..000000000 --- a/config/sample_db2tpcc_config.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - db2 - com.ibm.db2.jcc.DB2Driver - jdbc:db2://db2-1.localhost.localnet:50000/tpcc - db2inst1 - - TRANSACTION_SERIALIZABLE - 32 - 200 - - - - - 10000 - 45,43,4,4,4 - - - - - - NewOrder - - - Payment - - - OrderStatus - - - Delivery - - - StockLevel - - - diff --git a/config/sample_mstpcc_config.xml b/config/sample_mstpcc_config.xml deleted file mode 100644 index 37d2836de..000000000 --- a/config/sample_mstpcc_config.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - sqlserver - com.microsoft.sqlserver.jdbc.SQLServerDriver - jdbc:sqlserver://ec2-184-73-83-246.compute-1.amazonaws.com:1433;databaseName=tpcc - tpcc - sa - - 10 - - - - - 500 - 45,43,4,4,4 - - - - - 1 - config/dialects/tpcc_dialects.xml - TRANSACTION_SERIALIZABLE - - - NewOrder - 1 - - - Payment - 2 - - - OrderStatus - 3 - - - Delivery - 4 - - - StockLevel - 5 - - - diff --git a/config/sample_mysmixed_config.xml b/config/sample_mysmixed_config.xml deleted file mode 100644 index 9c1b64e2f..000000000 --- a/config/sample_mysmixed_config.xml +++ /dev/null @@ -1,147 +0,0 @@ - - - - - mysql - com.mysql.jdbc.Driver - jdbc:mysql://localhost:3306/tpcc - root - - TRANSACTION_SERIALIZABLE - - - 2 - - - - 4 - - 2 - - - - 2 - - - - - 200 - - - true - - false - - - false - - - - 3 - 1 - - - 45,43,4,4,4 - 3, 2, 3, 2 , 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 - - - - - 100 - true - false - 45,43,4,4,4 - 3, 2, 3, 2 , 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 - - - - - - - Q1 - - - Q2 - - - Q3 - - - Q4 - - - Q5 - - - Q6 - - - Q7 - - - Q8 - - - Q9 - - - Q10 - - - Q11 - - - Q12 - - - Q13 - - - Q14 - - - - Q15 - - - Q16 - - - Q17 - - - Q18 - - - Q19 - - - Q20 - - - Q21 - - - Q22 - - - - - - - NewOrder - - - Payment - - - OrderStatus - - - Delivery - - - StockLevel - - - diff --git a/config/sample_oratpcc_config.xml b/config/sample_oratpcc_config.xml deleted file mode 100644 index a5c31964e..000000000 --- a/config/sample_oratpcc_config.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - - oracle - oracle.jdbc.driver.OracleDriver - jdbc:oracle:thin:@ec2-107-20-2-159.compute-1.amazonaws.com:1521:ded - tpcc - tpcc - - 1 - - - - - 500 - 20,20,20,20,20 - - - - - - 1 - config/dialects/tpcc_dialects.xml - TRANSACTION_SERIALIZABLE - - - NewOrder - 1 - - - Payment - 2 - - - OrderStatus - 3 - - - Delivery - 4 - - - StockLevel - 5 - - - diff --git a/config/sample_pgmixed_config.xml b/config/sample_pgmixed_config.xml deleted file mode 100644 index 9f86ceebf..000000000 --- a/config/sample_pgmixed_config.xml +++ /dev/null @@ -1,137 +0,0 @@ - - - - - mysql - org.postgresql.Driver - jdbc:postgresql://localhost:5432/tpcc - tpcc - tpcc - TRANSACTION_READ_COMMITTED - - - 2 - - - - 4 - - 2 - - - - 2 - - - - - 200 - disabled - - 3 - 1 - - - 45,43,4,4,4 - 3, 2, 3, 2 , 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 - - - - - 100 - unlimited - 45,43,4,4,4 - 3, 2, 3, 2 , 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 - - - - - - - Q1 - - - Q2 - - - Q3 - - - Q4 - - - Q5 - - - Q6 - - - Q7 - - - Q8 - - - Q9 - - - Q10 - - - Q11 - - - Q12 - - - Q13 - - - Q14 - - - - Q15 - - - Q16 - - - Q17 - - - Q18 - - - Q19 - - - Q20 - - - Q21 - - - Q22 - - - - - - - NewOrder - - - Payment - - - OrderStatus - - - Delivery - - - StockLevel - - - diff --git a/config/sample_pgtpcc_config.xml b/config/sample_pgtpcc_config.xml deleted file mode 100644 index ed1410a71..000000000 --- a/config/sample_pgtpcc_config.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - postgres - org.postgresql.Driver - jdbc:postgresql://diuflx01:5432/tpcc/ - tpcc - postgres - postgres - 10 - - 1 - - - - - INVALID - 0 - - - NEW_ORDER - 1 - - - PAYMENT - 2 - - - ORDER_STATUS - 3 - - - DELIVERY - 4 - - - STOCK_LEVEL - 5 - - - - - - - 10 - 0,20,20,20,20,20 - - - - diff --git a/config/sample_pgtpcc_upload.xml b/config/sample_pgtpcc_upload.xml deleted file mode 100644 index 70decda39..000000000 --- a/config/sample_pgtpcc_upload.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - postgres - org.postgresql.Driver - jdbc:postgresql://localhost:5432/tpcc/ - tpcc - postgres - - TRANSACTION_READ_COMMITTED - - Your_Upload_Code - http://Repo_Hostname/new_result/ - - - 2 - - - 20 - - - - unlimited - 45,43,4,4,4 - - - - - - - - NewOrder - - - Payment - - - OrderStatus - - - Delivery - - - StockLevel - - - - diff --git a/config/sample_pgwiki_config.xml b/config/sample_pgwiki_config.xml deleted file mode 100644 index faeaed881..000000000 --- a/config/sample_pgwiki_config.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - postgres - org.postgresql.Driver - jdbc:postgresql://localhost:5432/wikipedia/ - wikipedia - joe - joe - TRANSACTION_SERIALIZABLE - - - 10 - - - config/traces/wikipedia-100k.trace - 10 - debug_wiki - 10.1. - - - 1 - - - - 1000 - 0.07,0.07,7.6725,91.2656,0.9219 - - - - - - - AddWatchList - - - RemoveWatchList - - - UpdatePage - - - GetPageAnonymous - - - GetPageAuthenticated - - - diff --git a/config/sample_pgycsb_config.xml b/config/sample_pgycsb_config.xml deleted file mode 100644 index f369bf095..000000000 --- a/config/sample_pgycsb_config.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - postgres - org.postgresql.Driver - jdbc:postgresql://localhost:5432/ycsb/ - ycsb - joe - joe - - - 1000 - - - 10 - - - - unlimited - 50,50,0,0,0,0 - - - - - - - ReadRecord - - - InsertRecord - - - ScanRecord - - - UpdateRecord - - - DeleteRecord - - - ReadModifyWriteRecord - - - diff --git a/config/sample_tpcc_mysql_upload.xml b/config/sample_tpcc_mysql_upload.xml deleted file mode 100644 index 028428a92..000000000 --- a/config/sample_tpcc_mysql_upload.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - mysql - com.mysql.jdbc.Driver - jdbc:mysql://localhost:3306/tpcc - root - - TRANSACTION_SERIALIZABLE - - Your_Upload_Code - http://Repo_Hostname/new_result/ - - - 2 - - - 2 - - - - 10000 - 45,43,4,4,4 - - - - - - - NewOrder - - - Payment - - - OrderStatus - - - Delivery - - - StockLevel - - - diff --git a/config/tpcc_config_mysql.xml b/config/tpcc_config_mysql.xml deleted file mode 100644 index c24dd4104..000000000 --- a/config/tpcc_config_mysql.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - mysql - com.mysql.jdbc.Driver - jdbc:mysql://localhost:3306/tpcc - root - - TRANSACTION_SERIALIZABLE - - - 2 - - - 2 - - - - 10000 - 45,43,4,4,4 - - - - - - - NewOrder - - - Payment - - - OrderStatus - - - Delivery - - - StockLevel - - - diff --git a/config/tpcc_config_postgres.xml b/config/tpcc_config_postgres.xml deleted file mode 100644 index 60a64335f..000000000 --- a/config/tpcc_config_postgres.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - postgres - org.postgresql.Driver - jdbc:postgresql://localhost:5432/tpcc - tpcc - tpcc - TRANSACTION_READ_COMMITTED - - - 2 - - - 2 - - - - 10000 - true - 45,43,4,4,4 - - - - - - - NewOrder - - - Payment - - - OrderStatus - - - Delivery - - - StockLevel - - - diff --git a/config/tpch_sqlite.xml b/config/tpch_sqlite.xml deleted file mode 100644 index b5fa9b751..000000000 --- a/config/tpch_sqlite.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - sqlite - org.sqlite.JDBC - jdbc:sqlite:dbs/tpch1 - TRANSACTION_READ_COMMITTED - tpch/dbgen - tbl - From 962618ebc7ed2e50a729075b2e9a1524139dd756 Mon Sep 17 00:00:00 2001 From: at15 Date: Wed, 7 Feb 2018 13:15:44 -0800 Subject: [PATCH 2/9] config: Add benchmarks.yml and databases.yml - document how to update the catalog yaml files - copy config.py etc. from config/cleanup branch --- config/README.md | 130 +++++++++++++++++++++++ config/benchmarks.yml | 135 ++++++++++++++++++++++++ config/config.py | 238 ++++++++++++++++++++++++++++++++++++++++++ config/databases.yml | 68 ++++++++++++ 4 files changed, 571 insertions(+) create mode 100644 config/README.md create mode 100644 config/benchmarks.yml create mode 100755 config/config.py create mode 100644 config/databases.yml diff --git a/config/README.md b/config/README.md new file mode 100644 index 000000000..b9e3a78b7 --- /dev/null +++ b/config/README.md @@ -0,0 +1,130 @@ +# Configuration + +## How to + +### Use config.py + +````bash +# print out benchmarks +./config.py benchmarks +# print out databases +./config.py databases +# validate yaml files +./config.py validate +# generate config using template +./config.py --bench tpcc --db mysql +```` + +### Run a benchmark + +Use docker and docker-compose (not accurate, but easy to use) + +````bash +# make sure you are in project root, NOT config folder +export BENCH=tpcc +export DB=mysql +./config/config.py validate +./config/config.py generate --bench ${BENCH} --db ${DB} +# this will start database server and create database +./docker/travis_start.sh +./oltpbenchmark --bench ${BENCH} --config config/generated_${BENCH}_${DB}_config.xml --create true --load true --execute true +```` + +Use local database + +````bash +export BENCH=tpcc +export DB=mysql +./config/config.py validate +./config/config.py generate --bench ${BENCH} --db ${DB} +# modify config/generated_${BENCH}_${DB}_config.xml username and password to match your local config +# create database ${DB} use your local db shell +./oltpbenchmark --bench ${BENCH} --config config/generated_${BENCH}_${DB}_config.xml --create true --load true --execute true +```` + +### Add a new benchmark config + +For instance we want to add TPCx-IoT http://www.tpc.org/tpcx-iot/default.asp + +- add the config template to `config/benchmarks/sample_tpcxiot_config.xml` use mysql as target database + - skip the rest if you don't use util scripts +- update [benchmarks.yml](benchmarks.yml), it's a human readable catalog of all supported benchmarks + - benchmark are listed in alphabetical order +- pick the primary name for the benchmark, it should be same as your java package name, i.e. TPC-C has package `com.oltpbenchmark.benchmarks.tpcc`, thus it's primary name is `tpcc` + - you can have alias, if you find the benchmark name too long. They will be used by util scripts when creating config and launching benchmarks, scripts will map them back to primary name before pass them to oltpbench +- add optional information, there should be at least one item to make it a valid YAML. +- run `config.py validate` to check if you have syntax error or there are name conflict (mainly due to alias) + - use `config.py --verbose validate` if something goes wrong (no output means good) +- run `config.py benchmarks` you should see your benchmarks + +````yaml +# (required) the primary name, should match what you use in java package name +tpcxiot: + # (optional) displayname, just looks nicer + name: TPCx-IoT + # (optional) short description + description: a benchmark for IoT Gateway + # (optional) shorter names, common typos, only used by util scripts + alias: + - iot + # (optional) original homepage/paper link, could be dead ... + url: http://www.tpc.org/tpcx-iot/default.asp + # (optional) list of contributions in time order, use github id, prefer PR over commit hash for url + # not used by actual program, just a place to record you contribution + contributions: + - time: 2018-02-07 + author: at15 + url: https://github.com/oltpbenchmark/oltpbench/commit/cac6786e86869fd23ddb7813ced8357406c4aaef +```` + +### Add a new database config + +For instance we want to add MySQL + +- add the config template to `config/databases/sample_mysql_config.xml` use YCSB as target workload + - skip the rest if you don't use util scripts +- update [databases.yml](databases.yml), it's a human readable catalog of some supported databases + - databases are grouped by type +- pick the primary name, it will be used as `dbtype` in generated config + - you also need to update `com.oltpbenchmark.types.DatabaseType.java` to add your database i.e. `MYSQL("com.mysql.jdbc.Driver", true, false, true),` + - alias is same as benchmarks, used for util scripts only +- jdbc url, default template is `DB_URL_TEMPLATE = 'jdbc:{dbms}://{host}:{port}/{db}'` in [config.py](config.py) + - {dbms} is the primary name + - {db} is the benchmark name, i.e. `tpcc`, `tpch` +- many DBMS supports MySQL protocol, they should explicit specify their db url template, so `{dbms}` is not replaced +- `username` and `password` should match what you specified for [docker](../docker) +- `create_db` is the SQL to create database, note PostgreSQL doest not support `IF NOT EXISTS` +- `shell` is the command to open a shell to database +- `shell_exec` is the command to execute a single sql and exit, it is used for creating database on travis +- `require_native_shell` is for database that don't ship db shell in their docker image, i.e. TiDB's docker image does not have mysql shell but you can use your local mysql shell to connect to it. + +````yaml +mysql: + name: MySQL + alias: + - dolphin + driver: com.mysql.jdbc.Driver + port: 3306 + username: root + password: oltpbenchpassword + create_db: "CREATE DATABASE IF NOT EXISTS {db}" + shell: "mysql -u {username} -p{password}" + shell_exec: "mysql -u {username} -p{password} -e \"{sql}\"" +```` + +````yaml +tidb: + name: TiDB + alias: + - Tidb + driver: com.mysql.jdbc.Driver + port: 4000 + # NOTE: this is needed because tidb is mysql compataible + dburl: "jdbc:mysql://{host}:{port}/{db}" + username: root + password: '' + create_db: "CREATE DATABASE IF NOT EXISTS {db}" + shell: "mysql -u {username} -h 127.0.0.1 -P 4000" + shell_exec: "mysql -u {username} -h 127.0.0.1 -P 4000 -e \"{sql}\"" + require_native_shell: true # tidb's docker container does not ship with mysql client +```` \ No newline at end of file diff --git a/config/benchmarks.yml b/config/benchmarks.yml new file mode 100644 index 000000000..b8be52799 --- /dev/null +++ b/config/benchmarks.yml @@ -0,0 +1,135 @@ +# list of benchmarks supported by oltpbench in alphabetical order +# (required) benchmark name, the primary name used by util scripts and benchmark itself +auctionmark: + # (optional) displayname, just looks nicer + name: AuctionMark + # (optional) short description + description: A benchmark from H-Store + # (optional) shorter names, common typos, only used by util scripts + alias: + - auction + # (optional) original homepage/paper link, could be dead ... + url: http://hstore.cs.brown.edu/projects/auctionmark/ + # (optional) list of contributions in time order, use github id, prefer PR over commit hash for url + # not used by actual program, just a place to record you contribution + contributions: + - time: 2012-01-20 + author: apavlo + url: https://github.com/oltpbenchmark/oltpbench/commit/cac6786e86869fd23ddb7813ced8357406c4aaef +chbenchmark: + name: CH-benCHmark + description: A mix of TPC-C and TPC-H run in parallel on a single DBMS + alias: + # - auction # uncomment this to trigger error in config.py's check_duplicate_name + - ch + - mix + url: https://db.in.tum.de/research/projects/CHbenCHmark/?lang=en +epinions: + name: Epinions + description: Epinions.com was a general consumer review site established in 1999. Epinions was acquired by Shopping.com in 2003, which in turn was acquired by eBay in 2005 + alias: + - epion + - epionion + - consumer-review + url: http://www.epinions.com/ +hyadapt: + name: HyAdapt + description: TODO + alias: + - hyadap + url: https://github.com/oltpbenchmark/oltpbench +jpab: + name: JPAB + description: Java Persistence API Performance Benchmark + alias: + - jpba + url: http://www.jpab.org/ +linkbench: + name: LinkBench + description: a Database Benchmark Based on the Facebook Social Graph + alias: + - fbgraph + url: http://people.cs.uchicago.edu/~tga/pubs/sigmod-linkbench-2013.pdf +noop: + name: Noop + description: no table, no query, just SELECT 1; + alias: + - nop + url: https://github.com/oltpbenchmark/oltpbench +resourcestresser: + name: ResourceStresser + description: Synthetic Resource Stresser meaningless but CPU/IO heavy statements + alias: + - stress + url: https://github.com/oltpbenchmark/oltpbench +seats: + name: SEATS + description: Buy airplane tickets + alias: + - plane + url: https://github.com/oltpbenchmark/oltpbench +sibench: + name: SIBench + description: Snapshot Isolation + alias: + - si + url: https://courses.cs.washington.edu/courses/cse444/08au/544M/READING-LIST/fekete-sigmod2008.pdf +smallbank: + name: SmallBank + description: A bank with only three tables accounts, saving and checking + alias: + - sb + url: https://ses.library.usyd.edu.au/bitstream/2123/5353/1/michael-cahill-2009-thesis.pdf +tatp: + name: TATP + description: Telecom Application Transaction Processing Benchmark + alias: + - telecom + url: http://tatpbenchmark.sourceforge.net/ +tpcc: + name: TPC-C + description: an On-Line Transaction Processing Benchmark + alias: + - tpc-c + url: http://www.tpc.org/tpcc/ +tpcds: + name: TPC-DS + description: a Decision Support Benchmark + alias: + - tpc-ds + url: http://www.tpc.org/tpcds/ + contributions: + - time: 2018-01-20 + author: mpardesh + url: https://github.com/oltpbenchmark/oltpbench/pull/222 +tpch: + name: TPC-H + description: a Descision Support Benchmark for bussiness oriented ad-hoc queries and concurrent data modifications + alias: + - tpc-h + url: http://www.tpc.org/tpch/ +twitter: + name: Twitter + description: Twitter + alias: + - tw + url: https://twitter.com/andy_pavlo +voter: + name: Voter + description: Japanese "American Idol" + alias: + - idol + url: https://github.com/VoltDB/voltdb/tree/master/examples/voter +wikipedia: + name: Wikipedia + description: Wikipedia + alias: + - wiki + url: https://www.wikipedia.org/ +ycsb: + name: YCSB + description: Yahoo! Cloud Serving Benchmark + alias: + - ycbs + - bscy + url: https://github.com/brianfrankcooper/YCSB \ No newline at end of file diff --git a/config/config.py b/config/config.py new file mode 100755 index 000000000..f2078cbea --- /dev/null +++ b/config/config.py @@ -0,0 +1,238 @@ +#!/usr/bin/env python3 +""" +valid and generate config file based on catalog and template +""" + +import os +import sys +import logging +import argparse + +import yaml # catalog are plain yaml files +import xml.etree.ElementTree as ET # config are written in XML + +NAME_PRIMARY = 1 +NAME_ALIAS = 2 +CATALOG_BENCHMARK_FILE = 'benchmarks.yml' +CATALOG_DATABASE_FILE = 'databases.yml' +DB_URL_TEMPLATE = 'jdbc:{dbms}://{host}:{port}/{db}' + + +def has_duplicate_name(entities): + known_names = {} + dup = False + for name, entity in entities.items(): + if name in known_names: + logging.error('dup: name %s already exists', name) + dup = True + known_names[name] = NAME_PRIMARY + if not 'alias' in entity: + continue + for alias in entity['alias']: + if alias in known_names: + logging.error( + 'dup: alias %s for %s already exists', name, alias) + dup = True + known_names[alias] = NAME_ALIAS + return dup + + +def print_names(entities): + for name, entity in entities.items(): + s = name + if 'alias' in entity: + s = s + ' ' + ','.join(entity['alias']) + print(s) + + +def find_entity(entities, name, allow_alias=True): + for primary_name, entity in entities.items(): + if primary_name == name: + return entity, primary_name + if allow_alias and 'alias' in entity: + for alias in entity['alias']: + if alias == name: + return entity, primary_name + return None, name + + +def validate_benchmarks(): + logging.debug('validate %s', CATALOG_BENCHMARK_FILE) + benchmarks = load_yaml(CATALOG_BENCHMARK_FILE) + has_duplicate_name(benchmarks) + return benchmarks + + +def validate_databases(): + logging.debug('validate %s', CATALOG_DATABASE_FILE) + databases = load_yaml(CATALOG_DATABASE_FILE) + has_duplicate_name(databases) + return databases + + +def load_yaml(file): + with open(file, 'r') as f: + try: + d = yaml.safe_load(f) + except yaml.YAMLError: + # TODO: the stack trace is not necessary, just need to show where the yaml is wrong + logging.exception('invalid YAML %s', file) + exit(1) + return d + + +class ConfigUtil: + def __init__(self): + self.output = '' + self.benchmark = '' + self.database = '' + self.scalefactor = None + self.catalog_benchmarks = None + self.catalog_databases = None + self.validated = False + + def read_args(self, args): + # TODO: allow alias + self.benchmark = args.bench.lower() + self.database = args.db.lower() + self.output = args.output + self.scalefactor = args.scalefactor + + def validate_args(self): + # TODO: the code for benchmark and database are identical except the log message + if not self.benchmark in self.catalog_benchmarks: + entity, primary_name = find_entity( + self.catalog_benchmarks, self.benchmark, True) + if entity is None: + logging.error( + 'benchmark %s is not in catalog, run `config.py benchmarks` to see supported benchmarks', + self.benchmark) + exit(1) + else: + logging.debug('%s is alias of benchmark %s', + self.benchmark, primary_name) + self.benchmark = primary_name + if not self.database in self.catalog_databases: + entity, primary_name = find_entity( + self.catalog_databases, self.database, True) + if entity is None: + logging.error( + 'database %s is not in catlog, run `config.py databases` to see supported databases', self.database) + exit(1) + else: + logging.debug('%s is alias of database %s', + self.database, primary_name) + self.database = primary_name + + # validate load config and check if it is valid + def validate(self): + if self.validated: + return + self.catalog_benchmarks = validate_benchmarks() + self.catalog_databases = validate_databases() + self.validated = True + + def generate(self): + self.validate() + logging.debug('generate config for benchmark %s database %s', + self.benchmark, self.database) + # check catalog + self.validate_args() + # locate the sample + sample_benchmark_file = 'benchmarks/sample_' + self.benchmark + '_config.xml' + if not os.path.isfile(sample_benchmark_file): + logging.error( + 'can\'t find benchmark config template %s', sample_benchmark_file) + exit(1) + tree = ET.parse(sample_benchmark_file) + root = tree.getroot() + # update database connection + # TODO: merge w/ command args + db = self.catalog_databases[self.database] + root.find('dbtype').text = self.database + root.find('driver').text = db['driver'] + db_url = db.get('dburl', DB_URL_TEMPLATE) + root.find('DBUrl').text = db_url.replace('{dbms}', self.database).replace( + '{host}', 'localhost').replace('{port}', str(db['port'])).replace('{db}', self.benchmark) + root.find('username').text = db['username'] + root.find('password').text = db['password'] + if self.scalefactor is not None: + root.find('scalefactor').text = str(self.scalefactor) + if self.output: + output_file = self.output + else: + output_file = 'generated_{}_{}_config.xml'.format( + self.benchmark, self.database) + tree.write(output_file) + print(output_file) + + def benchmarks(self): + self.validate() + print_names(self.catalog_benchmarks) + + def databases(self): + self.validate() + print_names(self.catalog_databases) + + +def main(): + cli = ConfigUtil() + # https://docs.python.org/3/library/argparse.html#sub-commands + parser = argparse.ArgumentParser( + description='Oltpbench configuration util') + # subcommands + commands = parser.add_subparsers(dest='subcommand', + title='subcommands', + help='subcommands') + commands.add_parser( + 'validate', help='Check catalog and config template consistency') + commands.add_parser( + 'benchmarks', help='List supported benchmarks') + commands.add_parser( + 'databases', help='List supported databases') + # generate command + cmd_gen = commands.add_parser( + 'generate', help='Generate config base on template') + cmd_gen.add_argument('--bench', metavar='', + type=str, help='benchmark type i.e. tpcc, tpch', required=True) + cmd_gen.add_argument('--db', metavar='', + type=str, help='target database i.e. mysql, postgres', required=True) + cmd_gen.add_argument('--scalefactor', metavar='', + type=int, help='the scale factor', required=False) + # global flags + # NOTE: you have to apply them before sub command, i.e. config.py --verbose valid instead of config.py valid --verbose + parser.add_argument('--verbose', dest='verbose', + help='verbose logging', action='store_true') + parser.set_defaults(verbose=False) + parser.add_argument('--output', metavar='', + type=str, help='output file location') + + args = parser.parse_args() + # print(args) + if not args.subcommand: + parser.print_help() + exit(1) + if args.verbose: + logging.basicConfig(level=logging.DEBUG) + else: + logging.basicConfig(level=logging.INFO) + # switch to directory of config.py + dir_path = os.path.dirname(os.path.realpath(__file__)) + os.chdir(dir_path) + # dispatch + if args.subcommand == 'validate': + cli.validate() + elif args.subcommand == 'generate': + cli.read_args(args) + cli.generate() + elif args.subcommand == 'benchmarks': + cli.benchmarks() + elif args.subcommand == 'databases': + cli.databases() + else: + print('unknown command') + exit(1) + + +if __name__ == '__main__': + main() diff --git a/config/databases.yml b/config/databases.yml new file mode 100644 index 000000000..284db57e8 --- /dev/null +++ b/config/databases.yml @@ -0,0 +1,68 @@ +# list of databases grouped by type +### --- start of RDBMS --- ### +mysql: + name: MySQL + alias: + - dolphin + driver: com.mysql.jdbc.Driver + port: 3306 + username: root + password: oltpbenchpassword + create_db: "CREATE DATABASE IF NOT EXISTS {db}" + shell: "mysql -u {username} -p{password}" + shell_exec: "mysql -u {username} -p{password} -e \"{sql}\"" + # TODO: docker and local installation may use different default user and pwd +postgres: + name: PostgreSQL + alias: + - postgresql + - pg + driver: org.postgresql.Driver + port: 5432 + # NOTE: this is needed because database name is postgres instead of postgresql + dburl: "jdbc:postgresql://{host}:{port}/{db}" + username: oltpbench + password: oltpbenchpassword + # NOTE: https://stackoverflow.com/questions/18389124/simulate-create-database-if-not-exists-for-postgresql + create_db: "CREATE DATABASE {db}" + shell: "psql -U {username} -h 127.0.0.1" + shell_exec: "psql -U {username} -h 127.0.0.1 -c \"{sql}\"" +tidb: + name: TiDB + alias: + - Tidb + driver: com.mysql.jdbc.Driver + port: 4000 + # NOTE: this is needed because tidb is mysql compataible + dburl: "jdbc:mysql://{host}:{port}/{db}" + username: root + password: '' + create_db: "CREATE DATABASE IF NOT EXISTS {db}" + shell: "mysql -u {username} -h 127.0.0.1 -P 4000" + shell_exec: "mysql -u {username} -h 127.0.0.1 -P 4000 -e \"{sql}\"" + require_native_shell: true # tidb's docker container does not ship with mysql client +memsql: + name: MemSQL + driver: com.mysql.jdbc.Driver + # NOTE: this is needed because memsql is mysql compataible + dburl: "jdbc:mysql://{host}:{port}/{db}" + port: 3306 + username: root + password: '' + create_db: "CREATE DATABASE IF NOT EXISTS {db}" + shell: "memsql-shell -u {username}" + shell_exec: "memsql-shell -u {username} -e \"{sql}\"" +### --- end of RDBMS --- ### +### --- start of column family --- ### +cassandra: + name: Cassandra + alias: + - C* + driver: com.github.adejanovski.cassandra.jdbc.CassandraDriver + port: 9042 + username: cassandra + password: cassandra + create_db: "CREATE KEYSPACE IF NOT EXISTS {db} WITH REPLICATION = {'class' : 'SimpleStrategy', 'replication_factor' : 1}" + shell: "cqlsh -u {username} -p {password}" + shell_exec: "cqlsh -u {username} -p {password} -e \"{sql}\"" +## --- end of column family --- ### \ No newline at end of file From af39406f1703c1a03dcbd515ac546dc6e0e3e9b8 Mon Sep 17 00:00:00 2001 From: at15 Date: Wed, 7 Feb 2018 14:28:15 -0800 Subject: [PATCH 3/9] docker: Switch to docker test on travis - stop travis builtin mysql and postgres - include docker compose file for mysql, postgres, tidb, memsql --- .travis.yml | 206 ++++++++++------------------------------- docker/.editorconfig | 8 ++ docker/.env | 5 + docker/Makefile | 35 +++++++ docker/README.md | 59 ++++++++++++ docker/adminer.yml | 9 ++ docker/cassandra.yml | 10 ++ docker/create_db.py | 134 +++++++++++++++++++++++++++ docker/memsql.yml | 15 +++ docker/mysql.yml | 14 +++ docker/postgres.yml | 14 +++ docker/tidb.yml | 10 ++ docker/travis_start.sh | 25 +++++ docker/travis_stop.sh | 14 +++ oltpbenchmark | 13 ++- 15 files changed, 412 insertions(+), 159 deletions(-) create mode 100644 docker/.editorconfig create mode 100644 docker/.env create mode 100644 docker/Makefile create mode 100644 docker/README.md create mode 100644 docker/adminer.yml create mode 100644 docker/cassandra.yml create mode 100755 docker/create_db.py create mode 100644 docker/memsql.yml create mode 100644 docker/mysql.yml create mode 100644 docker/postgres.yml create mode 100644 docker/tidb.yml create mode 100755 docker/travis_start.sh create mode 100755 docker/travis_stop.sh diff --git a/.travis.yml b/.travis.yml index b8e988670..c290ce242 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,168 +1,58 @@ -dist: trusty +git: + depth: 3 sudo: required -group: deprecated-2017Q2 - -# lib contains jar files to support running tests -cache: - directories: - - lib - -language: java +services: + - docker +language: java # default is oracle JDK 1.8.0_151 jdk: - oraclejdk8 - - openjdk8 - -# oraclejdk9 failures - https://github.com/oltpbenchmark/oltpbench/issues/137 -#matrix: -# allow_failures: -# - jdk: oraclejdk9 - -# Currently oraclejdk8 is mapped to DB=mysql and the -# others are DB=postgres. -# -# a test env of: - DB=mysql TEST=tatp -# duplicated for postgres would of been nice however -# attempting to limit non-junit tests to single jdk with -# matrix: -# exclude: -# - jdk: oraclejdk8 -# env: DB=mysql -# - jdk: oraclejdk9 -# env: DB=mysql -# - jdk: oraclejdk8 -# env: DB=postgres -# - jdk: oraclejdk9 -# env: DB=postgres -# Failed to exclude any elements. - -# Possibilities for future: -# matrix: -# include: -# - addons: -# mariadb: 5.5 -# - addons: -# mariadb: 10.0 -# - addons: -# mariadb: 10.1 -# - addons: -# mariadb: 10.2 -# - addons: -# postgresql: 9.4 -# - addons: -# postgresql: 9.5 -# - addons: -# postgresql: 9.6 -## - addons: -## postgresql: 9.7 -# https://docs.travis-ci.com/user/database-setup/#Using-a-different-PostgreSQL-Version -# MariaDB wasn't supported on trusty-containers at time of writing -# This syntax may not be correct. - addons: - postgresql: 9.6 - + apt: + packages: + - "python3" + - "python3-pip" +# TODO: build matrix for different database and benchmarks +# https://docs.travis-ci.com/user/environment-variables/#Defining-Multiple-Variables-per-Item env: - - TEST=junit - - TEST=epinions - - TEST=tatp - - TEST=tpcc - - TEST=voter - - TEST=auctionmark - - TEST=wikipedia - - TEST=ycsb - - TEST=seats - - TEST=sibench - - TEST=noop - - TEST=smallbank - - TEST=twitter - - TEST=resourcestresser - -# Missing loader com.oltpbenchmark.benchmarks.resourcestresser.ResourceStresserBenchmark.makeLoaderImpl(ResourceStresserBenchmark.java:58) -# -> org.apache.commons.lang.NotImplementedException: Code is not implemented -# - TEST=resourcestresser - -# Missing sample config file -# - TEST=chbenchmark -# -# Missing sample config -# - TEST=hyadapt -# -# Not fully implemented -# - TEST=jpab -# -# Works only for MySQL at this time -# - TEST=linkbench -# - -# While mariadb addon isn't used. Remove if using a addon: mariadb -services: - - mysql - -# Increase the size of ramdisk on sudo enabled infrastructure -# https://github.com/travis-ci/travis-ci/issues/9036#issuecomment-357189213 + - BENCH=tpcc DB=mysql + - BENCH=tpcc DB=postgres + - BENCH=tpcc DB=tidb + # - BENCH=tpcc DB=memsql + - BENCH=epinions DB=mysql + - BENCH=tatp DB=mysql + - BENCH=ycsb DB=mysql + - BENCH=voter DB=mysql + # - BENCH=auctionmark DB=mysql + - BENCH=wikipedia DB=mysql + - BENCH=seats DB=mysql + - BENCH=sibench DB=mysql + - BENCH=noop DB=mysql + - BENCH=smallbank DB=mysql + - BENCH=twitter DB=mysql + - BENCH=resourcestresser DB=mysql + - BENCH=ycsb DB=cassandra + # - BENCH=TPCH DB=mysql + # - BENCH=TPCH DB=postgres +# https://stackoverflow.com/questions/34377017/what-are-the-differences-between-the-before-install-script-travis-yml-opti before_install: - - sudo mount -o remount,size=50% /var/ramfs - + - python3 --version + - sudo pip3 install pyyaml + - java -version + - docker version + - docker-compose version + # check if common ports are already in use, travis starts a bunch of DBMS by default .... + - sudo netstat -nlp | grep :3306 + - sudo netstat -nlp | grep :5432 + - sudo service mysql stop + - sudo service postgresql stop +# https://docs.travis-ci.com/user/database-setup/#Multiple-Database-Builds install: - - echo $TRAVIS_JDK_VERSION - - if [ $TRAVIS_JDK_VERSION == oraclejdk8 ]; then - DB=mysql ; - else - DB=postgres ; - fi - - if [ $DB == mysql ]; then mysql -e "SELECT VERSION()"; - mysql -e "CREATE DATABASE IF NOT EXISTS ${TEST}" ; - mysql -e "CREATE USER 'travis'@'localhost' IDENTIFIED BY 'travis'; GRANT ALL ON *.* TO 'travis'@'localhost'"; - elif [ $DB == postgres ]; then psql -c "SELECT VERSION()" -U travis; - psql -c "create database $TEST" -U postgres ; - psql -c "ALTER USER CURRENT_USER WITH PASSWORD 'travis'" -U travis; - fi - -# MySQL create user is probably one of the trust-container bugs for MySQL -# Will probably need the following to set a password - -# We pass a password here as sends no password in the protocol -# rather than the blank one and therefore fails on MySQL. - + - ant build + - ./docker/travis_start.sh before_script: - - if [ $DB == mysql ]; then - URLBASE=jdbc:mysql://localhost:3306 ; - DRIVER=com.mysql.jdbc.Driver ; - TYPE=mysql ; - elif [ $DB == postgres ]; then - URLBASE=jdbc:postgresql://localhost:5432 ; - DRIVER=org.postgresql.Driver ; - TYPE=postgres ; - fi - + - ./config/config.py validate script: - - SCALEFACTOR=0.5 - - if [ $TEST == junit ]; then - ant junit; - else - ant build; - config=config/sample_${TEST}_config.xml ; - sed -i - -e "//c\${TYPE}" - -e "//c\${DRIVER}" - -e "//c\${URLBASE}/${TEST}" - -e '//c\travis' - -e '//c\travis' - -e "//c\\${SCALEFACTOR}" - -e '//c\3' - -e '/