kyuubi/dev/kyuubi-tpcds
Cheng Pan 68b924513c
[KYUUBI #1811] TPC-DS benchmark expose cli args breakdown and results-dir
### _Why are the changes needed?_

Expose `breakdown` and `results-dir` as cli arg in TPC-DS benchmark tool

### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

- [ ] Add screenshots for manual tests if appropriate

- [ ] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request

Closes #1811 from pan3793/tpcds.

Closes #1811

18637ce7 [Cheng Pan] nit
cc10a7ea [Cheng Pan] style
51e07398 [Cheng Pan] expose results-dir
4bc57995 [Cheng Pan] TPC-DS benchmark expose cli arg breakdown

Authored-by: Cheng Pan <chengpan@apache.org>
Signed-off-by: ulysses-you <ulyssesyou@apache.org>
2022-02-11 13:30:37 +08:00
..
src/main [KYUUBI #1811] TPC-DS benchmark expose cli args breakdown and results-dir 2022-02-11 13:30:37 +08:00
pom.xml [KYUUBI #1769][FOLLOWUP] Some cleanups for log4j properties 2022-01-28 00:58:25 +08:00
README.md [KYUUBI #1811] TPC-DS benchmark expose cli args breakdown and results-dir 2022-02-11 13:30:37 +08:00

Introduction

This module includes TPC-DS data generator and benchmark tool.

How to use

package jar with following command: ./build/mvn clean package -Ptpcds -pl dev/kyuubi-tpcds -am

Data Generator

Support options:

key default description
db default the database to write data
scaleFactor 1 the scale factor of TPC-DS
format parquet the format of table to store data
parallel scaleFactor * 2 the parallelism of Spark job

Example: the following command to generate 10GB data with new database tpcds_sf10.

$SPARK_HOME/bin/spark-submit \
  --class org.apache.kyuubi.tpcds.DataGenerator \
  kyuubi-tpcds_*.jar \
  --db tpcds_sf10 --scaleFactor 10 --format parquet --parallel 20

Benchmark Tool

Support options:

key default description
db none(required) the TPC-DS database
benchmark tpcds-v2.4-benchmark the name of application
iterations 3 the number of iterations to run
breakdown false whether to record breakdown results of an execution
filter a filter on the name of the queries to run, e.g. q1-v2.4
results-dir /spark/sql/performance dir to store benchmark results, e.g. hdfs://hdfs-nn:9870/pref

Example: the following command to benchmark TPC-DS sf10 with exists database tpcds_sf10.

$SPARK_HOME/bin/spark-submit \
  --class org.apache.kyuubi.tpcds.benchmark.RunBenchmark \
  kyuubi-tpcds_*.jar --db tpcds_sf10

We also support run one of the TPC-DS query:

$SPARK_HOME/bin/spark-submit \
  --class org.apache.kyuubi.tpcds.benchmark.RunBenchmark \
  kyuubi-tpcds_*.jar --db tpcds_sf10 --filter q1-v2.4

The result of TPC-DS benchmark like:

name minTimeMs maxTimeMs avgTimeMs stdDev stdDevPercent
q1-v2.4 50.522384 868.010383 323.398267 471.6482 145.8413108576