Merge pull request #2017 from filimonov/master

Some documentation fixes (fix broken links, tiny changes in KILL query description)
This commit is contained in:
alexey-milovidov 2018-03-11 05:23:24 +03:00 committed by GitHub
commit b30f97e0e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 67 additions and 71 deletions

View File

@ -19,7 +19,7 @@
<tcp_ssl_port>9440</tcp_ssl_port>
-->
<!-- Used with https_port and tcp_ssl_port. Full ssl options list: https://github.com/yandex/ClickHouse/blob/master/contrib/libpoco/NetSSL_OpenSSL/include/Poco/Net/SSLManager.h#L71 -->
<!-- Used with https_port and tcp_ssl_port. Full ssl options list: https://github.com/ClickHouse-Extras/poco/blob/master/NetSSL_OpenSSL/include/Poco/Net/SSLManager.h#L71 -->
<openSSL>
<server> <!-- Used for https server AND secure tcp port -->
<!-- openssl req -subj "/CN=localhost" -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout /etc/clickhouse-server/server.key -out /etc/clickhouse-server/server.crt -->
@ -138,7 +138,7 @@
<!-- <umask>022</umask> -->
<!-- Configuration of clusters that could be used in Distributed tables.
https://clickhouse.yandex/reference_en.html#Distributed
https://clickhouse.yandex/docs/en/table_engines/distributed/
-->
<remote_servers incl="clickhouse_remote_servers" >
<!-- Test only shard config for testing distributed storage -->
@ -161,14 +161,14 @@
<!-- ZooKeeper is used to store metadata about replicas, when using Replicated tables.
Optional. If you don't use replicated tables, you could omit that.
See https://clickhouse.yandex/reference_en.html#Data%20replication
See https://clickhouse.yandex/docs/en/table_engines/replication/
-->
<zookeeper incl="zookeeper-servers" optional="true" />
<!-- Substitutions for parameters of replicated tables.
Optional. If you don't use replicated tables, you could omit that.
See https://clickhouse.yandex/reference_en.html#Creating%20replicated%20tables
See https://clickhouse.yandex/docs/en/table_engines/replication/#creating-replicated-tables
-->
<macros incl="macros" optional="true" />
@ -227,9 +227,9 @@
-->
<database>system</database>
<table>query_log</table>
<!--
PARTITION BY expr https://clickhouse.yandex/docs/en/table_engines/custom_partitioning_key.html
Example:
<!--
PARTITION BY expr https://clickhouse.yandex/docs/en/table_engines/custom_partitioning_key/
Example:
event_date
toMonday(event_date)
toYYYYMM(event_date)
@ -252,7 +252,7 @@
<!-- Parameters for embedded dictionaries, used in Yandex.Metrica.
See https://clickhouse.yandex/reference_en.html#Internal%20dictionaries
See https://clickhouse.yandex/docs/en/dicts/internal_dicts/
-->
<!-- Path to file with region hierarchy. -->
@ -263,7 +263,7 @@
<!-- Configuration of external dictionaries. See:
https://clickhouse.yandex/reference_en.html#External%20Dictionaries
https://clickhouse.yandex/docs/en/dicts/external_dicts/
-->
<dictionaries_config>*_dictionary.xml</dictionaries_config>

View File

@ -20,13 +20,13 @@ $ docker run -d --name some-clickhouse-server --ulimit nofile=262144:262144 yand
$ docker run -it --rm --link some-clickhouse-server:clickhouse-server yandex/clickhouse-client --host clickhouse-server
```
More information about [ClickHouse client](https://clickhouse.yandex/reference_en.html#Command-line%20client).
More information about [ClickHouse client](https://clickhouse.yandex/docs/en/interfaces/cli/).
## Configuration
Container exposes 8123 port for [HTTP interface](https://clickhouse.yandex/reference_en.html#HTTP%20interface) and 9000 port for [native client](https://clickhouse.yandex/reference_en.html#Native%20interface%20(TCP)).
Container exposes 8123 port for [HTTP interface](https://clickhouse.yandex/docs/en/interfaces/http_interface/) and 9000 port for [native client](https://clickhouse.yandex/docs/en/interfaces/tcp/).
ClickHouse configuration represented with a file "config.xml" ([documentation](https://clickhouse.yandex/reference_en.html#Configuration%20files))
ClickHouse configuration represented with a file "config.xml" ([documentation](https://clickhouse.yandex/docs/en/operations/configuration_files/))
### start server instance with custom configuration
```bash

View File

@ -27,8 +27,7 @@ The dictionary configuration has the following structure:
```
- name The identifier that can be used to access the dictionary. Use the characters `[a-zA-Z0-9_\-]`.
- [source](external_dicts_dict_sources.html/#dicts-external_dicts_dict_sources) Source of the dictionary.
- [source](external_dicts_dict_sources.md#dicts-external_dicts_dict_sources) Source of the dictionary.
- [layout](external_dicts_dict_layout.md#dicts-external_dicts_dict_layout) Location of the dictionary in memory.
- [structure](external_dicts_dict_structure.md#dicts-external_dicts_dict_structure) Structure of the dictionary. A key and attributes that can be retrieved by this key.
- [lifetime](external_dicts_dict_lifetime.md#dicts-external_dicts_dict_lifetime) How frequently to update dictionaries.

View File

@ -27,7 +27,7 @@ The configuration looks like this:
<dictionary>
...
<layout>
<layout_type>
<layout_type>
<!-- layout settings -->
</layout_type>
</layout>
@ -87,7 +87,7 @@ Configuration example:
### complex_key_hashed
This type of storage is designed for use with compound [keys](external_dicts_dict_structure.md/#dicts-external_dicts_dict_structure). It is similar to hashed.
This type of storage is designed for use with compound [keys](external_dicts_dict_structure.md#dicts-external_dicts_dict_structure). It is similar to hashed.
Configuration example:
@ -195,7 +195,7 @@ Example of settings:
```xml
<layout>
<cache>
<!-- The size of the cache, in number of cells. Rounded up to a power of two. -->
<!-- The size of the cache, in number of cells. Rounded up to a power of two. -->
<size_in_cells>1000000000</size_in_cells>
</cache>
</layout>
@ -219,4 +219,3 @@ Do not use ClickHouse as a source, because it is slow to process queries with ra
### complex_key_cache
This type of storage is designed for use with compound [keys](external_dicts_dict_structure.md#dicts-external_dicts_dict_structure). Similar to `cache`.

View File

@ -439,14 +439,14 @@ For more information, see the MergeTreeSettings.h header file.
SSL client/server configuration.
Support for SSL is provided by the `` libpoco`` library. The description of the interface is in the [ SSLManager.h file.](https://github.com/yandex/ClickHouse/blob/master/contrib/libpoco/NetSSL_OpenSSL/include/Poco/Net/SSLManager.h)
Support for SSL is provided by the `` libpoco`` library. The description of the interface is in the [ SSLManager.h file.](https://github.com/ClickHouse-Extras/poco/blob/master/NetSSL_OpenSSL/include/Poco/Net/SSLManager.h)
Keys for server/client settings:
- privateKeyFile The path to the file with the secret key of the PEM certificate. The file may contain a key and certificate at the same time.
- certificateFile The path to the client/server certificate file in PEM format. You can omit it if `` privateKeyFile`` contains the certificate.
- caConfig The path to the file or directory that contains trusted root certificates.
- verificationMode The method for checking the node's certificates. Details are in the description of the [Context](https://github.com/yandex/ClickHouse/blob/master/contrib/libpoco/NetSSL_OpenSSL/include/Poco/Net/Context.h) class. Acceptable values: ``none``, ``relaxed``, ``strict``, ``once``.
- verificationMode The method for checking the node's certificates. Details are in the description of the [Context](https://github.com/ClickHouse-Extras/poco/blob/master/NetSSL_OpenSSL/include/Poco/Net/Context.h) class. Acceptable values: ``none``, ``relaxed``, ``strict``, ``once``.
- verificationDepth The maximum length of the verification chain. Verification will fail if the certificate chain length exceeds the set value.
- loadDefaultCAFile Indicates that built-in CA certificates for OpenSSL will be used. Acceptable values: `` true``, `` false``. |
- cipherList - Supported OpenSSL-ciphers. For example: `` ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH``.
@ -690,4 +690,3 @@ For more information, see the section "[Replication](../../table_engines/replica
```xml
<zookeeper incl="zookeeper-servers" optional="true" />
```

View File

@ -1479,34 +1479,34 @@ In all other cases, we don't recommend using the asterisk, since it only gives y
## KILL QUERY
```sql
KILL QUERY WHERE <where expression to SELECT FROM system.processes query> [SYNC|ASYNC|TEST] [FORMAT format]
KILL QUERY
WHERE <where expression to SELECT FROM system.processes query>
[SYNC|ASYNC|TEST]
[FORMAT format]
```
Attempts to terminate queries currently running.
The queries to terminate are selected from the system.processes table for which expression_for_system.processes is true.
The queries to terminate are selected from the system.processes table for which `WHERE` expression is true.
Examples:
```sql
-- Terminates all queries with the specified query_id.
KILL QUERY WHERE query_id='2-857d-4a57-9ee0-327da5d60a90'
```
Terminates all queries with the specified query_id.
```sql
-- Synchronously terminates all queries run by `username`.
KILL QUERY WHERE user='username' SYNC
```
Synchronously terminates all queries run by `username`.
Readonly-users can only terminate their own requests.
By default, the asynchronous version of queries is used (`ASYNC`), which terminates without waiting for queries to complete.
The synchronous version (`SYNC`) waits for all queries to be completed and displays information about each process as it terminates.
By default, the asynchronous version of queries is used (`ASYNC`), which doesn't wait for query termination.
The synchronous version (`SYNC`) waits for all queries to be killed and displays information about each process as it terminates.
The response contains the `kill_status` column, which can take the following values:
1. 'finished' The query completed successfully.
1. 'finished' The query terminated successfully.
2. 'waiting' Waiting for the query to finish after sending it a signal to terminate.
3. The other values explain why the query can't be terminated.
A test query (`TEST`) only checks the user's rights and displays a list of queries to terminate.

View File

@ -27,8 +27,7 @@
```
- name - Идентификатор, под которым словарь будет доступен для использования. Используйте символы `[a-zA-Z0-9_\-]`.
- [source](external_dicts_dict_sources.html/#dicts-external_dicts_dict_sources) - Источник словаря.
- [source](external_dicts_dict_sources.md#dicts-external_dicts_dict_sources) - Источник словаря.
- [layout](external_dicts_dict_layout.md#dicts-external_dicts_dict_layout) - Размещение словаря в памяти.
- [structure](external_dicts_dict_structure.md#dicts-external_dicts_dict_structure) - Структура словаря. Ключ и атрибуты, которые можно получить по ключу.
- [lifetime](external_dicts_dict_lifetime.md#dicts-external_dicts_dict_lifetime) - Периодичность обновления словарей.

View File

@ -27,7 +27,7 @@
<dictionary>
...
<layout>
<layout_type>
<layout_type>
<!-- layout settings -->
</layout_type>
</layout>
@ -87,7 +87,7 @@
### complex_key_hashed
Тип размещения предназначен для использования с составными [ключами](external_dicts_dict_structure.md/#dicts-external_dicts_dict_structure). Аналогичен `hashed`.
Тип размещения предназначен для использования с составными [ключами](external_dicts_dict_structure.md#dicts-external_dicts_dict_structure). Аналогичен `hashed`.
Пример конфигурации:

View File

@ -441,14 +441,14 @@ ClickHouse проверит условия `min_part_size` и `min_part_size_rat
Настройки клиента/сервера SSL.
Поддержку SSL обеспечивает библиотека ``libpoco``. Описание интерфейса находится в файле [SSLManager.h](https://github.com/yandex/ClickHouse/blob/master/contrib/libpoco/NetSSL_OpenSSL/include/Poco/Net/SSLManager.h)
Поддержку SSL обеспечивает библиотека ``libpoco``. Описание интерфейса находится в файле [SSLManager.h](https://github.com/ClickHouse-Extras/poco/blob/master/NetSSL_OpenSSL/include/Poco/Net/SSLManager.h)
Ключи настроек сервера/клиента:
- privateKeyFile - Путь к файлу с секретным ключем сертификата в формате PEM. Файл может содержать ключ и сертификат одновременно.
- certificateFile - Путь к файлу сертификата клиента/сервера в формате PEM. Можно не указывать, если ``privateKeyFile`` содержит сертификат.
- caConfig - Путь к файлу или каталогу, которые содержат доверенные корневые сертификаты.
- verificationMode - Способ проверки сертификатов узла. Подробности находятся в описании класса [Context](https://github.com/yandex/ClickHouse/blob/master/contrib/libpoco/NetSSL_OpenSSL/include/Poco/Net/Context.h). Допустимые значения: ``none``, ``relaxed``, ``strict``, ``once``.
- verificationMode - Способ проверки сертификатов узла. Подробности находятся в описании класса [Context](https://github.com/ClickHouse-Extras/poco/blob/master/NetSSL_OpenSSL/include/Poco/Net/Context.h). Допустимые значения: ``none``, ``relaxed``, ``strict``, ``once``.
- verificationDepth - Максимальная длина верификационой цепи. Верификация завершится ошибкой, если длина цепи сертификатов превысит установленное значение.
- loadDefaultCAFile - Признак того, что будут использоваться встроенные CA-сертификаты для OpenSSL. Допустимые значения: ``true``, ``false``. |
- cipherList - Поддерживаемые OpenSSL-шифры. Например, ``ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH``.

View File

@ -1472,33 +1472,33 @@ SELECT uniq(UserID) FROM local_table WHERE CounterID = 101500 AND UserID GLOBAL
## KILL QUERY
```sql
KILL QUERY WHERE <where expression to SELECT FROM system.processes query> [SYNC|ASYNC|TEST] [FORMAT format]
KILL QUERY
WHERE <where expression to SELECT FROM system.processes query>
[SYNC|ASYNC|TEST]
[FORMAT format]
```
Пытается завершить исполняющиеся в данный момент запросы.
Запросы для завершения выбираются из таблицы system.processes для которых выражение expression_for_system.processes истинно.
Пытается принудительно остановить исполняющиеся в данный момент запросы.
Запросы для принудительной остановки выбираются из таблицы system.processes с помощью условия, указанного в секции `WHERE` запроса `KILL`.
Примеры:
```sql
-- Принудительно останавливает все запросы с указанным query_id:
KILL QUERY WHERE query_id='2-857d-4a57-9ee0-327da5d60a90'
```
Завершает все запросы с указанным query_id.
```sql
-- Синхронно останавливает все запросы пользователя 'username':
KILL QUERY WHERE user='username' SYNC
```
Синхронно завершает все запросы пользователя `username`.
Readonly-пользователи могут останавливать только свои запросы.
Readonly-пользователи могут совершать только свои запросы.
По-умолчанию используется асинхронный вариант запроса (`ASYNC`), который завершается не ожидая завершения запросов.
Синхронный вариант (`SYNC`) ожидает завершения всех запросов и построчно выводит информацию о процессах по ходу их завершения.
По-умолчанию используется асинхронный вариант запроса (`ASYNC`), который не дожидается подтверждения остановки запросов.
Синхронный вариант (`SYNC`) ожидает остановки всех запросов и построчно выводит информацию о процессах по ходу их остановки.
Ответ содержит колонку `kill_status`, которая может принимать следующие значения:
1. 'finished' - запрос успешно завершился;
2. 'waiting' - запросу отправлен сигнал завершения, ожидается его завершение;
3. остальные значения описывают причину невозможности завершения запроса.
1. 'finished' - запрос был успешно остановлен;
2. 'waiting' - запросу отправлен сигнал завершения, ожидается его остановка;
3. остальные значения описывают причину невозможности остановки запроса.
Тестовый вариант запроса (`TEST`) только проверяет права пользователя и выводит список запросов для завершения.
Тестовый вариант запроса (`TEST`) только проверяет права пользователя и выводит список запросов для остановки.

View File

@ -38,27 +38,27 @@
It's hard to call this sample a Big Data (contains 166 millions rows, 63 Gb of uncompressed data) but this
allows us to quickly get to work. Dataset is available for download <a href="https://yadi.sk/d/pOZxpa42sDdgm">here</a>.
Also you may download it from the original datasource <a
href="docs/en/getting_started/example_datasets/ontime.html"
href="docs/en/getting_started/example_datasets/ontime/"
rel="external nofollow">as described here</a>.</p>
<p>Firstly we will deploy ClickHouse to a single server. Below that we will also review the process of deployment to
a cluster with support for sharding and replication.</p>
<p>On Ubuntu and Debian Linux ClickHouse can be installed from <a href="/#quick-start">packages</a>.
For other Linux distributions you can <a href="docs/en/development/build.html"
For other Linux distributions you can <a href="docs/en/development/build/"
rel="external nofollow">compile
ClickHouse from sources</a> and then install.</p>
<p><b>clickhouse-client</b> package contains <a
href="docs/en/interfaces/cli.html">clickhouse-client</a> application —
href="docs/en/interfaces/cli/">clickhouse-client</a> application —
interactive ClickHouse client. <b>clickhouse-server-base</b> contains a clickhouse-server binary file. <b>clickhouse-server-common</b>
— contains config files for the clickhouse-server.</p>
<p>Server config files are located in /etc/clickhouse-server/. Before getting to work please notice the <b>path</b>
element in config. <b>Path</b>&nbsp;determines the location for data storage. It's not really handy to directly
edit <b>config.xml</b> file considering package updates. Recommended way is to override the config elements in
<a href="docs/en/configuration_files.html">files of config.d directory</a>.
Also you may want to <a href="docs/en/access_rights.html">set up access
<a href="docs/en/operations/configuration_files/">files of config.d directory</a>.
Also you may want to <a href="docs/en/operations/access_rights/">set up access
rights</a> at the start.</p>
<p><b>clickhouse-server</b> won't be launched automatically after package installation. It won't be automatically
@ -220,7 +220,7 @@ ENGINE = MergeTree(FlightDate, (Year, FlightDate), 8192);
</div>
</div>
<p>Now we have a table of <a href="docs/en/table_engines/mergetree.html">MergeTree type</a>.
<p>Now we have a table of <a href="docs/en/table_engines/mergetree/">MergeTree type</a>.
MergeTree table type is recommended for usage in production. Table of this kind has a primary key used for
incremental sort of table data. This allows fast execution of queries in ranges of a primary key.</p>
@ -236,15 +236,15 @@ ENGINE = MergeTree(FlightDate, (Year, FlightDate), 8192);
<h3>Load data</h3>
<pre>xz -v -c -d &lt; ontime.csv.xz | clickhouse-client --query="INSERT INTO ontime FORMAT CSV"</pre>
<p>ClickHouse INSERT query allows to load data in any <a href="docs/en/formats/index.html">supported
<p>ClickHouse INSERT query allows to load data in any <a href="docs/en/formats/">supported
format</a>. Data load requires just O(1) RAM consumption. INSERT query can receive any data volume as input.
It's strongly recommended to insert data with <a
href="docs/en/introduction/performance.html#performance-on-data-insertion">not too small
href="docs/en/introduction/performance/#performance-when-inserting-data">not too small
size blocks</a>. Notice that insert of blocks with size up to max_insert_block_size (= 1&nbsp;048&nbsp;576
rows by default) is an atomic operation: data block will be inserted completely or not inserted at all. In case
of disconnect during insert operation you may not know if the block was inserted successfully. To achieve
exactly-once semantics ClickHouse supports idempotency for <a
href="docs/en/table_engines/replication.html">replicated tables</a>. This means
href="docs/en/table_engines/replication/">replicated tables</a>. This means
that you may retry insert of the same data block (possibly on a different replicas) but this block will be
inserted just once. Anyway in this guide we will load data from our localhost so we may not take care about data
blocks generation and exactly-once semantics.</p>
@ -255,7 +255,7 @@ ENGINE = MergeTree(FlightDate, (Year, FlightDate), 8192);
<p>Our sample dataset is a bit not optimal. There are two reasons.</p>
<p>The first is that String data type is used in cases when <a
href="docs/en/data_types/enum.html">Enum</a> or numeric type would fit best.</p>
href="docs/en/data_types/enum/">Enum</a> or numeric type would fit best.</p>
<p class="tip"><b></b> When set of possible values is determined and known to be small. (E.g. OS name, browser
vendors etc.) it's&nbsp;recommended to use Enums or numbers to improve performance.
@ -266,7 +266,7 @@ ENGINE = MergeTree(FlightDate, (Year, FlightDate), 8192);
which DateTime handling functions may be not efficient.</p>
<p class="tip"><b></b> ClickHouse <a
href="docs/en/functions/date_time_functions.html">functions
href="docs/en/functions/date_time_functions/">functions
for operating with DateTime fields</a> are well-optimized so such redundancy is not required. Anyway much
columns is not a reason to worry — ClickHouse is a <a href="https://en.wikipedia.org/wiki/Column-oriented_DBMS"
rel="external nofollow">column-oriented
@ -433,11 +433,11 @@ LIMIT 20
<li>Install ClickHouse server on all machines of the cluster</li>
<li>Set up cluster configs in configuration file</li>
<li>Create local tables on each instance</li>
<li>Create a <a href="docs/en/table_engines/distributed.html">Distributed table</a></li>
<li>Create a <a href="docs/en/table_engines/distributed/">Distributed table</a></li>
</ol>
</p>
<p><a href="docs/en/table_engines/distributed.html">Distributed-table</a> is actually a kind of
<p><a href="docs/en/table_engines/distributed/">Distributed-table</a> is actually a kind of
"view" to local tables of ClickHouse cluster. SELECT query from a distributed table will be executed using
resources of all cluster's shards. You may specify configs for multiple clusters and create multiple
Distributed-tables providing views to different clusters.</p>
@ -479,9 +479,9 @@ LIMIT 20
<p>You can create a Distributed table on all machines in the cluster. This would allow to run distributed queries on
any machine of the cluster. Besides distributed table you can also use <a
href="docs/en/table_functions/remote.html">*remote* table function</a>.</p>
href="docs/en/table_functions/remote/">*remote* table function</a>.</p>
<p>Let's run <a href="docs/en/query_language/queries.html#insert">INSERT SELECT</a> into Distributed table
<p>Let's run <a href="docs/en/query_language/queries/#insert">INSERT SELECT</a> into Distributed table
to spread the table to multiple servers.</p>
<pre>INSERT INTO ontime_all SELECT * FROM ontime;</pre>
@ -581,7 +581,7 @@ ENGINE = ReplicatedMergeTree(
(Year, FlightDate),
8192);
</pre>
<p>Here we use <a href="docs/en/table_engines/replication.html#replicatedmergetree">ReplicatedMergeTree</a>
<p>Here we use <a href="docs/en/table_engines/replication/#replicatedmergetree">ReplicatedMergeTree</a>
table type. In parameters we specify ZooKeeper path containing shard and replica identifiers.</p>
<pre>INSERT INTO ontime_replica SELECT * FROM ontime;</pre>