抱歉,您的浏览器无法访问本站

本页面需要浏览器支持(启用)JavaScript


了解详情 >

配置文件注释

User.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
<?xml version="1.0"?>
<yandex>
<profiles>
<!-- 读写用户设置 -->
<default>
<max_memory_usage>10000000000</max_memory_usage>
<use_uncompressed_cache>0</use_uncompressed_cache>
<load_balancing>random</load_balancing>
</default>

<!-- 只写用户设置 -->
<readonly>
<max_memory_usage>10000000000</max_memory_usage>
<use_uncompressed_cache>0</use_uncompressed_cache>
<load_balancing>random</load_balancing>
<readonly>1</readonly>
</readonly>
</profiles>

<!-- 配额 -->
<quotas>
<!-- Name of quota. -->
<default>
<interval>
<duration>3600</duration>
<queries>0</queries>
<errors>0</errors>
<result_rows>0</result_rows>
<read_rows>0</read_rows>
<execution_time>0</execution_time>
</interval>
</default>
</quotas>

<users>
<!-- 读写用户 -->
<default>
<password_sha256_hex>967f3bf355dddfabfca1c9f5cab39352b2ec1cd0b05f9e1e6b8f629705fe7d6e</password_sha256_hex>
<networks incl="networks" replace="replace">
<ip>::/0</ip>
</networks>
<profile>default</profile>
<quota>default</quota>
</default>

<!-- 只读用户 -->
<ck>
<password_sha256_hex>967f3bf355dddfabfca1c9f5cab39352b2ec1cd0b05f9e1e6b8f629705fe7d6e</password_sha256_hex>
<networks incl="networks" replace="replace">
<ip>::/0</ip>
</networks>
<profile>readonly</profile>
<quota>default</quota>
</ck>
</users>
</yandex>


metrika.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
<yandex>
<!-- 集群配置 -->
<clickhouse_remote_servers>
<!-- 集群名称-->
<bip_ck_cluster>
<shard>
<internal_replication>false</internal_replication>
<replica>
<host>ck1.xxxx.com.cn</host>
<port>9000</port>
<user>default</user>
<password>******</password>
</replica>
<replica>
<host>ck2.xxxx.com.cn</host>
<port>9000</port>
<user>default</user>
<password>******</password>
</replica>
</shard>
<shard>
<internal_replication>false</internal_replication>
<replica>
<host>ck2.xxxx.com.cn</host>
<port>9000</port>
<user>default</user>
<password>******</password>
</replica>
<replica>
<host>ck3.xxxxa.com.cn</host>
<port>9000</port>
<user>default</user>
<password>******</password>
</replica>
</shard>
<shard>
<internal_replication>false</internal_replication>
<replica>
<host>ck3.xxxxa.com.cn</host>
<port>9000</port>
<user>default</user>
<password>******</password>
</replica>
<replica>
<host>ck1.xxxx.com.cn</host>
<port>9000</port>
<user>default</user>
<password>******</password>
</replica>
</shard>
</bip_ck_cluster>
</clickhouse_remote_servers>

<!-- 本节点副本名称(这里无用) -->
<macros>
<replica>ck1</replica>
</macros>

<!-- 监听网络(貌似重复) -->
<networks>
<ip>::/0</ip>
</networks>
<!-- ZK -->
<zookeeper-servers>
<node index="1">
<host>1.xxxx.sina.com.cn</host>
<port>2181</port>
</node>
<node index="2">
<host>2.xxxx.sina.com.cn</host>
<port>2181</port>
</node>
<node index="3">
<host>3.xxxxp.sina.com.cn</host>
<port>2181</port>
</node>
</zookeeper-servers>
<!-- 数据压缩算法 -->
<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>

config.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
<?xml version="1.0"?>
<yandex>
<!-- 日志 -->
<logger>
<level>trace</level>
<log>/data1/clickhouse/log/server.log</log>
<errorlog>/data1/clickhouse/log/error.log</errorlog>
<size>1000M</size>
<count>10</count>
</logger>

<!-- 端口 -->
<http_port>8123</http_port>
<tcp_port>9000</tcp_port>
<interserver_http_port>9009</interserver_http_port>

<!-- 本机域名 -->
<interserver_http_host>这里需要用域名,如果后续用到复制的话</interserver_http_host>

<!-- 监听IP -->
<listen_host>0.0.0.0</listen_host>
<!-- 最大连接数 -->
<max_connections>64</max_connections>

<!-- 没搞懂的参数 -->
<keep_alive_timeout>3</keep_alive_timeout>

<!-- 最大并发查询数 -->
<max_concurrent_queries>16</max_concurrent_queries>

<!-- 单位是B -->
<uncompressed_cache_size>8589934592</uncompressed_cache_size>
<mark_cache_size>10737418240</mark_cache_size>

<!-- 存储路径 -->
<path>/data1/clickhouse/</path>
<tmp_path>/data1/clickhouse/tmp/</tmp_path>

<!-- user配置 -->
<users_config>users.xml</users_config>
<default_profile>default</default_profile>

<log_queries>1</log_queries>

<default_database>default</default_database>

<remote_servers incl="clickhouse_remote_servers" />
<zookeeper incl="zookeeper-servers" optional="true" />
<macros incl="macros" optional="true" />

<!-- 没搞懂的参数 -->
<builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>

<!-- 控制大表的删除 -->
<max_table_size_to_drop>0</max_table_size_to_drop>

<include_from>/data1/clickhouse/metrika.xml</include_from>
</yandex>

评论