Changed username in documetation from metrika to clickhouse

Since c51801d776 default user and
group names is 'clickhouse'
This commit is contained in:
Ilya Khomutov 2017-03-01 15:24:52 +03:00 committed by proller
parent e7ee6dfd92
commit da1582a036
2 changed files with 14 additions and 14 deletions

View File

@ -1239,10 +1239,10 @@ where /opt/clickhouse/ is the path to ClickHouse data, 'database' is the
%%
$ ls -l /opt/clickhouse/data/test/visits/
total 48
drwxrwxrwx 2 metrika metrika 20480 may 13 02:58 20140317_20140323_2_2_0
drwxrwxrwx 2 metrika metrika 20480 may 13 02:58 20140317_20140323_4_4_0
drwxrwxrwx 2 metrika metrika 4096 may 13 02:55 detached
-rw-rw-rw- 1 metrika metrika 2 may 13 02:58 increment.txt
drwxrwxrwx 2 clickhouse clickhouse 20480 may 13 02:58 20140317_20140323_2_2_0
drwxrwxrwx 2 clickhouse clickhouse 20480 may 13 02:58 20140317_20140323_4_4_0
drwxrwxrwx 2 clickhouse clickhouse 4096 may 13 02:55 detached
-rw-rw-rw- 1 clickhouse clickhouse 2 may 13 02:58 increment.txt
%%
Here 20140317_20140323_2_2_0 and 20140317_20140323_4_4_0 are directories of parts.
@ -2974,7 +2974,7 @@ When the server starts (or establishes a new session with ZooKeeper), it only ch
If the local set of data differs too much from the expected one, a safety mechanism is triggered. The server enters this in the log and refuses to launch. The reason for this is that this case may indicate a configuration error, such as if a replica on a shard was accidentally configured like a replica on a different shard. However, the thresholds for this mechanism are set fairly low, and this situation might occur during normal failure recovery. In this case, data is restored semi-automatically - by "pushing a button".
To start recovery, create the node <span class="inline-example">/<i>path_to_table</i>/<i>replica_name</i>/flags/force_restore_data</span> in ZooKeeper with any content or run command to recover all replicated tables:
%%sudo -u metrika touch /opt/clickhouse/flags/force_restore_data%%
%%sudo -u clickhouse touch /opt/clickhouse/flags/force_restore_data%%
Then launch the server. On start, the server deletes these flags and starts recovery.
@ -2989,7 +2989,7 @@ If all data and metadata disappeared from one of the servers, follow these steps
3. Copy table definitions located in %%/opt/clickhouse/metadata/%% from a replica. If a shard or replica identifier is defined explicitly in the table definitions, correct it so that it corresponds to this replica. (Alternatively, launch the server and make all the ATTACH TABLE queries that should have been in the .sql files in %%/opt/clickhouse/metadata/%%.)
4. Create the <span class="inline-example">/<i>path_to_table</i>/<i>replica_name</i>/flags/force_restore_data</span> node in ZooKeeper with any content or run command to recover all replicated tables:
%%sudo -u metrika touch /opt/clickhouse/flags/force_restore_data%%
%%sudo -u clickhouse touch /opt/clickhouse/flags/force_restore_data%%
Then launch the server (restart it if it is already running). Data will be downloaded from replicas.
An alternative recovery option is to delete information about the lost replica from ZooKeeper ( <span class="inline-example">/<i>path_to_table</i>/<i>replica_name</i></span>), then create the replica again as described in &quot;Creating replicated tables&quot;.
@ -6527,7 +6527,7 @@ The dictionary config file has the following format:
&lt;mysql>
&lt;!- - These parameters can be specified outside (common for all replicas) or inside a specific replica - ->
&lt;port>3306&lt;/port>
&lt;user>metrika&lt;/user>
&lt;user>clickhouse&lt;/user>
&lt;password>qwerty&lt;/password>
&lt;!- - Specify from one to any number of replicas for fault tolerance. - ->
&lt;replica>

View File

@ -1259,10 +1259,10 @@ active - учитывать только активные куски. Неакт
%%
$ ls -l /opt/clickhouse/data/test/visits/
total 48
drwxrwxrwx 2 metrika metrika 20480 мая 13 02:58 20140317_20140323_2_2_0
drwxrwxrwx 2 metrika metrika 20480 мая 13 02:58 20140317_20140323_4_4_0
drwxrwxrwx 2 metrika metrika 4096 мая 13 02:55 detached
-rw-rw-rw- 1 metrika metrika 2 мая 13 02:58 increment.txt
drwxrwxrwx 2 clickhouse clickhouse 20480 мая 13 02:58 20140317_20140323_2_2_0
drwxrwxrwx 2 clickhouse clickhouse 20480 мая 13 02:58 20140317_20140323_4_4_0
drwxrwxrwx 2 clickhouse clickhouse 4096 мая 13 02:55 detached
-rw-rw-rw- 1 clickhouse clickhouse 2 мая 13 02:58 increment.txt
%%
Здесь 20140317_20140323_2_2_0, 20140317_20140323_4_4_0 - директории кусков.
@ -3033,7 +3033,7 @@ min_bytes, max_bytes - условие на количество байт в бу
Если обнаруживается, что локальный набор данных слишком сильно отличается от ожидаемого, то срабатывает защитный механизм - сервер сообщает об этом в лог и отказывается запускаться. Это сделано, так как такой случай может свидетельствовать об ошибке конфигурации - например, если реплика одного шарда была случайно сконфигурирована, как реплика другого шарда. Тем не менее, пороги защитного механизма поставлены довольно низкими, и такая ситуация может возникнуть и при обычном восстановлении после сбоя. В этом случае, восстановление делается полуавтоматически - "по кнопке".
Для запуска восстановления, создайте в ZooKeeper узел <span class="inline-example">/<i>path_to_table</i>/<i>replica_name</i>/flags/force_restore_data</span> с любым содержимым или выполните команду для восстановления всех реплицируемых таблиц:
%%sudo -u metrika touch /opt/clickhouse/flags/force_restore_data%%
%%sudo -u clickhouse touch /opt/clickhouse/flags/force_restore_data%%
Затем запустите сервер. При старте, сервер удалит эти флаги и запустит восстановление.
@ -3049,7 +3049,7 @@ min_bytes, max_bytes - условие на количество байт в бу
(Альтернативный вариант - запустить сервер и сделать самостоятельно все запросы ATTACH TABLE, которые должны были бы быть в соответствующих .sql файлах в %%/opt/clickhouse/metadata/%%.)
4. Создайте в ZooKeeper узел <span class="inline-example">/<i>path_to_table</i>/<i>replica_name</i>/flags/force_restore_data</span> с любым содержимым или выполните команду для восстановления всех реплицируемых таблиц:
%%sudo -u metrika touch /opt/clickhouse/flags/force_restore_data%%
%%sudo -u clickhouse touch /opt/clickhouse/flags/force_restore_data%%
Затем запустите сервер (перезапустите, если уже запущен). Данные будут скачаны с реплик.
В качестве альтернативного варианта восстановления, вы можете удалить из ZooKeeper информацию о потерянной реплике - <span class="inline-example">/<i>path_to_table</i>/<i>replica_name</i></span>, и затем создать реплику заново, как написано в разделе "Создание реплицируемых таблиц".
@ -6649,7 +6649,7 @@ regions_names_*.txt: TabSeparated (без заголовка), столбцы:
&lt;mysql&gt;
&lt;!- - Эти параметры могут быть указаны как снаружи (общие для всех реплик), так и внутри конкретной реплики - -&gt;
&lt;port&gt;3306&lt;/port&gt;
&lt;user&gt;metrika&lt;/user&gt;
&lt;user&gt;clickhouse&lt;/user&gt;
&lt;password&gt;qwerty&lt;/password&gt;
&lt;!- - Можно указать от одной до произвольного количества реплик для отказоустойчивости. - -&gt;
&lt;replica&gt;