2019-02-06 08:46:41 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-02-07 19:06:21 +00:00
|
|
|
set -ex
|
2019-02-06 08:46:41 +00:00
|
|
|
|
|
|
|
install_packages() {
|
|
|
|
dpkg -i package_folder/clickhouse-common-static_*.deb
|
|
|
|
dpkg -i package_folder/clickhouse-server_*.deb
|
|
|
|
dpkg -i package_folder/clickhouse-client_*.deb
|
|
|
|
dpkg -i package_folder/clickhouse-test_*.deb
|
2020-02-07 22:20:05 +00:00
|
|
|
ln -s /usr/share/clickhouse-test/config/log_queries.xml /etc/clickhouse-server/users.d/
|
2019-02-06 08:46:41 +00:00
|
|
|
service clickhouse-server start && sleep 5
|
|
|
|
}
|
|
|
|
|
|
|
|
download_data() {
|
2019-12-16 18:29:18 +00:00
|
|
|
clickhouse-client --query "ATTACH DATABASE IF NOT EXISTS datasets ENGINE = Ordinary"
|
2019-02-06 08:46:41 +00:00
|
|
|
clickhouse-client --query "CREATE DATABASE IF NOT EXISTS test"
|
|
|
|
/s3downloader --dataset-names $OPEN_DATASETS
|
|
|
|
/s3downloader --dataset-names $PRIVATE_DATASETS --url 'https://s3.mds.yandex.net/clickhouse-private-datasets'
|
|
|
|
chmod 777 -R /var/lib/clickhouse
|
|
|
|
service clickhouse-server restart && sleep 5
|
|
|
|
clickhouse-client --query "RENAME TABLE datasets.hits_v1 TO test.hits"
|
|
|
|
}
|
|
|
|
|
|
|
|
run() {
|
|
|
|
clickhouse-performance-test $TESTS_TO_RUN | tee test_output/test_result.json
|
|
|
|
}
|
|
|
|
|
|
|
|
install_packages
|
|
|
|
|
|
|
|
if [ $DOWNLOAD_DATASETS -eq 1 ]; then
|
|
|
|
download_data
|
|
|
|
fi
|
|
|
|
|
2020-02-06 15:45:23 +00:00
|
|
|
clickhouse-client --query "select * from system.settings where name = 'log_queries'"
|
2020-02-06 15:06:44 +00:00
|
|
|
tree /etc/clickhouse-server
|
2020-02-06 22:41:38 +00:00
|
|
|
cat /var/lib/clickhouse/preprocessed_configs/config.xml
|
|
|
|
cat /var/lib/clickhouse/preprocessed_configs/users.xml
|
2020-02-06 15:06:44 +00:00
|
|
|
|
2019-02-06 08:46:41 +00:00
|
|
|
run
|