diff --git a/PreLoad.cmake b/PreLoad.cmake index 946975fac1f..c050f00e92c 100644 --- a/PreLoad.cmake +++ b/PreLoad.cmake @@ -8,7 +8,12 @@ # sudo apt-get install ninja-build # CLion does not support Ninja -if (NOT ${CMAKE_COMMAND} MATCHES "clion") +# You can add your vote on CLion task tracker: +# https://youtrack.jetbrains.com/issue/CPP-2659 +# https://youtrack.jetbrains.com/issue/CPP-870 + +string(TOLOWER "${CMAKE_COMMAND}" CMAKE_COMMAND_LOWER) +if (NOT ${CMAKE_COMMAND_LOWER} MATCHES "clion") find_program(NINJA_PATH ninja) if (NINJA_PATH) set(CMAKE_GENERATOR "Ninja" CACHE INTERNAL "" FORCE) diff --git a/dbms/tests/integration/helpers/cluster.py b/dbms/tests/integration/helpers/cluster.py index 288b15c1526..1333a640938 100644 --- a/dbms/tests/integration/helpers/cluster.py +++ b/dbms/tests/integration/helpers/cluster.py @@ -76,6 +76,12 @@ class ClickHouseCluster: self.is_up = False + def get_client_cmd(self): + cmd = self.client_bin_path + if p.basename(cmd) == 'clickhouse': + cmd += " client" + return cmd + def add_instance(self, name, config_dir=None, main_configs=[], user_configs=[], macros={}, with_zookeeper=False, with_mysql=False, with_kafka=False, clickhouse_path_dir=None, with_odbc_drivers=False, hostname=None, env_variables={}, image="ubuntu:14.04"): """Add an instance to the cluster. diff --git a/dbms/tests/integration/test_extreme_deduplication/test.py b/dbms/tests/integration/test_extreme_deduplication/test.py index f8043632ba6..8dc00582472 100644 --- a/dbms/tests/integration/test_extreme_deduplication/test.py +++ b/dbms/tests/integration/test_extreme_deduplication/test.py @@ -67,20 +67,20 @@ def test_deduplication_works_in_case_of_intensive_inserts(started_cluster): inserters.append(CommandRequest(['/bin/bash'], timeout=10, stdin=""" set -e for i in `seq 1000`; do - clickhouse-client --host {} -q "INSERT INTO simple VALUES (0, 0)" + {} --host {} -q "INSERT INTO simple VALUES (0, 0)" done -""".format(host))) +""".format(cluster.get_client_cmd(), host))) fetchers.append(CommandRequest(['/bin/bash'], timeout=10, stdin=""" set -e for i in `seq 1000`; do - res=`clickhouse-client --host {} -q "SELECT count() FROM simple"` + res=`{} --host {} -q "SELECT count() FROM simple"` if [[ $? -ne 0 || $res -ne 1 ]]; then echo "Selected $res elements! Host: {}" 1>&2 exit -1 fi; done -""".format(host, node.name))) +""".format(cluster.get_client_cmd(), host, node.name))) # There were not errors during INSERTs for inserter in inserters: diff --git a/dbms/tests/integration/test_random_inserts/test.py b/dbms/tests/integration/test_random_inserts/test.py index f626cc1a897..96b522996ac 100644 --- a/dbms/tests/integration/test_random_inserts/test.py +++ b/dbms/tests/integration/test_random_inserts/test.py @@ -50,7 +50,7 @@ def test_random_inserts(started_cluster): bash_script = os.path.join(os.path.dirname(__file__), "test.sh") inserters = [] for node in nodes: - cmd = ['/bin/bash', bash_script, node.ip_address, str(min_timestamp), str(max_timestamp)] + cmd = ['/bin/bash', bash_script, node.ip_address, str(min_timestamp), str(max_timestamp), str(cluster.get_client_cmd())] inserters.append(CommandRequest(cmd, timeout=DURATION_SECONDS * 2, stdin='')) print node.name, node.ip_address @@ -60,7 +60,7 @@ def test_random_inserts(started_cluster): answer="{}\t{}\t{}\t{}\n".format(num_timestamps, num_timestamps, min_timestamp, max_timestamp) for node in nodes: - res = node.query("SELECT count(), uniqExact(i), min(i), max(i) FROM simple") + res = node.query_with_retry("SELECT count(), uniqExact(i), min(i), max(i) FROM simple", check_callback=lambda res: TSV(res) == TSV(answer)) assert TSV(res) == TSV(answer), node.name + " : " + node.query("SELECT groupArray(_part), i, count() AS c FROM simple GROUP BY i ORDER BY c DESC LIMIT 1") node1.query("""DROP TABLE simple ON CLUSTER test_cluster""") diff --git a/dbms/tests/integration/test_random_inserts/test.sh b/dbms/tests/integration/test_random_inserts/test.sh index 38a9582d7b6..6d4e6f8dea8 100755 --- a/dbms/tests/integration/test_random_inserts/test.sh +++ b/dbms/tests/integration/test_random_inserts/test.sh @@ -4,7 +4,7 @@ [[ -n "$1" ]] && host="$1" || host="localhost" [[ -n "$2" ]] && min_timestamp="$2" || min_timestamp=$(( $(date +%s) - 60 )) [[ -n "$3" ]] && max_timestamp="$3" || max_timestamp=$(( $(date +%s) + 60 )) -[[ -n "$4" ]] && iters_per_timestamp="$4" || iters_per_timestamp=5 +[[ -n "$4" ]] && client="$4" || client="clickhouse-client" timestamps=`seq $min_timestamp $max_timestamp` @@ -18,7 +18,7 @@ function reliable_insert { fi #echo clickhouse-client --host $host -q "INSERT INTO simple VALUES (0, $ts, '$ts')" - res=`clickhouse-client --host $host -q "INSERT INTO simple VALUES (0, $ts, '$ts')" 2>&1` + res=`$client --host $host -q "INSERT INTO simple VALUES (0, $ts, '$ts')" 2>&1` rt=$? num_tries=$(($num_tries+1)) diff --git a/dbms/tests/integration/test_replicated_mutations/test.py b/dbms/tests/integration/test_replicated_mutations/test.py index aa6dcda894c..2d142a9e842 100644 --- a/dbms/tests/integration/test_replicated_mutations/test.py +++ b/dbms/tests/integration/test_replicated_mutations/test.py @@ -130,7 +130,7 @@ class Runner: def test_mutations(started_cluster): - DURATION_SECONDS = 50 + DURATION_SECONDS = 30 runner = Runner() @@ -155,8 +155,8 @@ def test_mutations(started_cluster): assert runner.total_mutations > 0 all_done = False - for i in range(100): # wait for replication 50 seconds max - time.sleep(0.5) + for i in range(100): # wait for replication 80 seconds max + time.sleep(0.8) def get_done_mutations(node): return int(node.query("SELECT sum(is_done) FROM system.mutations WHERE table = 'test_mutations'").rstrip()) diff --git a/docs/en/data_types/nullable.md b/docs/en/data_types/nullable.md index 7d24a80dea3..5cddb4c5173 100644 --- a/docs/en/data_types/nullable.md +++ b/docs/en/data_types/nullable.md @@ -52,4 +52,4 @@ FROM t_null └────────────┘ 2 rows in set. Elapsed: 0.144 sec. -`` +``` diff --git a/docs/en/index.md b/docs/en/index.md index 840a40114a9..9794746e9b7 100644 --- a/docs/en/index.md +++ b/docs/en/index.md @@ -20,7 +20,7 @@ In a column-oriented DBMS, data is stored like this: | Row: | #0 | #1 | #2 | #N | | ----------- | ------------------- | ------------------- | ------------------- | ------------------- | -| WatchID: | 5385521489354350662 | 5385521490329509958 | 5385521489953706054 | ... | +| WatchID: | 89354350662 | 90329509958 | 89953706054 | ... | | JavaEnable: | 1 | 0 | 1 | ... | | Title: | Investor Relations | Contact us | Mission | ... | | GoodEvent: | 1 | 1 | 1 | ... | @@ -61,11 +61,11 @@ Column-oriented databases are better suited to OLAP scenarios: they are at least **Row-oriented DBMS** -![Row-oriented ]( images/row_oriented.gif#) +![Row-oriented](images/row_oriented.gif#) **Column-oriented DBMS** -![Column-oriented](images / column_oriented.gif#) +![Column-oriented](images/column_oriented.gif#) See the difference? diff --git a/docs/ru/index.md b/docs/ru/index.md index cd83b410f55..f93ba69574f 100644 --- a/docs/ru/index.md +++ b/docs/ru/index.md @@ -4,12 +4,12 @@ ClickHouse - столбцовая система управления базам В обычной, "строковой" СУБД, данные хранятся в таком порядке: -| Строка | WatchID | JavaEnable | Title | GoodEvent | EventTime | -| ------ | ------------------- | ---------- | ------------------ | --------- | ------------------- | -| #0 | 5385521489354350662 | 1 | Investor Relations | 1 | 2016-05-18 05:19:20 | -| #1 | 5385521490329509958 | 0 | Contact us | 1 | 2016-05-18 08:10:20 | -| #2 | 5385521489953706054 | 1 | Mission | 1 | 2016-05-18 07:38:00 | -| #N | ... | ... | ... | ... | ... | +| Строка | WatchID | JavaEnable | Title | GoodEvent | EventTime | +| ------ | ----------- | ---------- | ------------------ | --------- | ------------------- | +| #0 | 89354350662 | 1 | Investor Relations | 1 | 2016-05-18 05:19:20 | +| #1 | 90329509958 | 0 | Contact us | 1 | 2016-05-18 08:10:20 | +| #2 | 89953706054 | 1 | Mission | 1 | 2016-05-18 07:38:00 | +| #N | ... | ... | ... | ... | ... | То есть, значения, относящиеся к одной строке, физически хранятся рядом. @@ -20,7 +20,7 @@ ClickHouse - столбцовая система управления базам | Строка: | #0 | #1 | #2 | #N | | ----------- | ------------------- | ------------------- | ------------------- | ------------------- | -| WatchID: | 5385521489354350662 | 5385521490329509958 | 5385521489953706054 | ... | +| WatchID: | 89354350662 | 90329509958 | 89953706054 | ... | | JavaEnable: | 1 | 0 | 1 | ... | | Title: | Investor Relations | Contact us | Mission | ... | | GoodEvent: | 1 | 1 | 1 | ... | diff --git a/website/gulpfile.js b/website/gulpfile.js index 3b7adce3146..09c617eccad 100644 --- a/website/gulpfile.js +++ b/website/gulpfile.js @@ -26,7 +26,7 @@ var paths = { docstxt: ['docs/**/*.txt', 'docs/redirects.conf'], docsjson: ['docs/**/*.json'], docsxml: ['docs/**/*.xml'], - docssitemap: ['sitemap.xml'], + docssitemap: ['sitemap.xml', 'sitemap_static.xml'], scripts: [ '**/*.js', '!gulpfile.js', diff --git a/website/robots.txt b/website/robots.txt index 54d736ca677..0b2137571cc 100644 --- a/website/robots.txt +++ b/website/robots.txt @@ -1,8 +1,10 @@ User-agent: * Disallow: /docs/en/single/ Disallow: /docs/ru/single/ +Disallow: /docs/fa/single/ Disallow: /docs/en/search.html Disallow: /docs/ru/search.html +Disallow: /docs/fa/search.html Disallow: /deprecated/reference_en.html Disallow: /deprecated/reference_ru.html Allow: / diff --git a/website/sitemap.xml b/website/sitemap.xml index 01dc5c6297e..fcdd71112eb 100644 --- a/website/sitemap.xml +++ b/website/sitemap.xml @@ -1,10 +1,13 @@ + + https://clickhouse.yandex/docs/en/sitemap.xml + https://clickhouse.yandex/docs/ru/sitemap.xml - https://clickhouse.yandex/docs/en/sitemap.xml + https://clickhouse.yandex/docs/fa/sitemap.xml https://clickhouse.yandex/docs/sitemap_static.xml