#!/bin/bash set -e PWD=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) source $PWD/functions.sh GEN_DATA_SCALE="$1" EXPLAIN_ANALYZE="$2" RANDOM_DISTRIBUTION="$3" MULTI_USER_COUNT="$4" RUN_COMPILE_TPCH="$5" RUN_GEN_DATA="$6" RUN_INIT="$7" RUN_DDL="$8" RUN_LOAD="$9" RUN_SQL="${10}" RUN_SINGLE_USER_REPORT="${11}" RUN_MULTI_USER="${12}" RUN_MULTI_USER_REPORT="${13}" SINGLE_USER_ITERATIONS="${14}" VERSION="${15}" SERVER_CERTIFICATE="${16}" ITERATIONS="${17}" if [[ "$GEN_DATA_SCALE" == "" || "$EXPLAIN_ANALYZE" == "" || "$RANDOM_DISTRIBUTION" == "" || "$MULTI_USER_COUNT" == "" || "$RUN_COMPILE_TPCH" == "" || "$RUN_GEN_DATA" == "" || "$RUN_INIT" == "" || "$RUN_DDL" == "" || "$RUN_LOAD" == "" || "$RUN_SQL" == "" || "$RUN_SINGLE_USER_REPORT" == "" || "$RUN_MULTI_USER" == "" || "$RUN_MULTI_USER_REPORT" == "" || "$SINGLE_USER_ITERATIONS" == "" ]]; then echo "Parameters: scale, explain T/F, random T/F, multi-user count, run compile T/F, run gen_data T/F, run init T/F, run DDL T/F, run load T/F, run SQL T/F, run single report T/F, run multi-user T/F, run multi report T/F, and single user iterations count." echo "Example: ./rollout.sh 100 false false 5 true true true true true true true true true 1 exasol" exit 1 fi if [ "$VERSION" == "exasol" ]; then if [ "$SERVER_CERTIFICATE" == "" ]; then echo "You need the servers certificate fingerprint to run exasol." echo "Execute the following command to get the current certificate fingerprint:" echo "./EXAplus-7.1.2/exaplus -c localhost/$SERVER_CERTIFICATE:8563 -u sys -p exasol" exit 1 fi fi QUIET=$5 create_directories() { if [ ! -d $LOCAL_PWD/log ]; then echo "Creating log directory" mkdir $LOCAL_PWD/log fi } create_directories echo "GEN_DATA_SCALE: $GEN_DATA_SCALE" echo "EXPLAIN_ANALYZE: $EXPLAIN_ANALYZE" echo "RANDOM_DISTRIBUTION: $RANDOM_DISTRIBUTION" echo "MULTI_USER_COUNT: $MULTI_USER_COUNT" echo "RUN_COMPILE_TPCH: $RUN_COMPILE_TPCH" echo "RUN_GEN_DATA: $RUN_GEN_DATA" echo "RUN_INIT: $RUN_INIT" echo "RUN_DDL: $RUN_DDL" echo "RUN_LOAD: $RUN_LOAD" echo "RUN_SQL: $RUN_SQL" echo "SINGLE_USER_ITERATIONS: $SINGLE_USER_ITERATIONS" echo "RUN_SINGLE_USER_REPORT: $RUN_SINGLE_USER_REPORT" echo "RUN_MULTI_USER: $RUN_MULTI_USER" echo "RUN_MULTI_USER_REPORT: $RUN_MULTI_USER_REPORT" echo "############################################################################" echo "" if [ "$RUN_COMPILE_TPCH" == "true" ]; then rm -f $PWD/log/end_compile_tpch.log fi if [ "$RUN_GEN_DATA" == "true" ]; then rm -f $PWD/log/end_gen_data.log fi if [ "$RUN_INIT" == "true" ]; then rm -f $PWD/log/end_init.log fi if [ "$RUN_DDL" == "true" ]; then rm -f $PWD/log/end_ddl.log fi if [ "$RUN_LOAD" == "true" ]; then rm -f $PWD/log/end_load.log fi if [ "$RUN_SQL" == "true" ]; then rm -f $PWD/log/end_sql.log fi if [ "$RUN_SINGLE_USER_REPORT" == "true" ]; then rm -f $PWD/log/end_single_user_reports.log fi if [ "$RUN_MULTI_USER" == "true" ]; then rm -f $PWD/log/end_testing_*.log fi if [ "$RUN_MULTI_USER_REPORT" == "true" ]; then rm -f $PWD/log/end_multi_user_reports.log fi #get_version echo "version is $VERSION" if [ "$VERSION" == "exasol" ]; then source install_exaplus.sh fi if [ "$RUN_COMPILE_TPCH" == "true" ]; then rm -f $PWD/log/end_compile_tpch.log 00_compile_tpch/rollout_compile.sh $GEN_DATA_SCALE $EXPLAIN_ANALYZE $RANDOM_DISTRIBUTION $MULTI_USER_COUNT $SINGLE_USER_ITERATIONS $VERSION fi if [ "$RUN_GEN_DATA" == "true" ]; then rm -f $PWD/log/end_gen_data.log 01_gen_data/rollout_gen_data.sh $GEN_DATA_SCALE $EXPLAIN_ANALYZE $RANDOM_DISTRIBUTION $MULTI_USER_COUNT $SINGLE_USER_ITERATIONS $VERSION fi # if [ "$RUN_INIT" == "true" ]; then # rm -f $PWD/log/end_init.log # 02_init/rollout_init.sh $GEN_DATA_SCALE $EXPLAIN_ANALYZE $RANDOM_DISTRIBUTION $MULTI_USER_COUNT $SINGLE_USER_ITERATIONS $VERSION # fi if [ "$RUN_DDL" == "true" ]; then rm -f $PWD/log/end_ddl.log 03_ddl/rollout_ddl.sh $GEN_DATA_SCALE $EXPLAIN_ANALYZE $RANDOM_DISTRIBUTION $MULTI_USER_COUNT $SINGLE_USER_ITERATIONS $VERSION $SERVER_CERTIFICATE fi if [ "$RUN_LOAD" == "true" ]; then rm -f $PWD/log/end_load.log 04_load/rollout_load.sh $GEN_DATA_SCALE $EXPLAIN_ANALYZE $RANDOM_DISTRIBUTION $MULTI_USER_COUNT $SINGLE_USER_ITERATIONS $VERSION $SERVER_CERTIFICATE fi for iteration in $(seq 1 $ITERATIONS); do if [ "$RUN_SQL" == "true" ]; then rm -f $PWD/log/end_sql.log 05_sql/rollout_sql.sh $GEN_DATA_SCALE $EXPLAIN_ANALYZE $RANDOM_DISTRIBUTION $MULTI_USER_COUNT $SINGLE_USER_ITERATIONS $VERSION $SERVER_CERTIFICATE fi if [ "$RUN_MULTI_USER" == "true" ]; then rm -f $PWD/log/end_testing_*.log 07_multi_user/rollout_multiuser.sh $GEN_DATA_SCALE $EXPLAIN_ANALYZE $RANDOM_DISTRIBUTION $MULTI_USER_COUNT $SINGLE_USER_ITERATIONS $VERSION $SERVER_CERTIFICATE fi done if [ "$RUN_SINGLE_USER_REPORT" == "true" ]; then rm -f $PWD/log/end_single_user_reports.log 06_single_user_reports/rollout_reports.sh $GEN_DATA_SCALE $EXPLAIN_ANALYZE $RANDOM_DISTRIBUTION $MULTI_USER_COUNT $SINGLE_USER_ITERATIONS $VERSION fi if [ "$RUN_MULTI_USER_REPORT" == "true" ]; then rm -f $PWD/log/end_multi_user_reports.log #$ITERATIONS 08_multi_user_reports/rollout_multiuser_reports.sh $GEN_DATA_SCALE $EXPLAIN_ANALYZE $RANDOM_DISTRIBUTION $MULTI_USER_COUNT $SINGLE_USER_ITERATIONS $VERSION fi