diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-23 16:45:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-23 16:45:13 +0000 |
commit | 389020e14594e4894e28d1eb9103c210b142509e (patch) | |
tree | 2ba734cdd7a243f46dda7c3d0cc88c2293d9699f /src/s3select/TPCDS/run_tpcds.bash | |
parent | Adding upstream version 18.2.2. (diff) | |
download | ceph-389020e14594e4894e28d1eb9103c210b142509e.tar.xz ceph-389020e14594e4894e28d1eb9103c210b142509e.zip |
Adding upstream version 18.2.3.upstream/18.2.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/s3select/TPCDS/run_tpcds.bash')
-rw-r--r-- | src/s3select/TPCDS/run_tpcds.bash | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/s3select/TPCDS/run_tpcds.bash b/src/s3select/TPCDS/run_tpcds.bash new file mode 100644 index 000000000..f1c3eecf9 --- /dev/null +++ b/src/s3select/TPCDS/run_tpcds.bash @@ -0,0 +1,31 @@ +#!/bin/bash + +## this script is the entry-point of tpcds-data-generation +## the first and the only argument is the SCALE factor + +[ $# -lt 1 ] && echo "type a single number for the scale (2 --> 3000)" && exit + +re='^[0-9]+$' +[[ ! $1 =~ $re ]] && echo "SCALE should be a number" && exit + +## the following code lines accepts env-variables for the S3 system +[ -z ${S3_ENDPOINT} ] && echo "missing env-variable S3_ENDPOINT" && exit +[ -z ${S3_ACCESS_KEY} ] && echo missing env-variable S3_ACCESS_KEY && exit +[ -z ${S3_SECRET_KEY} ] && echo missing env-variable S3_SECRET_KEY && exit + +## updating AWS credentials +cat ~/.aws/credentials | \ + awk -v acc=${S3_ACCESS_KEY} '{if($0 ~ /aws_access_key_id/){print "aws_access_key_id = ",acc;} else{print $0;}}' | \ + awk -v acc=${S3_SECRET_KEY} '{if($0 ~ /aws_secret_access_key/){print "aws_secret_access_key = ",acc;} else{print $0;}}' > /tmp/credentials + +cat /tmp/credentials > ~/.aws/credentials + +export SCALE=$1 + +. ./generate_upload_and_remove_infra.bash + +## create generate_upload_and_remove_exec.bash +create_dsdgen_workers +## running tpcds data generator script +time /generate_upload_and_remove_exec.bash + |