-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathclickhouse-cluster.xml
171 lines (165 loc) · 6.13 KB
/
clickhouse-cluster.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<yandex>
<!-- 集群配置 -->
<clickhouse_remote_servers>
<!-- 3分片3副本 -->
<cluster_3shards_3replicas>
<!-- 数据分片1 -->
<shard>
<internal_replication>true</internal_replication>
<replica>
<default_database>cluster_shard_1</default_database>
<host>172.16.154.245</host>
<port>9000</port>
<!--<user>default</user>-->
<!--<password>6lYaUiFi</password>-->
</replica>
<replica>
<default_database>cluster_shard_1</default_database>
<host>172.16.154.246</host>
<port>9000</port>
</replica>
<replica>
<default_database>cluster_shard_1</default_database>
<host>172.16.154.247</host>
<port>9000</port>
</replica>
</shard>
<!-- 数据分片2 -->
<shard>
<internal_replication>true</internal_replication>
<replica>
<default_database>cluster_shard_2</default_database>
<host>172.16.154.245</host>
<port> 9000</port>
</replica>
<replica>
<default_database>cluster_shard_2</default_database>
<host>172.16.154.246</host>
<port> 9000</port>
</replica>
<replica>
<default_database>cluster_shard_2</default_database>
<host>172.16.154.247</host>
<port>9000</port>
</replica>
</shard>
<!-- 数据分片3 -->
<shard>
<internal_replication>true</internal_replication>
<replica>
<default_database>cluster_shard_3</default_database>
<host>172.16.154.245</host>
<port>9000</port>
</replica>
<replica>
<default_database>cluster_shard_3</default_database>
<host>172.16.154.246</host>
<port>9000</port>
</replica>
<replica>
<default_database>cluster_shard_3</default_database>
<host>172.16.154.247</host>
<port>9000</port>
</replica>
</shard>
</cluster_3shards_3replicas>
<!-- 3分片2副本 -->
<cluster_3shards_2replicas>
<!-- 数据分片1 -->
<shard>
<internal_replication>true</internal_replication>
<replica>
<default_database>testcluster_shard_1</default_database>
<host>172.16.154.245</host>
<port>9000</port>
<!--<user>default</user>-->
<!--<password>6lYaUiFi</password>-->
</replica>
<replica>
<default_database>testcluster_shard_1</default_database>
<host>172.16.154.246</host>
<port>9000</port>
</replica>
</shard>
<!-- 数据分片2 -->
<shard>
<internal_replication>true</internal_replication>
<replica>
<default_database>testcluster_shard_2</default_database>
<host>172.16.154.246</host>
<port> 9000</port>
</replica>
<replica>
<default_database>testcluster_shard_2</default_database>
<host>172.16.154.247</host>
<port>9000</port>
</replica>
</shard>
<!-- 数据分片3 -->
<shard>
<internal_replication>true</internal_replication>
<replica>
<default_database>testcluster_shard_3</default_database>
<host>172.16.154.247</host>
<port>9000</port>
</replica>
<replica>
<default_database>testcluster_shard_3</default_database>
<host>172.16.154.245</host>
<port>9000</port>
</replica>
</shard>
</cluster_3shards_2replicas>
<!-- 1分片3副本:使用表副本-->
<cluster_1shards_3replicas>
<shard>
<internal_replication>true</internal_replication>
<replica>
<host>172.16.154.245</host>
<port>9000</port>
</replica>
<replica>
<host>172.16.154.246</host>
<port>9000</port>
</replica>
<replica>
<host>172.16.154.247</host>
<port>9000</port>
</replica>
</shard>
</cluster_1shards_3replicas>
</clickhouse_remote_servers>
<!-- ZK -->
<zookeeper-servers>
<node index="1">
<host>172.16.154.245</host>
<port>2181</port>
</node>
<node index="2">
<host>172.16.154.246</host>
<port>2181</port>
</node>
<node index="3">
<host>172.16.154.247</host>
<port>2181</port>
</node>
</zookeeper-servers>
<!-- 监听网络(貌似重复) -->
<networks>
<ip>::/0</ip>
</networks>
<!-- 本节点副本名称(这里无用) -->
<!--<macros>-->
<!--<cluster>cluster_3shards_2replicas</cluster>-->
<!--<replica>172.16.154.245</replica>-->
<!--<shard>100</shard>-->
<!--</macros>-->
<!-- 数据压缩算法 热数据lZ4 优与 zstd -->
<clickhouse_compression>
<case>
<min_part_size>10000000000</min_part_size>
<min_part_size_ratio>0.01</min_part_size_ratio>
<method>lz4</method>
</case>
</clickhouse_compression>
</yandex>