diff --git a/README.md b/README.md index e72f980..7e229a5 100644 --- a/README.md +++ b/README.md @@ -21,10 +21,9 @@ features, e.g., per-transaction-type latency and throughput logs. ``` + Run the following commands to build: ```bash - ant bootstrap - ant resolve - ant build + mvn clean install ``` ++ Copy and unpack `target/tpcc.tar.gz` file on client machine ## Setup of the Database The DB connection details should be as follows: @@ -45,38 +44,63 @@ The workload descriptor works the same way as it does in the upstream branch and ## Running the Benchmark -A utility script (./tpccbenchmark) is provided for running the benchmark. The options are +A utility script `./tpccbenchmark` is provided for running the benchmark. The options are ``` --c,--config [required] Workload configuration file - --clear Clear all records in the database for this - benchmark - --create Initialize the database for this benchmark - --execute Execute the benchmark workload --h,--help Print this help - --histograms Print txn histograms - --load Load data using the benchmark's data loader --o,--output Output file (default System.out) - --runscript Run an SQL script --s,--sample Sampling window --v,--verbose Display Messages + -c,--config Workload configuration file + [default: config/workload_all.xml] + --clear Clear all records in the database + for this benchmark + --create Initialize the database for this + benchmark + --create-sql-procedures Creates the SQL procedures + --dir Directory containing the csv files + --enable-foreign-keys Whether to enable foregin keys + --execute Execute the benchmark workload + -gpc,--geopartitioned-config GeoPartitioning configuration file + [default: + config/geopartitioned_workload.xml] + -h,--help Print this help + --histograms Print txn histograms + -im,--interval-monitor Throughput Monitoring Interval in + milliseconds + --initial-delay-secs Delay in seconds for starting the + benchmark + --load Load data using the benchmark's data + loader + --loaderthreads Number of loader threads (default + 10) + --merge-results Merge results from various output + files + --nodes comma separated list of nodes + (default 127.0.0.1) + --num-connections Number of connections used + --output-raw Output raw data + --output-samples Output sample data + --start-warehouse-id Start warehouse id + --total-warehouses Total number of warehouses across + all executions + --vv Output verbose execute results + --warehouses Number of warehouses (default 10) + --warmup-time-secs Warmup time in seconds for the + benchmark ``` ## Example -The following command for example initiates a tpcc database (--create=true --load=true) and a then run a workload as described in config/workload_all.xml file. The results (latency, throughput) are summarized and written into two files: outputfile.res (aggregated) and outputfile.raw (detailed): +First step is to create tables and indexes, can be done by calling following command ``` -./tpccbenchmark -c config/workload_all.xml --create=true --load=true --execute=true -s 300 -o outputfile +./tpccbenchmark --nodes $COMMA_SEPARATED_IPS --create true --vv ``` -Since data loading can be a lengthy process, one could first create a and populate a database which can be reused for multiple experiments: +Since data loading can be a lengthy process,one can be used to populate a database which can be reused for multiple experiments: ``` -./tpccbenchmark -c config/workload_all.xml --create=true --load=true +./tpccbenchmark --nodes $COMMA_SEPARATED_IPS --load true --warehouses $WAREHOUSES --loaderthreads $LOADER_THREADS --vv ``` Then running an experiment could be simply done with the following command on a fresh or used database. ``` -./tpccbenchmark -c config/workload_all.xml --execute=true -s 300 -o outputfile +./tpccbenchmark--nodes $COMMA_SEPARATED_IPS --execute true --warehouses $WAREHOUSES --warmup-time-secs 30 --vv ``` diff --git a/assembly/bin.xml b/assembly/bin.xml new file mode 100644 index 0000000..dc33e42 --- /dev/null +++ b/assembly/bin.xml @@ -0,0 +1,50 @@ + + + + tar.gz + + + false + + + + + + config + tpcc/config + + *.xml + + + + + + tpcc + + tpccbenchmark + LICENSE + README.md + log4j.properties + + + + + + target + tpcc/libs + + oltpbench-*.jar + + + + + + target/libs + tpcc/libs + + *.jar + + + + + \ No newline at end of file diff --git a/build.xml b/build.xml deleted file mode 100644 index 64dff8d..0000000 --- a/build.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/classpath.sh b/classpath.sh deleted file mode 100755 index d383091..0000000 --- a/classpath.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -echo -ne "build" -for i in `ls lib/*.jar`; do - # IMPORTANT: Make sure that we do not include hsqldb v1 - if [[ $i =~ .*hsqldb-1.* ]]; then - continue - fi - echo -ne ":$i" -done diff --git a/ivy.xml b/ivy.xml deleted file mode 100644 index 1bad0c8..0000000 --- a/ivy.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ivysettings.xml b/ivysettings.xml deleted file mode 100644 index aa911ee..0000000 --- a/ivysettings.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/pom.xml b/pom.xml index 78fb23a..4347979 100644 --- a/pom.xml +++ b/pom.xml @@ -10,8 +10,8 @@ jar - 1.10 - 1.10 + 1.8 + 1.8 @@ -32,6 +32,28 @@ JAR with dependencies --> + org.apache.maven.plugins + maven-dependency-plugin + 3.2.0 + + + copy-dependencies + package + + copy-dependencies + + + ${project.build.directory}/libs + provided + false + false + true + + + + + + org.apache.maven.plugins maven-assembly-plugin @@ -42,6 +64,8 @@ jar-with-dependencies + assembly/bin.xml + tpcc @@ -86,6 +110,7 @@ org.hsqldb hsqldb-j5 2.0.0 + provided javax.persistence @@ -105,7 +130,12 @@ commons-configuration commons-configuration - 1.6 + 1.10 + + + commons-collections + commons-collections + 3.2.1 net.sf.opencsv diff --git a/tpccbenchmark b/tpccbenchmark index 4a03fcf..b86c50c 100755 --- a/tpccbenchmark +++ b/tpccbenchmark @@ -1,3 +1,3 @@ #!/bin/bash memory='8G' -java -Xmx$memory -cp `./classpath.sh bin` -Dlog4j.configuration=log4j.properties com.oltpbenchmark.DBWorkload $@ +java -Xmx$memory -cp "libs/*" -Dlog4j.configuration=log4j.properties com.oltpbenchmark.DBWorkload $@