File tree Expand file tree Collapse file tree
clickhouse-parquet-partitioned Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /bin/bash
22export BENCH_DOWNLOAD_SCRIPT=" download-hits-parquet-partitioned"
3- export BENCH_RESTARTABLE=no
4- # Single-process engine: each query forks a fresh full-machine process with no
5- # shared scheduler across connections, so the concurrent-QPS test only
6- # oversubscribes RAM rather than measuring throughput. Skip it by default;
7- # override BENCH_CONCURRENT_DURATION to re-enable. See issue #946.
8- export BENCH_CONCURRENT_DURATION=" ${BENCH_CONCURRENT_DURATION:- 0} "
93exec ../lib/benchmark-common.sh
Original file line number Diff line number Diff line change 11#! /bin/bash
2- set -e
3-
4- ./clickhouse local --tmp --query " SELECT 1" > /dev/null
2+ # The benchmark driver discards the output of ./start but prints the stderr
3+ # of the last failed ./check, so on failure we add the end of the server logs.
4+ if ! ./clickhouse client --query " SELECT 1" > /dev/null; then
5+ for f in server-data/stdout.log server-data/clickhouse-server.err.log; do
6+ if [ -f " $f " ]; then
7+ echo " The end of $f :" >&2
8+ tail -n 20 " $f " >&2
9+ fi
10+ done
11+ exit 1
12+ fi
Original file line number Diff line number Diff line change 1+ # A minimal configuration of clickhouse-server running from the entry
2+ # directory. Everything not listed here is the default.
3+ path : ./server-data/
4+ # Relative to `path`.
5+ tmp_path : ./tmp/
6+ user_files_path : ./user_files/
7+ logger :
8+ level : information
9+ log : ./server-data/clickhouse-server.log
10+ errorlog : ./server-data/clickhouse-server.err.log
11+ tcp_port : 9000
12+ http_port : 8123
13+ listen_host : 127.0.0.1
14+ users_config : users.yaml
Original file line number Diff line number Diff line change @@ -4,3 +4,6 @@ set -e -o pipefail
44if [ ! -x ./clickhouse ]; then
55 curl -fsSL --retry 10 --retry-delay 60 --retry-all-errors https://clickhouse.com/ | sh
66fi
7+ # The binary is self-extracting: it decompresses itself on the first run.
8+ # Do it here, rather than when ./start and ./check run it at the same time.
9+ ./clickhouse --version
Original file line number Diff line number Diff line change 11#! /bin/bash
22set -e
33
4- # clickhouse-local with File(Parquet, 'hits_*.parquet') reads the parquet files
5- # in place, so there's no separate ingest step. Keep the downloaded
6- # hits_*.parquet files in this directory.
4+ # The File(Parquet) table reads the parquet files in place, so there is no
5+ # ingest step. The server resolves the path of the table relative to its
6+ # user_files directory: symlink the files there and keep them for the queries.
7+ mkdir -p server-data/user_files
8+ for f in hits_* .parquet; do
9+ ln -sf " $PWD /$f " " server-data/user_files/$f "
10+ done
11+
12+ ./clickhouse client < create.sql
713sync
Original file line number Diff line number Diff line change 11#! /bin/bash
2- # Reads a SQL query from stdin, runs it via clickhouse-local with the table
3- # definition from create.sql prepended. Stdout: query result. Stderr: query
4- # runtime in fractional seconds on the last line. Exit non-zero on error.
5- # --tmp: since 26.11, clickhouse-local keeps its databases in
6- # ~/.local/share/clickhouse-local, and `hits` would already exist in the second
7- # query.
2+ # Reads a SQL query from stdin, runs it via clickhouse-client.
3+ # Stdout: query result. Stderr: query runtime in fractional seconds on the
4+ # last line (from --time). Exit non-zero on error.
85set -e
96
10- query=$( cat)
11- ./clickhouse local --tmp --time --format=Pretty --query=" $( cat create.sql) ; ${query} "
7+ ./clickhouse client --time --format=Pretty
Original file line number Diff line number Diff line change 11#! /bin/bash
2- # clickhouse-local is invoked per-query — no daemon to start.
3- exit 0
2+ set -e
3+
4+ if ! [ -f server-data/clickhouse.pid ] || ! kill -0 " $( cat server-data/clickhouse.pid) " 2> /dev/null; then
5+ mkdir -p server-data
6+ setsid nohup ./clickhouse server --config-file=config.yaml --pid-file=server-data/clickhouse.pid \
7+ > server-data/stdout.log 2>&1 < /dev/null &
8+ fi
Original file line number Diff line number Diff line change 11#! /bin/bash
2- # clickhouse-local is invoked per-query — no daemon to stop.
3- exit 0
2+
3+ [ -f server-data/clickhouse.pid ] || exit 0
4+ pid=$( cat server-data/clickhouse.pid)
5+ kill " $pid " 2> /dev/null || exit 0
6+ for _ in $( seq 1 60) ; do
7+ kill -0 " $pid " 2> /dev/null || exit 0
8+ sleep 1
9+ done
10+ kill -9 " $pid " 2> /dev/null || true
Original file line number Diff line number Diff line change 66 "tags" : [
77 " C++" ,
88 " column-oriented" ,
9- " embedded" ,
109 " stateless" ,
1110 " ClickHouse derivative"
1211 ]
Original file line number Diff line number Diff line change 1+ profiles :
2+ default : {}
3+ users :
4+ default :
5+ password : ' '
6+ networks :
7+ ip : ' ::/0'
8+ profile : default
9+ quota : default
10+ access_management : 1
11+ quotas :
12+ default : {}
You can’t perform that action at this time.
0 commit comments