Skip to content

Commit 82ac9ba

Browse files
committed
Changes to Keeper article
1 parent ddf2092 commit 82ac9ba

1 file changed

Lines changed: 26 additions & 14 deletions

File tree

content/en/altinity-kb-setup-and-maintenance/altinity-kb-zookeeper/clickhouse-keeper.md

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ ClickHouse Keeper can also run in embedded mode, operating as a separate thread
3737
- A mixed ZooKeeper / ClickHouse Keeper quorum is not supported. Those are different consensus protocols.
3838
- ZooKeeper snapshots and transaction logs are not format-compatible with Keeper. For data migration use `clickhouse-keeper-converter`.
3939
- If the above is too complex you can switch to new, empty Keeper ensemble and recreate the Keeper metadata using `SYSTEM RESTORE REPLICA` calls. This method takes longer time but it is suitable for smaller clusters. Check [procedure to restore multiple tables in RO mode article](https://kb.altinity.com/altinity-kb-setup-and-maintenance/altinity-kb-check-replication-ddl-queue/#procedure-to-restore-multiple-tables-in-read-only-mode-per-replica)
40-
- It is usually reasonable to migrate Keeper together with a ClickHouse upgrade, especially if your current deployment is still on older `23.x` builds.
40+
- Keep in mind that some metadata is available in ZooKeeper only and will be lost if you don't migrate with clickhouse-keeper-converter using above guide. For example: Distributed DDL queue, RBAC data (if configured), etc. Check [Keeper depended features](https://kb.altinity.com/altinity-kb-setup-and-maintenance/keeper-dependent-features) for more information.
4141

4242
### Upgrade caveat for `async_replication`
4343

@@ -84,7 +84,7 @@ On `hostname1` and `hostname2` below, ClickHouse can use the embedded Keeper clu
8484
$ cat /etc/clickhouse-server/config.d/keeper.xml
8585

8686
<?xml version="1.0" ?>
87-
<yandex>
87+
<clickhouse>
8888
<keeper_server>
8989
<tcp_port>2181</tcp_port>
9090
<server_id>1</server_id>
@@ -120,18 +120,18 @@ $ cat /etc/clickhouse-server/config.d/keeper.xml
120120
<distributed_ddl>
121121
<path>/clickhouse/testcluster/task_queue/ddl</path>
122122
</distributed_ddl>
123-
</yandex>
123+
</clickhouse>
124124

125125
$ cat /etc/clickhouse-server/config.d/macros.xml
126126

127127
<?xml version="1.0" ?>
128-
<yandex>
128+
<clickhouse>
129129
<macros>
130130
<cluster>testcluster</cluster>
131131
<replica>replica1</replica>
132132
<shard>1</shard>
133133
</macros>
134-
</yandex>
134+
</clickhouse>
135135
```
136136

137137
### hostname2
@@ -140,7 +140,7 @@ $ cat /etc/clickhouse-server/config.d/macros.xml
140140
$ cat /etc/clickhouse-server/config.d/keeper.xml
141141

142142
<?xml version="1.0" ?>
143-
<yandex>
143+
<clickhouse>
144144
<keeper_server>
145145
<tcp_port>2181</tcp_port>
146146
<server_id>2</server_id>
@@ -176,18 +176,18 @@ $ cat /etc/clickhouse-server/config.d/keeper.xml
176176
<distributed_ddl>
177177
<path>/clickhouse/testcluster/task_queue/ddl</path>
178178
</distributed_ddl>
179-
</yandex>
179+
</clickhouse>
180180

181181
$ cat /etc/clickhouse-server/config.d/macros.xml
182182

183183
<?xml version="1.0" ?>
184-
<yandex>
184+
<clickhouse>
185185
<macros>
186186
<cluster>testcluster</cluster>
187187
<replica>replica2</replica>
188188
<shard>1</shard>
189189
</macros>
190-
</yandex>
190+
</clickhouse>
191191
```
192192

193193
### hostname3
@@ -239,7 +239,7 @@ $ clickhouse-keeper --config /etc/clickhouse-keeper/keeper_config.xml
239239
$ cat /etc/clickhouse-server/config.d/clusters.xml
240240

241241
<?xml version="1.0" ?>
242-
<yandex>
242+
<clickhouse>
243243
<remote_servers>
244244
<testcluster>
245245
<shard>
@@ -254,7 +254,7 @@ $ cat /etc/clickhouse-server/config.d/clusters.xml
254254
</shard>
255255
</testcluster>
256256
</remote_servers>
257-
</yandex>
257+
</clickhouse>
258258
```
259259

260260
Then create a table
@@ -276,11 +276,23 @@ select count() from test;
276276
https://clickhouse.com/docs/en/guides/sre/keeper/clickhouse-keeper/
277277
- `clickhouse-keeper-client`:
278278
https://clickhouse.com/docs/en/operations/utilities/clickhouse-keeper-client
279-
- Keeper HTTP API and dashboard (26.1+):
279+
- Keeper HTTP API and dashboard (`26.1+`):
280280
https://clickhouse.com/docs/operations/utilities/clickhouse-keeper-http-api
281+
- `system.zookeeper`:
282+
https://clickhouse.com/docs/operations/system-tables/zookeeper
281283
- `system.zookeeper_connection`:
282-
https://clickhouse.com/docs/en/operations/system-tables/zookeeper_connection
284+
https://clickhouse.com/docs/operations/system-tables/zookeeper_connection
283285
- `system.zookeeper_connection_log`:
284-
https://clickhouse.com/docs/en/operations/system-tables/zookeeper_connection_log
286+
https://clickhouse.com/docs/operations/system-tables/zookeeper_connection_log
287+
- `system.zookeeper_info` (`26.1+`):
288+
https://clickhouse.com/docs/operations/system-tables/zookeeper_info
289+
- `system.zookeeper_log`:
290+
https://clickhouse.com/docs/operations/system-tables/zookeeper_log
291+
- `aggregated_zookeeper_log` upstream PR:
292+
resubmit https://github.com/ClickHouse/ClickHouse/pull/87208
285293
- Altinity operator CHK examples:
286294
https://github.com/Altinity/clickhouse-operator/tree/master/docs/chk-examples
295+
- Altinity operator Keeper dashboard JSON:
296+
https://github.com/Altinity/clickhouse-operator/blob/master/grafana-dashboard/ClickHouseKeeper_dashboard.json
297+
- Altinity operator Keeper alert rules:
298+
https://github.com/Altinity/clickhouse-operator/blob/master/deploy/prometheus/prometheus-alert-rules-chkeeper.yaml

0 commit comments

Comments
 (0)