mirror of
https://github.com/outbackdingo/clickhouse-cluster-example.git
synced 2026-08-25 14:53:17 +00:00
Update config
This commit is contained in:
+165
-27
@@ -1,32 +1,43 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
NOTE: User and query level settings are set up in "users.xml" file.
|
||||||
|
-->
|
||||||
<yandex>
|
<yandex>
|
||||||
<logger>
|
<logger>
|
||||||
|
<!-- Possible levels: https://github.com/pocoproject/poco/blob/develop/Foundation/include/Poco/Logger.h#L105 -->
|
||||||
<level>trace</level>
|
<level>trace</level>
|
||||||
<log>/var/log/clickhouse-server/clickhouse-server.log</log>
|
<log>/var/log/clickhouse-server/clickhouse-server.log</log>
|
||||||
<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>
|
<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>
|
||||||
<size>1000M</size>
|
<size>1000M</size>
|
||||||
<count>10</count>
|
<count>10</count>
|
||||||
|
<!-- <console>1</console> --> <!-- Default behavior is autodetection (log to console if not daemon mode and is tty) -->
|
||||||
</logger>
|
</logger>
|
||||||
|
<!--display_name>production</display_name--> <!-- It is the name that will be shown in the client -->
|
||||||
<http_port>8123</http_port>
|
<http_port>8123</http_port>
|
||||||
|
<tcp_port>9000</tcp_port>
|
||||||
|
|
||||||
|
<!-- For HTTPS and SSL over native protocol. -->
|
||||||
<!--
|
<!--
|
||||||
<https_port>8443</https_port>
|
<https_port>8443</https_port>
|
||||||
|
<tcp_port_secure>9440</tcp_port_secure>
|
||||||
-->
|
-->
|
||||||
<!-- Used only with https_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_port_secure. Full ssl options list: https://github.com/ClickHouse-Extras/poco/blob/master/NetSSL_OpenSSL/include/Poco/Net/SSLManager.h#L71 -->
|
||||||
<openSSL>
|
<openSSL>
|
||||||
<server>
|
<server> <!-- Used for https server AND secure tcp port -->
|
||||||
<!-- openssl req -subj "/CN=localhost" -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout server.key -out server.crt -->
|
<!-- 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 -->
|
||||||
<certificateFile>server.crt</certificateFile>
|
<certificateFile>/etc/clickhouse-server/server.crt</certificateFile>
|
||||||
<privateKeyFile>server.key</privateKeyFile>
|
<privateKeyFile>/etc/clickhouse-server/server.key</privateKeyFile>
|
||||||
<!-- openssl dhparam -out dhparam.pem 4096 -->
|
<!-- openssl dhparam -out /etc/clickhouse-server/dhparam.pem 4096 -->
|
||||||
<dhParamsFile>dhparam.pem</dhParamsFile>
|
<dhParamsFile>/etc/clickhouse-server/dhparam.pem</dhParamsFile>
|
||||||
|
<verificationMode>none</verificationMode>
|
||||||
<loadDefaultCAFile>true</loadDefaultCAFile>
|
<loadDefaultCAFile>true</loadDefaultCAFile>
|
||||||
<cacheSessions>true</cacheSessions>
|
<cacheSessions>true</cacheSessions>
|
||||||
<disableProtocols>sslv2,sslv3</disableProtocols>
|
<disableProtocols>sslv2,sslv3</disableProtocols>
|
||||||
<preferServerCiphers>true</preferServerCiphers>
|
<preferServerCiphers>true</preferServerCiphers>
|
||||||
</server>
|
</server>
|
||||||
<client>
|
|
||||||
|
<client> <!-- Used for connecting to https dictionary source -->
|
||||||
<loadDefaultCAFile>true</loadDefaultCAFile>
|
<loadDefaultCAFile>true</loadDefaultCAFile>
|
||||||
<cacheSessions>true</cacheSessions>
|
<cacheSessions>true</cacheSessions>
|
||||||
<disableProtocols>sslv2,sslv3</disableProtocols>
|
<disableProtocols>sslv2,sslv3</disableProtocols>
|
||||||
@@ -44,10 +55,8 @@
|
|||||||
<http_server_default_response><![CDATA[<html ng-app="SMI2"><head><base href="http://ui.tabix.io/"></head><body><div ui-view="" class="content-ui"></div><script src="http://loader.tabix.io/master.js"></script></body></html>]]></http_server_default_response>
|
<http_server_default_response><![CDATA[<html ng-app="SMI2"><head><base href="http://ui.tabix.io/"></head><body><div ui-view="" class="content-ui"></div><script src="http://loader.tabix.io/master.js"></script></body></html>]]></http_server_default_response>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<tcp_port>9000</tcp_port>
|
|
||||||
|
|
||||||
<!-- Port for communication between replicas. Used for data exchange. -->
|
<!-- Port for communication between replicas. Used for data exchange. -->
|
||||||
<interserver_http_port>9010</interserver_http_port>
|
<interserver_http_port>9009</interserver_http_port>
|
||||||
|
|
||||||
<!-- Hostname that is used by other replicas to request this server.
|
<!-- Hostname that is used by other replicas to request this server.
|
||||||
If not specified, than it is determined analoguous to 'hostname -f' command.
|
If not specified, than it is determined analoguous to 'hostname -f' command.
|
||||||
@@ -58,9 +67,22 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
|
<!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
|
||||||
<listen_host>::</listen_host>
|
<!-- <listen_host>::</listen_host> -->
|
||||||
<!--<listen_host>::</listen_host>-->
|
<!-- Same for hosts with disabled ipv6: -->
|
||||||
|
<!-- <listen_host>0.0.0.0</listen_host> -->
|
||||||
|
|
||||||
|
<!-- Default values - try listen localhost on ipv4 and ipv6: -->
|
||||||
|
<!--
|
||||||
|
<listen_host>::1</listen_host>
|
||||||
<listen_host>127.0.0.1</listen_host>
|
<listen_host>127.0.0.1</listen_host>
|
||||||
|
-->
|
||||||
|
<!-- Don't exit if ipv6 or ipv4 unavailable, but listen_host with this protocol specified -->
|
||||||
|
<!-- <listen_try>0</listen_try> -->
|
||||||
|
|
||||||
|
<!-- Allow listen on same address:port -->
|
||||||
|
<!-- <listen_reuse_port>0</listen_reuse_port> -->
|
||||||
|
|
||||||
|
<!-- <listen_backlog>64</listen_backlog> -->
|
||||||
|
|
||||||
<max_connections>4096</max_connections>
|
<max_connections>4096</max_connections>
|
||||||
<keep_alive_timeout>3</keep_alive_timeout>
|
<keep_alive_timeout>3</keep_alive_timeout>
|
||||||
@@ -92,12 +114,18 @@
|
|||||||
<!-- Path to temporary data for processing hard queries. -->
|
<!-- Path to temporary data for processing hard queries. -->
|
||||||
<tmp_path>/var/lib/clickhouse/tmp/</tmp_path>
|
<tmp_path>/var/lib/clickhouse/tmp/</tmp_path>
|
||||||
|
|
||||||
|
<!-- Directory with user provided files that are accessible by 'file' table function. -->
|
||||||
|
<user_files_path>/var/lib/clickhouse/user_files/</user_files_path>
|
||||||
|
|
||||||
<!-- Path to configuration file with users, access rights, profiles of settings, quotas. -->
|
<!-- Path to configuration file with users, access rights, profiles of settings, quotas. -->
|
||||||
<users_config>users.xml</users_config>
|
<users_config>users.xml</users_config>
|
||||||
|
|
||||||
<!-- Default profile of settings.. -->
|
<!-- Default profile of settings. -->
|
||||||
<default_profile>default</default_profile>
|
<default_profile>default</default_profile>
|
||||||
|
|
||||||
|
<!-- System profile of settings. This settings are used by internal processes (Buffer storage, Distibuted DDL worker and so on). -->
|
||||||
|
<!-- <system_profile>default</system_profile> -->
|
||||||
|
|
||||||
<!-- Default database. -->
|
<!-- Default database. -->
|
||||||
<default_database>default</default_database>
|
<default_database>default</default_database>
|
||||||
|
|
||||||
@@ -109,25 +137,46 @@
|
|||||||
|
|
||||||
Time zone is specified as identifier from IANA time zone database, like UTC or Africa/Abidjan.
|
Time zone is specified as identifier from IANA time zone database, like UTC or Africa/Abidjan.
|
||||||
If not specified, system time zone at server startup is used.
|
If not specified, system time zone at server startup is used.
|
||||||
|
|
||||||
|
Please note, that server could display time zone alias instead of specified name.
|
||||||
|
Example: W-SU is an alias for Europe/Moscow and Zulu is an alias for UTC.
|
||||||
-->
|
-->
|
||||||
<!-- <timezone>Europe/Moscow</timezone> -->
|
<!-- <timezone>Europe/Moscow</timezone> -->
|
||||||
|
|
||||||
|
<!-- You can specify umask here (see "man umask"). Server will apply it on startup.
|
||||||
|
Number is always parsed as octal. Default umask is 027 (other users cannot read logs, data files, etc; group can only read).
|
||||||
|
-->
|
||||||
|
<!-- <umask>022</umask> -->
|
||||||
|
|
||||||
|
<!-- Perform mlockall after startup to lower first queries latency
|
||||||
|
and to prevent clickhouse executable from being paged out under high IO load.
|
||||||
|
Enabling this option is recommended but will lead to increased startup time for up to a few seconds.
|
||||||
|
-->
|
||||||
|
<mlock_executable>false</mlock_executable>
|
||||||
|
|
||||||
<!-- Configuration of clusters that could be used in Distributed tables.
|
<!-- 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" />
|
<remote_servers incl="clickhouse_remote_servers" />
|
||||||
|
|
||||||
|
|
||||||
<!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
|
<!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
|
||||||
By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element.
|
By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element.
|
||||||
Values for substitutions are specified in /yandex/name_of_substitution elements in that file.
|
Values for substitutions are specified in /yandex/name_of_substitution elements in that file.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!-- 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/docs/en/table_engines/replication/
|
||||||
|
-->
|
||||||
|
|
||||||
<zookeeper incl="clickhouse_zookeeper_servers" optional="true" />
|
<zookeeper incl="clickhouse_zookeeper_servers" optional="true" />
|
||||||
|
|
||||||
<!-- Substitutions for parameters of replicated tables.
|
<!-- Substitutions for parameters of replicated tables.
|
||||||
Optional. If you don't use replicated tables, you could omit that.
|
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>
|
<macros>
|
||||||
<shard>shard_01</shard>
|
<shard>shard_01</shard>
|
||||||
@@ -139,10 +188,18 @@
|
|||||||
<!-- Reloading interval for embedded dictionaries, in seconds. Default: 3600. -->
|
<!-- Reloading interval for embedded dictionaries, in seconds. Default: 3600. -->
|
||||||
<builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
|
<builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Maximum session timeout, in seconds. Default: 3600. -->
|
||||||
|
<max_session_timeout>3600</max_session_timeout>
|
||||||
|
|
||||||
|
<!-- Default session timeout, in seconds. Default: 60. -->
|
||||||
|
<default_session_timeout>60</default_session_timeout>
|
||||||
|
|
||||||
<!-- Sending data to Graphite for monitoring. Several sections can be defined. -->
|
<!-- Sending data to Graphite for monitoring. Several sections can be defined. -->
|
||||||
<!--
|
<!--
|
||||||
interval - send every X second
|
interval - send every X second
|
||||||
root_path - prefix for keys
|
root_path - prefix for keys
|
||||||
|
hostname_in_path - append hostname to root_path (default = true)
|
||||||
metrics - send data from table system.metrics
|
metrics - send data from table system.metrics
|
||||||
events - send data from table system.events
|
events - send data from table system.events
|
||||||
asynchronous_metrics - send data from table system.asynchronous_metrics
|
asynchronous_metrics - send data from table system.asynchronous_metrics
|
||||||
@@ -154,9 +211,11 @@
|
|||||||
<timeout>0.1</timeout>
|
<timeout>0.1</timeout>
|
||||||
<interval>60</interval>
|
<interval>60</interval>
|
||||||
<root_path>one_min</root_path>
|
<root_path>one_min</root_path>
|
||||||
|
<hostname_in_path>true</hostname_in_path>
|
||||||
|
|
||||||
<metrics>true</metrics>
|
<metrics>true</metrics>
|
||||||
<events>true</events>
|
<events>true</events>
|
||||||
|
<events_cumulative>false</events_cumulative>
|
||||||
<asynchronous_metrics>true</asynchronous_metrics>
|
<asynchronous_metrics>true</asynchronous_metrics>
|
||||||
</graphite>
|
</graphite>
|
||||||
<graphite>
|
<graphite>
|
||||||
@@ -168,10 +227,12 @@
|
|||||||
|
|
||||||
<metrics>true</metrics>
|
<metrics>true</metrics>
|
||||||
<events>true</events>
|
<events>true</events>
|
||||||
|
<events_cumulative>false</events_cumulative>
|
||||||
<asynchronous_metrics>false</asynchronous_metrics>
|
<asynchronous_metrics>false</asynchronous_metrics>
|
||||||
</graphite>
|
</graphite>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
<!-- Query log. Used only for queries with setting log_queries = 1. -->
|
<!-- Query log. Used only for queries with setting log_queries = 1. -->
|
||||||
<query_log>
|
<query_log>
|
||||||
<!-- What table to insert data. If table is not exist, it will be created.
|
<!-- What table to insert data. If table is not exist, it will be created.
|
||||||
@@ -180,22 +241,68 @@
|
|||||||
-->
|
-->
|
||||||
<database>system</database>
|
<database>system</database>
|
||||||
<table>query_log</table>
|
<table>query_log</table>
|
||||||
|
<!--
|
||||||
|
PARTITION BY expr https://clickhouse.yandex/docs/en/table_engines/custom_partitioning_key/
|
||||||
|
Example:
|
||||||
|
event_date
|
||||||
|
toMonday(event_date)
|
||||||
|
toYYYYMM(event_date)
|
||||||
|
toStartOfHour(event_time)
|
||||||
|
-->
|
||||||
|
<partition_by>toYYYYMM(event_date)</partition_by>
|
||||||
<!-- Interval of flushing data. -->
|
<!-- Interval of flushing data. -->
|
||||||
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
</query_log>
|
</query_log>
|
||||||
|
|
||||||
<!-- Uncomment if use part_log
|
<!-- Trace log. Stores stack traces collected by query profilers.
|
||||||
|
See query_profiler_real_time_period_ns and query_profiler_cpu_time_period_ns settings. -->
|
||||||
|
<trace_log>
|
||||||
|
<database>system</database>
|
||||||
|
<table>trace_log</table>
|
||||||
|
|
||||||
|
<partition_by>toYYYYMM(event_date)</partition_by>
|
||||||
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
|
</trace_log>
|
||||||
|
|
||||||
|
<!-- Query thread log. Has information about all threads participated in query execution.
|
||||||
|
Used only for queries with setting log_query_threads = 1. -->
|
||||||
|
<query_thread_log>
|
||||||
|
<database>system</database>
|
||||||
|
<table>query_thread_log</table>
|
||||||
|
<partition_by>toYYYYMM(event_date)</partition_by>
|
||||||
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
|
</query_thread_log>
|
||||||
|
|
||||||
|
<!-- Uncomment if use part log.
|
||||||
|
Part log contains information about all actions with parts in MergeTree tables (creation, deletion, merges, downloads).
|
||||||
<part_log>
|
<part_log>
|
||||||
<database>system</database>
|
<database>system</database>
|
||||||
<table>part_log</table>
|
<table>part_log</table>
|
||||||
|
|
||||||
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
</part_log>
|
</part_log>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!-- Uncomment to write text log into table.
|
||||||
|
Text log contains all information from usual server log but stores it in structured and efficient way.
|
||||||
|
<text_log>
|
||||||
|
<database>system</database>
|
||||||
|
<table>text_log</table>
|
||||||
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
|
</text_log>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Uncomment to write metric log into table.
|
||||||
|
Metric log contains rows with current values of ProfileEvents, CurrentMetrics collected with "collect_interval_milliseconds" interval.
|
||||||
|
<metric_log>
|
||||||
|
<database>system</database>
|
||||||
|
<table>metric_log</table>
|
||||||
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
|
<collect_interval_milliseconds>1000</collect_interval_milliseconds>
|
||||||
|
</metric_log>
|
||||||
|
-->
|
||||||
|
|
||||||
<!-- Parameters for embedded dictionaries, used in Yandex.Metrica.
|
<!-- 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. -->
|
<!-- Path to file with region hierarchy. -->
|
||||||
@@ -204,8 +311,9 @@
|
|||||||
<!-- Path to directory with files containing names of regions -->
|
<!-- Path to directory with files containing names of regions -->
|
||||||
<!-- <path_to_regions_names_files>/opt/geo/</path_to_regions_names_files> -->
|
<!-- <path_to_regions_names_files>/opt/geo/</path_to_regions_names_files> -->
|
||||||
|
|
||||||
|
|
||||||
<!-- Configuration of external dictionaries. See:
|
<!-- 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>
|
<dictionaries_config>*_dictionary.xml</dictionaries_config>
|
||||||
|
|
||||||
@@ -222,14 +330,20 @@
|
|||||||
<min_part_size_ratio>0.01</min_part_size_ratio> <!- - Min size of part relative to whole table size. - ->
|
<min_part_size_ratio>0.01</min_part_size_ratio> <!- - Min size of part relative to whole table size. - ->
|
||||||
|
|
||||||
<!- - What compression method to use. - ->
|
<!- - What compression method to use. - ->
|
||||||
<method>zstd</method> <!- - Keep in mind that zstd compression library is highly experimental. - ->
|
<method>zstd</method>
|
||||||
</case>
|
</case>
|
||||||
-->
|
-->
|
||||||
</compression>
|
</compression>
|
||||||
|
|
||||||
<resharding>
|
<!-- Allow to execute distributed DDL queries (CREATE, DROP, ALTER, RENAME) on cluster.
|
||||||
<task_queue_path>/clickhouse/task_queue</task_queue_path>
|
Works only if ZooKeeper is enabled. Comment it if such functionality isn't required. -->
|
||||||
</resharding>
|
<distributed_ddl>
|
||||||
|
<!-- Path in ZooKeeper to queue with DDL queries -->
|
||||||
|
<path>/clickhouse/task_queue/ddl</path>
|
||||||
|
|
||||||
|
<!-- Settings from this profile will be used to execute DDL queries -->
|
||||||
|
<!-- <profile>default</profile> -->
|
||||||
|
</distributed_ddl>
|
||||||
|
|
||||||
<!-- Settings to fine tune MergeTree tables. See documentation in source code, in MergeTreeSettings.h -->
|
<!-- Settings to fine tune MergeTree tables. See documentation in source code, in MergeTreeSettings.h -->
|
||||||
<!--
|
<!--
|
||||||
@@ -241,10 +355,12 @@
|
|||||||
<!-- Protection from accidental DROP.
|
<!-- Protection from accidental DROP.
|
||||||
If size of a MergeTree table is greater than max_table_size_to_drop (in bytes) than table could not be dropped with any DROP query.
|
If size of a MergeTree table is greater than max_table_size_to_drop (in bytes) than table could not be dropped with any DROP query.
|
||||||
If you want do delete one table and don't want to restart clickhouse-server, you could create special file <clickhouse-path>/flags/force_drop_table and make DROP once.
|
If you want do delete one table and don't want to restart clickhouse-server, you could create special file <clickhouse-path>/flags/force_drop_table and make DROP once.
|
||||||
By default max_table_size_to_drop is 50GB, max_table_size_to_drop=0 allows to DROP any tables.
|
By default max_table_size_to_drop is 50GB; max_table_size_to_drop=0 allows to DROP any tables.
|
||||||
|
The same for max_partition_size_to_drop.
|
||||||
Uncomment to disable protection.
|
Uncomment to disable protection.
|
||||||
-->
|
-->
|
||||||
<!-- <max_table_size_to_drop>0</max_table_size_to_drop> -->
|
<!-- <max_table_size_to_drop>0</max_table_size_to_drop> -->
|
||||||
|
<!-- <max_partition_size_to_drop>0</max_partition_size_to_drop> -->
|
||||||
|
|
||||||
<!-- Example of parameters for GraphiteMergeTree table engine -->
|
<!-- Example of parameters for GraphiteMergeTree table engine -->
|
||||||
<graphite_rollup_example>
|
<graphite_rollup_example>
|
||||||
@@ -276,4 +392,26 @@
|
|||||||
</retention>
|
</retention>
|
||||||
</default>
|
</default>
|
||||||
</graphite_rollup_example>
|
</graphite_rollup_example>
|
||||||
|
|
||||||
|
<!-- Directory in <clickhouse-path> containing schema files for various input formats.
|
||||||
|
The directory will be created if it doesn't exist.
|
||||||
|
-->
|
||||||
|
<format_schema_path>/var/lib/clickhouse/format_schemas/</format_schema_path>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Uncomment to use query masking rules.
|
||||||
|
name - name for the rule (optional)
|
||||||
|
regexp - RE2 compatible regular expression (mandatory)
|
||||||
|
replace - substitution string for sensitive data (optional, by default - six asterisks)
|
||||||
|
<query_masking_rules>
|
||||||
|
<rule>
|
||||||
|
<name>hide SSN</name>
|
||||||
|
<regexp>\b\d{3}-\d{2}-\d{4}\b</regexp>
|
||||||
|
<replace>000-00-0000</replace>
|
||||||
|
</rule>
|
||||||
|
</query_masking_rules>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Uncomment to disable ClickHouse internal DNS caching. -->
|
||||||
|
<!-- <disable_internal_dns_cache>1</disable_internal_dns_cache> -->
|
||||||
</yandex>
|
</yandex>
|
||||||
|
|||||||
+165
-27
@@ -1,32 +1,43 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
NOTE: User and query level settings are set up in "users.xml" file.
|
||||||
|
-->
|
||||||
<yandex>
|
<yandex>
|
||||||
<logger>
|
<logger>
|
||||||
|
<!-- Possible levels: https://github.com/pocoproject/poco/blob/develop/Foundation/include/Poco/Logger.h#L105 -->
|
||||||
<level>trace</level>
|
<level>trace</level>
|
||||||
<log>/var/log/clickhouse-server/clickhouse-server.log</log>
|
<log>/var/log/clickhouse-server/clickhouse-server.log</log>
|
||||||
<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>
|
<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>
|
||||||
<size>1000M</size>
|
<size>1000M</size>
|
||||||
<count>10</count>
|
<count>10</count>
|
||||||
|
<!-- <console>1</console> --> <!-- Default behavior is autodetection (log to console if not daemon mode and is tty) -->
|
||||||
</logger>
|
</logger>
|
||||||
|
<!--display_name>production</display_name--> <!-- It is the name that will be shown in the client -->
|
||||||
<http_port>8123</http_port>
|
<http_port>8123</http_port>
|
||||||
|
<tcp_port>9000</tcp_port>
|
||||||
|
|
||||||
|
<!-- For HTTPS and SSL over native protocol. -->
|
||||||
<!--
|
<!--
|
||||||
<https_port>8443</https_port>
|
<https_port>8443</https_port>
|
||||||
|
<tcp_port_secure>9440</tcp_port_secure>
|
||||||
-->
|
-->
|
||||||
<!-- Used only with https_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_port_secure. Full ssl options list: https://github.com/ClickHouse-Extras/poco/blob/master/NetSSL_OpenSSL/include/Poco/Net/SSLManager.h#L71 -->
|
||||||
<openSSL>
|
<openSSL>
|
||||||
<server>
|
<server> <!-- Used for https server AND secure tcp port -->
|
||||||
<!-- openssl req -subj "/CN=localhost" -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout server.key -out server.crt -->
|
<!-- 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 -->
|
||||||
<certificateFile>server.crt</certificateFile>
|
<certificateFile>/etc/clickhouse-server/server.crt</certificateFile>
|
||||||
<privateKeyFile>server.key</privateKeyFile>
|
<privateKeyFile>/etc/clickhouse-server/server.key</privateKeyFile>
|
||||||
<!-- openssl dhparam -out dhparam.pem 4096 -->
|
<!-- openssl dhparam -out /etc/clickhouse-server/dhparam.pem 4096 -->
|
||||||
<dhParamsFile>dhparam.pem</dhParamsFile>
|
<dhParamsFile>/etc/clickhouse-server/dhparam.pem</dhParamsFile>
|
||||||
|
<verificationMode>none</verificationMode>
|
||||||
<loadDefaultCAFile>true</loadDefaultCAFile>
|
<loadDefaultCAFile>true</loadDefaultCAFile>
|
||||||
<cacheSessions>true</cacheSessions>
|
<cacheSessions>true</cacheSessions>
|
||||||
<disableProtocols>sslv2,sslv3</disableProtocols>
|
<disableProtocols>sslv2,sslv3</disableProtocols>
|
||||||
<preferServerCiphers>true</preferServerCiphers>
|
<preferServerCiphers>true</preferServerCiphers>
|
||||||
</server>
|
</server>
|
||||||
<client>
|
|
||||||
|
<client> <!-- Used for connecting to https dictionary source -->
|
||||||
<loadDefaultCAFile>true</loadDefaultCAFile>
|
<loadDefaultCAFile>true</loadDefaultCAFile>
|
||||||
<cacheSessions>true</cacheSessions>
|
<cacheSessions>true</cacheSessions>
|
||||||
<disableProtocols>sslv2,sslv3</disableProtocols>
|
<disableProtocols>sslv2,sslv3</disableProtocols>
|
||||||
@@ -44,10 +55,8 @@
|
|||||||
<http_server_default_response><![CDATA[<html ng-app="SMI2"><head><base href="http://ui.tabix.io/"></head><body><div ui-view="" class="content-ui"></div><script src="http://loader.tabix.io/master.js"></script></body></html>]]></http_server_default_response>
|
<http_server_default_response><![CDATA[<html ng-app="SMI2"><head><base href="http://ui.tabix.io/"></head><body><div ui-view="" class="content-ui"></div><script src="http://loader.tabix.io/master.js"></script></body></html>]]></http_server_default_response>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<tcp_port>9000</tcp_port>
|
|
||||||
|
|
||||||
<!-- Port for communication between replicas. Used for data exchange. -->
|
<!-- Port for communication between replicas. Used for data exchange. -->
|
||||||
<interserver_http_port>9010</interserver_http_port>
|
<interserver_http_port>9009</interserver_http_port>
|
||||||
|
|
||||||
<!-- Hostname that is used by other replicas to request this server.
|
<!-- Hostname that is used by other replicas to request this server.
|
||||||
If not specified, than it is determined analoguous to 'hostname -f' command.
|
If not specified, than it is determined analoguous to 'hostname -f' command.
|
||||||
@@ -58,9 +67,22 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
|
<!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
|
||||||
<listen_host>::</listen_host>
|
<!-- <listen_host>::</listen_host> -->
|
||||||
<!--<listen_host>::</listen_host>-->
|
<!-- Same for hosts with disabled ipv6: -->
|
||||||
|
<!-- <listen_host>0.0.0.0</listen_host> -->
|
||||||
|
|
||||||
|
<!-- Default values - try listen localhost on ipv4 and ipv6: -->
|
||||||
|
<!--
|
||||||
|
<listen_host>::1</listen_host>
|
||||||
<listen_host>127.0.0.1</listen_host>
|
<listen_host>127.0.0.1</listen_host>
|
||||||
|
-->
|
||||||
|
<!-- Don't exit if ipv6 or ipv4 unavailable, but listen_host with this protocol specified -->
|
||||||
|
<!-- <listen_try>0</listen_try> -->
|
||||||
|
|
||||||
|
<!-- Allow listen on same address:port -->
|
||||||
|
<!-- <listen_reuse_port>0</listen_reuse_port> -->
|
||||||
|
|
||||||
|
<!-- <listen_backlog>64</listen_backlog> -->
|
||||||
|
|
||||||
<max_connections>4096</max_connections>
|
<max_connections>4096</max_connections>
|
||||||
<keep_alive_timeout>3</keep_alive_timeout>
|
<keep_alive_timeout>3</keep_alive_timeout>
|
||||||
@@ -85,18 +107,25 @@
|
|||||||
-->
|
-->
|
||||||
<mark_cache_size>5368709120</mark_cache_size>
|
<mark_cache_size>5368709120</mark_cache_size>
|
||||||
|
|
||||||
|
|
||||||
<!-- Path to data directory, with trailing slash. -->
|
<!-- Path to data directory, with trailing slash. -->
|
||||||
<path>/var/lib/clickhouse/</path>
|
<path>/var/lib/clickhouse/</path>
|
||||||
|
|
||||||
<!-- Path to temporary data for processing hard queries. -->
|
<!-- Path to temporary data for processing hard queries. -->
|
||||||
<tmp_path>/var/lib/clickhouse/tmp/</tmp_path>
|
<tmp_path>/var/lib/clickhouse/tmp/</tmp_path>
|
||||||
|
|
||||||
|
<!-- Directory with user provided files that are accessible by 'file' table function. -->
|
||||||
|
<user_files_path>/var/lib/clickhouse/user_files/</user_files_path>
|
||||||
|
|
||||||
<!-- Path to configuration file with users, access rights, profiles of settings, quotas. -->
|
<!-- Path to configuration file with users, access rights, profiles of settings, quotas. -->
|
||||||
<users_config>users.xml</users_config>
|
<users_config>users.xml</users_config>
|
||||||
|
|
||||||
<!-- Default profile of settings.. -->
|
<!-- Default profile of settings. -->
|
||||||
<default_profile>default</default_profile>
|
<default_profile>default</default_profile>
|
||||||
|
|
||||||
|
<!-- System profile of settings. This settings are used by internal processes (Buffer storage, Distibuted DDL worker and so on). -->
|
||||||
|
<!-- <system_profile>default</system_profile> -->
|
||||||
|
|
||||||
<!-- Default database. -->
|
<!-- Default database. -->
|
||||||
<default_database>default</default_database>
|
<default_database>default</default_database>
|
||||||
|
|
||||||
@@ -108,25 +137,46 @@
|
|||||||
|
|
||||||
Time zone is specified as identifier from IANA time zone database, like UTC or Africa/Abidjan.
|
Time zone is specified as identifier from IANA time zone database, like UTC or Africa/Abidjan.
|
||||||
If not specified, system time zone at server startup is used.
|
If not specified, system time zone at server startup is used.
|
||||||
|
|
||||||
|
Please note, that server could display time zone alias instead of specified name.
|
||||||
|
Example: W-SU is an alias for Europe/Moscow and Zulu is an alias for UTC.
|
||||||
-->
|
-->
|
||||||
<!-- <timezone>Europe/Moscow</timezone> -->
|
<!-- <timezone>Europe/Moscow</timezone> -->
|
||||||
|
|
||||||
|
<!-- You can specify umask here (see "man umask"). Server will apply it on startup.
|
||||||
|
Number is always parsed as octal. Default umask is 027 (other users cannot read logs, data files, etc; group can only read).
|
||||||
|
-->
|
||||||
|
<!-- <umask>022</umask> -->
|
||||||
|
|
||||||
|
<!-- Perform mlockall after startup to lower first queries latency
|
||||||
|
and to prevent clickhouse executable from being paged out under high IO load.
|
||||||
|
Enabling this option is recommended but will lead to increased startup time for up to a few seconds.
|
||||||
|
-->
|
||||||
|
<mlock_executable>false</mlock_executable>
|
||||||
|
|
||||||
<!-- Configuration of clusters that could be used in Distributed tables.
|
<!-- 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" />
|
<remote_servers incl="clickhouse_remote_servers" />
|
||||||
|
|
||||||
|
|
||||||
<!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
|
<!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
|
||||||
By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element.
|
By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element.
|
||||||
Values for substitutions are specified in /yandex/name_of_substitution elements in that file.
|
Values for substitutions are specified in /yandex/name_of_substitution elements in that file.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!-- 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/docs/en/table_engines/replication/
|
||||||
|
-->
|
||||||
|
|
||||||
<zookeeper incl="clickhouse_zookeeper_servers" optional="true" />
|
<zookeeper incl="clickhouse_zookeeper_servers" optional="true" />
|
||||||
|
|
||||||
<!-- Substitutions for parameters of replicated tables.
|
<!-- Substitutions for parameters of replicated tables.
|
||||||
Optional. If you don't use replicated tables, you could omit that.
|
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>
|
<macros>
|
||||||
<shard>shard_01</shard>
|
<shard>shard_01</shard>
|
||||||
@@ -139,10 +189,17 @@
|
|||||||
<builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
|
<builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Maximum session timeout, in seconds. Default: 3600. -->
|
||||||
|
<max_session_timeout>3600</max_session_timeout>
|
||||||
|
|
||||||
|
<!-- Default session timeout, in seconds. Default: 60. -->
|
||||||
|
<default_session_timeout>60</default_session_timeout>
|
||||||
|
|
||||||
<!-- Sending data to Graphite for monitoring. Several sections can be defined. -->
|
<!-- Sending data to Graphite for monitoring. Several sections can be defined. -->
|
||||||
<!--
|
<!--
|
||||||
interval - send every X second
|
interval - send every X second
|
||||||
root_path - prefix for keys
|
root_path - prefix for keys
|
||||||
|
hostname_in_path - append hostname to root_path (default = true)
|
||||||
metrics - send data from table system.metrics
|
metrics - send data from table system.metrics
|
||||||
events - send data from table system.events
|
events - send data from table system.events
|
||||||
asynchronous_metrics - send data from table system.asynchronous_metrics
|
asynchronous_metrics - send data from table system.asynchronous_metrics
|
||||||
@@ -154,9 +211,11 @@
|
|||||||
<timeout>0.1</timeout>
|
<timeout>0.1</timeout>
|
||||||
<interval>60</interval>
|
<interval>60</interval>
|
||||||
<root_path>one_min</root_path>
|
<root_path>one_min</root_path>
|
||||||
|
<hostname_in_path>true</hostname_in_path>
|
||||||
|
|
||||||
<metrics>true</metrics>
|
<metrics>true</metrics>
|
||||||
<events>true</events>
|
<events>true</events>
|
||||||
|
<events_cumulative>false</events_cumulative>
|
||||||
<asynchronous_metrics>true</asynchronous_metrics>
|
<asynchronous_metrics>true</asynchronous_metrics>
|
||||||
</graphite>
|
</graphite>
|
||||||
<graphite>
|
<graphite>
|
||||||
@@ -168,10 +227,12 @@
|
|||||||
|
|
||||||
<metrics>true</metrics>
|
<metrics>true</metrics>
|
||||||
<events>true</events>
|
<events>true</events>
|
||||||
|
<events_cumulative>false</events_cumulative>
|
||||||
<asynchronous_metrics>false</asynchronous_metrics>
|
<asynchronous_metrics>false</asynchronous_metrics>
|
||||||
</graphite>
|
</graphite>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
<!-- Query log. Used only for queries with setting log_queries = 1. -->
|
<!-- Query log. Used only for queries with setting log_queries = 1. -->
|
||||||
<query_log>
|
<query_log>
|
||||||
<!-- What table to insert data. If table is not exist, it will be created.
|
<!-- What table to insert data. If table is not exist, it will be created.
|
||||||
@@ -180,22 +241,68 @@
|
|||||||
-->
|
-->
|
||||||
<database>system</database>
|
<database>system</database>
|
||||||
<table>query_log</table>
|
<table>query_log</table>
|
||||||
|
<!--
|
||||||
|
PARTITION BY expr https://clickhouse.yandex/docs/en/table_engines/custom_partitioning_key/
|
||||||
|
Example:
|
||||||
|
event_date
|
||||||
|
toMonday(event_date)
|
||||||
|
toYYYYMM(event_date)
|
||||||
|
toStartOfHour(event_time)
|
||||||
|
-->
|
||||||
|
<partition_by>toYYYYMM(event_date)</partition_by>
|
||||||
<!-- Interval of flushing data. -->
|
<!-- Interval of flushing data. -->
|
||||||
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
</query_log>
|
</query_log>
|
||||||
|
|
||||||
<!-- Uncomment if use part_log
|
<!-- Trace log. Stores stack traces collected by query profilers.
|
||||||
|
See query_profiler_real_time_period_ns and query_profiler_cpu_time_period_ns settings. -->
|
||||||
|
<trace_log>
|
||||||
|
<database>system</database>
|
||||||
|
<table>trace_log</table>
|
||||||
|
|
||||||
|
<partition_by>toYYYYMM(event_date)</partition_by>
|
||||||
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
|
</trace_log>
|
||||||
|
|
||||||
|
<!-- Query thread log. Has information about all threads participated in query execution.
|
||||||
|
Used only for queries with setting log_query_threads = 1. -->
|
||||||
|
<query_thread_log>
|
||||||
|
<database>system</database>
|
||||||
|
<table>query_thread_log</table>
|
||||||
|
<partition_by>toYYYYMM(event_date)</partition_by>
|
||||||
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
|
</query_thread_log>
|
||||||
|
|
||||||
|
<!-- Uncomment if use part log.
|
||||||
|
Part log contains information about all actions with parts in MergeTree tables (creation, deletion, merges, downloads).
|
||||||
<part_log>
|
<part_log>
|
||||||
<database>system</database>
|
<database>system</database>
|
||||||
<table>part_log</table>
|
<table>part_log</table>
|
||||||
|
|
||||||
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
</part_log>
|
</part_log>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!-- Uncomment to write text log into table.
|
||||||
|
Text log contains all information from usual server log but stores it in structured and efficient way.
|
||||||
|
<text_log>
|
||||||
|
<database>system</database>
|
||||||
|
<table>text_log</table>
|
||||||
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
|
</text_log>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Uncomment to write metric log into table.
|
||||||
|
Metric log contains rows with current values of ProfileEvents, CurrentMetrics collected with "collect_interval_milliseconds" interval.
|
||||||
|
<metric_log>
|
||||||
|
<database>system</database>
|
||||||
|
<table>metric_log</table>
|
||||||
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
|
<collect_interval_milliseconds>1000</collect_interval_milliseconds>
|
||||||
|
</metric_log>
|
||||||
|
-->
|
||||||
|
|
||||||
<!-- Parameters for embedded dictionaries, used in Yandex.Metrica.
|
<!-- 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. -->
|
<!-- Path to file with region hierarchy. -->
|
||||||
@@ -204,8 +311,9 @@
|
|||||||
<!-- Path to directory with files containing names of regions -->
|
<!-- Path to directory with files containing names of regions -->
|
||||||
<!-- <path_to_regions_names_files>/opt/geo/</path_to_regions_names_files> -->
|
<!-- <path_to_regions_names_files>/opt/geo/</path_to_regions_names_files> -->
|
||||||
|
|
||||||
|
|
||||||
<!-- Configuration of external dictionaries. See:
|
<!-- 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>
|
<dictionaries_config>*_dictionary.xml</dictionaries_config>
|
||||||
|
|
||||||
@@ -222,14 +330,20 @@
|
|||||||
<min_part_size_ratio>0.01</min_part_size_ratio> <!- - Min size of part relative to whole table size. - ->
|
<min_part_size_ratio>0.01</min_part_size_ratio> <!- - Min size of part relative to whole table size. - ->
|
||||||
|
|
||||||
<!- - What compression method to use. - ->
|
<!- - What compression method to use. - ->
|
||||||
<method>zstd</method> <!- - Keep in mind that zstd compression library is highly experimental. - ->
|
<method>zstd</method>
|
||||||
</case>
|
</case>
|
||||||
-->
|
-->
|
||||||
</compression>
|
</compression>
|
||||||
|
|
||||||
<resharding>
|
<!-- Allow to execute distributed DDL queries (CREATE, DROP, ALTER, RENAME) on cluster.
|
||||||
<task_queue_path>/clickhouse/task_queue</task_queue_path>
|
Works only if ZooKeeper is enabled. Comment it if such functionality isn't required. -->
|
||||||
</resharding>
|
<distributed_ddl>
|
||||||
|
<!-- Path in ZooKeeper to queue with DDL queries -->
|
||||||
|
<path>/clickhouse/task_queue/ddl</path>
|
||||||
|
|
||||||
|
<!-- Settings from this profile will be used to execute DDL queries -->
|
||||||
|
<!-- <profile>default</profile> -->
|
||||||
|
</distributed_ddl>
|
||||||
|
|
||||||
<!-- Settings to fine tune MergeTree tables. See documentation in source code, in MergeTreeSettings.h -->
|
<!-- Settings to fine tune MergeTree tables. See documentation in source code, in MergeTreeSettings.h -->
|
||||||
<!--
|
<!--
|
||||||
@@ -241,10 +355,12 @@
|
|||||||
<!-- Protection from accidental DROP.
|
<!-- Protection from accidental DROP.
|
||||||
If size of a MergeTree table is greater than max_table_size_to_drop (in bytes) than table could not be dropped with any DROP query.
|
If size of a MergeTree table is greater than max_table_size_to_drop (in bytes) than table could not be dropped with any DROP query.
|
||||||
If you want do delete one table and don't want to restart clickhouse-server, you could create special file <clickhouse-path>/flags/force_drop_table and make DROP once.
|
If you want do delete one table and don't want to restart clickhouse-server, you could create special file <clickhouse-path>/flags/force_drop_table and make DROP once.
|
||||||
By default max_table_size_to_drop is 50GB, max_table_size_to_drop=0 allows to DROP any tables.
|
By default max_table_size_to_drop is 50GB; max_table_size_to_drop=0 allows to DROP any tables.
|
||||||
|
The same for max_partition_size_to_drop.
|
||||||
Uncomment to disable protection.
|
Uncomment to disable protection.
|
||||||
-->
|
-->
|
||||||
<!-- <max_table_size_to_drop>0</max_table_size_to_drop> -->
|
<!-- <max_table_size_to_drop>0</max_table_size_to_drop> -->
|
||||||
|
<!-- <max_partition_size_to_drop>0</max_partition_size_to_drop> -->
|
||||||
|
|
||||||
<!-- Example of parameters for GraphiteMergeTree table engine -->
|
<!-- Example of parameters for GraphiteMergeTree table engine -->
|
||||||
<graphite_rollup_example>
|
<graphite_rollup_example>
|
||||||
@@ -276,4 +392,26 @@
|
|||||||
</retention>
|
</retention>
|
||||||
</default>
|
</default>
|
||||||
</graphite_rollup_example>
|
</graphite_rollup_example>
|
||||||
|
|
||||||
|
<!-- Directory in <clickhouse-path> containing schema files for various input formats.
|
||||||
|
The directory will be created if it doesn't exist.
|
||||||
|
-->
|
||||||
|
<format_schema_path>/var/lib/clickhouse/format_schemas/</format_schema_path>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Uncomment to use query masking rules.
|
||||||
|
name - name for the rule (optional)
|
||||||
|
regexp - RE2 compatible regular expression (mandatory)
|
||||||
|
replace - substitution string for sensitive data (optional, by default - six asterisks)
|
||||||
|
<query_masking_rules>
|
||||||
|
<rule>
|
||||||
|
<name>hide SSN</name>
|
||||||
|
<regexp>\b\d{3}-\d{2}-\d{4}\b</regexp>
|
||||||
|
<replace>000-00-0000</replace>
|
||||||
|
</rule>
|
||||||
|
</query_masking_rules>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Uncomment to disable ClickHouse internal DNS caching. -->
|
||||||
|
<!-- <disable_internal_dns_cache>1</disable_internal_dns_cache> -->
|
||||||
</yandex>
|
</yandex>
|
||||||
|
|||||||
+166
-27
@@ -1,32 +1,43 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
NOTE: User and query level settings are set up in "users.xml" file.
|
||||||
|
-->
|
||||||
<yandex>
|
<yandex>
|
||||||
<logger>
|
<logger>
|
||||||
|
<!-- Possible levels: https://github.com/pocoproject/poco/blob/develop/Foundation/include/Poco/Logger.h#L105 -->
|
||||||
<level>trace</level>
|
<level>trace</level>
|
||||||
<log>/var/log/clickhouse-server/clickhouse-server.log</log>
|
<log>/var/log/clickhouse-server/clickhouse-server.log</log>
|
||||||
<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>
|
<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>
|
||||||
<size>1000M</size>
|
<size>1000M</size>
|
||||||
<count>10</count>
|
<count>10</count>
|
||||||
|
<!-- <console>1</console> --> <!-- Default behavior is autodetection (log to console if not daemon mode and is tty) -->
|
||||||
</logger>
|
</logger>
|
||||||
|
<!--display_name>production</display_name--> <!-- It is the name that will be shown in the client -->
|
||||||
<http_port>8123</http_port>
|
<http_port>8123</http_port>
|
||||||
|
<tcp_port>9000</tcp_port>
|
||||||
|
|
||||||
|
<!-- For HTTPS and SSL over native protocol. -->
|
||||||
<!--
|
<!--
|
||||||
<https_port>8443</https_port>
|
<https_port>8443</https_port>
|
||||||
|
<tcp_port_secure>9440</tcp_port_secure>
|
||||||
-->
|
-->
|
||||||
<!-- Used only with https_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_port_secure. Full ssl options list: https://github.com/ClickHouse-Extras/poco/blob/master/NetSSL_OpenSSL/include/Poco/Net/SSLManager.h#L71 -->
|
||||||
<openSSL>
|
<openSSL>
|
||||||
<server>
|
<server> <!-- Used for https server AND secure tcp port -->
|
||||||
<!-- openssl req -subj "/CN=localhost" -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout server.key -out server.crt -->
|
<!-- 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 -->
|
||||||
<certificateFile>server.crt</certificateFile>
|
<certificateFile>/etc/clickhouse-server/server.crt</certificateFile>
|
||||||
<privateKeyFile>server.key</privateKeyFile>
|
<privateKeyFile>/etc/clickhouse-server/server.key</privateKeyFile>
|
||||||
<!-- openssl dhparam -out dhparam.pem 4096 -->
|
<!-- openssl dhparam -out /etc/clickhouse-server/dhparam.pem 4096 -->
|
||||||
<dhParamsFile>dhparam.pem</dhParamsFile>
|
<dhParamsFile>/etc/clickhouse-server/dhparam.pem</dhParamsFile>
|
||||||
|
<verificationMode>none</verificationMode>
|
||||||
<loadDefaultCAFile>true</loadDefaultCAFile>
|
<loadDefaultCAFile>true</loadDefaultCAFile>
|
||||||
<cacheSessions>true</cacheSessions>
|
<cacheSessions>true</cacheSessions>
|
||||||
<disableProtocols>sslv2,sslv3</disableProtocols>
|
<disableProtocols>sslv2,sslv3</disableProtocols>
|
||||||
<preferServerCiphers>true</preferServerCiphers>
|
<preferServerCiphers>true</preferServerCiphers>
|
||||||
</server>
|
</server>
|
||||||
<client>
|
|
||||||
|
<client> <!-- Used for connecting to https dictionary source -->
|
||||||
<loadDefaultCAFile>true</loadDefaultCAFile>
|
<loadDefaultCAFile>true</loadDefaultCAFile>
|
||||||
<cacheSessions>true</cacheSessions>
|
<cacheSessions>true</cacheSessions>
|
||||||
<disableProtocols>sslv2,sslv3</disableProtocols>
|
<disableProtocols>sslv2,sslv3</disableProtocols>
|
||||||
@@ -44,10 +55,8 @@
|
|||||||
<http_server_default_response><![CDATA[<html ng-app="SMI2"><head><base href="http://ui.tabix.io/"></head><body><div ui-view="" class="content-ui"></div><script src="http://loader.tabix.io/master.js"></script></body></html>]]></http_server_default_response>
|
<http_server_default_response><![CDATA[<html ng-app="SMI2"><head><base href="http://ui.tabix.io/"></head><body><div ui-view="" class="content-ui"></div><script src="http://loader.tabix.io/master.js"></script></body></html>]]></http_server_default_response>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<tcp_port>9000</tcp_port>
|
|
||||||
|
|
||||||
<!-- Port for communication between replicas. Used for data exchange. -->
|
<!-- Port for communication between replicas. Used for data exchange. -->
|
||||||
<interserver_http_port>9010</interserver_http_port>
|
<interserver_http_port>9009</interserver_http_port>
|
||||||
|
|
||||||
<!-- Hostname that is used by other replicas to request this server.
|
<!-- Hostname that is used by other replicas to request this server.
|
||||||
If not specified, than it is determined analoguous to 'hostname -f' command.
|
If not specified, than it is determined analoguous to 'hostname -f' command.
|
||||||
@@ -58,9 +67,22 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
|
<!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
|
||||||
<listen_host>::</listen_host>
|
<!-- <listen_host>::</listen_host> -->
|
||||||
<!--<listen_host>::</listen_host>-->
|
<!-- Same for hosts with disabled ipv6: -->
|
||||||
|
<!-- <listen_host>0.0.0.0</listen_host> -->
|
||||||
|
|
||||||
|
<!-- Default values - try listen localhost on ipv4 and ipv6: -->
|
||||||
|
<!--
|
||||||
|
<listen_host>::1</listen_host>
|
||||||
<listen_host>127.0.0.1</listen_host>
|
<listen_host>127.0.0.1</listen_host>
|
||||||
|
-->
|
||||||
|
<!-- Don't exit if ipv6 or ipv4 unavailable, but listen_host with this protocol specified -->
|
||||||
|
<!-- <listen_try>0</listen_try> -->
|
||||||
|
|
||||||
|
<!-- Allow listen on same address:port -->
|
||||||
|
<!-- <listen_reuse_port>0</listen_reuse_port> -->
|
||||||
|
|
||||||
|
<!-- <listen_backlog>64</listen_backlog> -->
|
||||||
|
|
||||||
<max_connections>4096</max_connections>
|
<max_connections>4096</max_connections>
|
||||||
<keep_alive_timeout>3</keep_alive_timeout>
|
<keep_alive_timeout>3</keep_alive_timeout>
|
||||||
@@ -85,18 +107,25 @@
|
|||||||
-->
|
-->
|
||||||
<mark_cache_size>5368709120</mark_cache_size>
|
<mark_cache_size>5368709120</mark_cache_size>
|
||||||
|
|
||||||
|
|
||||||
<!-- Path to data directory, with trailing slash. -->
|
<!-- Path to data directory, with trailing slash. -->
|
||||||
<path>/var/lib/clickhouse/</path>
|
<path>/var/lib/clickhouse/</path>
|
||||||
|
|
||||||
<!-- Path to temporary data for processing hard queries. -->
|
<!-- Path to temporary data for processing hard queries. -->
|
||||||
<tmp_path>/var/lib/clickhouse/tmp/</tmp_path>
|
<tmp_path>/var/lib/clickhouse/tmp/</tmp_path>
|
||||||
|
|
||||||
|
<!-- Directory with user provided files that are accessible by 'file' table function. -->
|
||||||
|
<user_files_path>/var/lib/clickhouse/user_files/</user_files_path>
|
||||||
|
|
||||||
<!-- Path to configuration file with users, access rights, profiles of settings, quotas. -->
|
<!-- Path to configuration file with users, access rights, profiles of settings, quotas. -->
|
||||||
<users_config>users.xml</users_config>
|
<users_config>users.xml</users_config>
|
||||||
|
|
||||||
<!-- Default profile of settings.. -->
|
<!-- Default profile of settings. -->
|
||||||
<default_profile>default</default_profile>
|
<default_profile>default</default_profile>
|
||||||
|
|
||||||
|
<!-- System profile of settings. This settings are used by internal processes (Buffer storage, Distibuted DDL worker and so on). -->
|
||||||
|
<!-- <system_profile>default</system_profile> -->
|
||||||
|
|
||||||
<!-- Default database. -->
|
<!-- Default database. -->
|
||||||
<default_database>default</default_database>
|
<default_database>default</default_database>
|
||||||
|
|
||||||
@@ -108,25 +137,46 @@
|
|||||||
|
|
||||||
Time zone is specified as identifier from IANA time zone database, like UTC or Africa/Abidjan.
|
Time zone is specified as identifier from IANA time zone database, like UTC or Africa/Abidjan.
|
||||||
If not specified, system time zone at server startup is used.
|
If not specified, system time zone at server startup is used.
|
||||||
|
|
||||||
|
Please note, that server could display time zone alias instead of specified name.
|
||||||
|
Example: W-SU is an alias for Europe/Moscow and Zulu is an alias for UTC.
|
||||||
-->
|
-->
|
||||||
<!-- <timezone>Europe/Moscow</timezone> -->
|
<!-- <timezone>Europe/Moscow</timezone> -->
|
||||||
|
|
||||||
|
<!-- You can specify umask here (see "man umask"). Server will apply it on startup.
|
||||||
|
Number is always parsed as octal. Default umask is 027 (other users cannot read logs, data files, etc; group can only read).
|
||||||
|
-->
|
||||||
|
<!-- <umask>022</umask> -->
|
||||||
|
|
||||||
|
<!-- Perform mlockall after startup to lower first queries latency
|
||||||
|
and to prevent clickhouse executable from being paged out under high IO load.
|
||||||
|
Enabling this option is recommended but will lead to increased startup time for up to a few seconds.
|
||||||
|
-->
|
||||||
|
<mlock_executable>false</mlock_executable>
|
||||||
|
|
||||||
<!-- Configuration of clusters that could be used in Distributed tables.
|
<!-- 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" />
|
<remote_servers incl="clickhouse_remote_servers" />
|
||||||
|
|
||||||
|
|
||||||
<!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
|
<!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
|
||||||
By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element.
|
By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element.
|
||||||
Values for substitutions are specified in /yandex/name_of_substitution elements in that file.
|
Values for substitutions are specified in /yandex/name_of_substitution elements in that file.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!-- 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/docs/en/table_engines/replication/
|
||||||
|
-->
|
||||||
|
|
||||||
<zookeeper incl="clickhouse_zookeeper_servers" optional="true" />
|
<zookeeper incl="clickhouse_zookeeper_servers" optional="true" />
|
||||||
|
|
||||||
<!-- Substitutions for parameters of replicated tables.
|
<!-- Substitutions for parameters of replicated tables.
|
||||||
Optional. If you don't use replicated tables, you could omit that.
|
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>
|
<macros>
|
||||||
<shard>shard_02</shard>
|
<shard>shard_02</shard>
|
||||||
@@ -138,10 +188,18 @@
|
|||||||
<!-- Reloading interval for embedded dictionaries, in seconds. Default: 3600. -->
|
<!-- Reloading interval for embedded dictionaries, in seconds. Default: 3600. -->
|
||||||
<builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
|
<builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Maximum session timeout, in seconds. Default: 3600. -->
|
||||||
|
<max_session_timeout>3600</max_session_timeout>
|
||||||
|
|
||||||
|
<!-- Default session timeout, in seconds. Default: 60. -->
|
||||||
|
<default_session_timeout>60</default_session_timeout>
|
||||||
|
|
||||||
<!-- Sending data to Graphite for monitoring. Several sections can be defined. -->
|
<!-- Sending data to Graphite for monitoring. Several sections can be defined. -->
|
||||||
<!--
|
<!--
|
||||||
interval - send every X second
|
interval - send every X second
|
||||||
root_path - prefix for keys
|
root_path - prefix for keys
|
||||||
|
hostname_in_path - append hostname to root_path (default = true)
|
||||||
metrics - send data from table system.metrics
|
metrics - send data from table system.metrics
|
||||||
events - send data from table system.events
|
events - send data from table system.events
|
||||||
asynchronous_metrics - send data from table system.asynchronous_metrics
|
asynchronous_metrics - send data from table system.asynchronous_metrics
|
||||||
@@ -153,9 +211,11 @@
|
|||||||
<timeout>0.1</timeout>
|
<timeout>0.1</timeout>
|
||||||
<interval>60</interval>
|
<interval>60</interval>
|
||||||
<root_path>one_min</root_path>
|
<root_path>one_min</root_path>
|
||||||
|
<hostname_in_path>true</hostname_in_path>
|
||||||
|
|
||||||
<metrics>true</metrics>
|
<metrics>true</metrics>
|
||||||
<events>true</events>
|
<events>true</events>
|
||||||
|
<events_cumulative>false</events_cumulative>
|
||||||
<asynchronous_metrics>true</asynchronous_metrics>
|
<asynchronous_metrics>true</asynchronous_metrics>
|
||||||
</graphite>
|
</graphite>
|
||||||
<graphite>
|
<graphite>
|
||||||
@@ -167,10 +227,12 @@
|
|||||||
|
|
||||||
<metrics>true</metrics>
|
<metrics>true</metrics>
|
||||||
<events>true</events>
|
<events>true</events>
|
||||||
|
<events_cumulative>false</events_cumulative>
|
||||||
<asynchronous_metrics>false</asynchronous_metrics>
|
<asynchronous_metrics>false</asynchronous_metrics>
|
||||||
</graphite>
|
</graphite>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
<!-- Query log. Used only for queries with setting log_queries = 1. -->
|
<!-- Query log. Used only for queries with setting log_queries = 1. -->
|
||||||
<query_log>
|
<query_log>
|
||||||
<!-- What table to insert data. If table is not exist, it will be created.
|
<!-- What table to insert data. If table is not exist, it will be created.
|
||||||
@@ -179,22 +241,68 @@
|
|||||||
-->
|
-->
|
||||||
<database>system</database>
|
<database>system</database>
|
||||||
<table>query_log</table>
|
<table>query_log</table>
|
||||||
|
<!--
|
||||||
|
PARTITION BY expr https://clickhouse.yandex/docs/en/table_engines/custom_partitioning_key/
|
||||||
|
Example:
|
||||||
|
event_date
|
||||||
|
toMonday(event_date)
|
||||||
|
toYYYYMM(event_date)
|
||||||
|
toStartOfHour(event_time)
|
||||||
|
-->
|
||||||
|
<partition_by>toYYYYMM(event_date)</partition_by>
|
||||||
<!-- Interval of flushing data. -->
|
<!-- Interval of flushing data. -->
|
||||||
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
</query_log>
|
</query_log>
|
||||||
|
|
||||||
<!-- Uncomment if use part_log
|
<!-- Trace log. Stores stack traces collected by query profilers.
|
||||||
|
See query_profiler_real_time_period_ns and query_profiler_cpu_time_period_ns settings. -->
|
||||||
|
<trace_log>
|
||||||
|
<database>system</database>
|
||||||
|
<table>trace_log</table>
|
||||||
|
|
||||||
|
<partition_by>toYYYYMM(event_date)</partition_by>
|
||||||
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
|
</trace_log>
|
||||||
|
|
||||||
|
<!-- Query thread log. Has information about all threads participated in query execution.
|
||||||
|
Used only for queries with setting log_query_threads = 1. -->
|
||||||
|
<query_thread_log>
|
||||||
|
<database>system</database>
|
||||||
|
<table>query_thread_log</table>
|
||||||
|
<partition_by>toYYYYMM(event_date)</partition_by>
|
||||||
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
|
</query_thread_log>
|
||||||
|
|
||||||
|
<!-- Uncomment if use part log.
|
||||||
|
Part log contains information about all actions with parts in MergeTree tables (creation, deletion, merges, downloads).
|
||||||
<part_log>
|
<part_log>
|
||||||
<database>system</database>
|
<database>system</database>
|
||||||
<table>part_log</table>
|
<table>part_log</table>
|
||||||
|
|
||||||
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
</part_log>
|
</part_log>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!-- Uncomment to write text log into table.
|
||||||
|
Text log contains all information from usual server log but stores it in structured and efficient way.
|
||||||
|
<text_log>
|
||||||
|
<database>system</database>
|
||||||
|
<table>text_log</table>
|
||||||
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
|
</text_log>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Uncomment to write metric log into table.
|
||||||
|
Metric log contains rows with current values of ProfileEvents, CurrentMetrics collected with "collect_interval_milliseconds" interval.
|
||||||
|
<metric_log>
|
||||||
|
<database>system</database>
|
||||||
|
<table>metric_log</table>
|
||||||
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
|
<collect_interval_milliseconds>1000</collect_interval_milliseconds>
|
||||||
|
</metric_log>
|
||||||
|
-->
|
||||||
|
|
||||||
<!-- Parameters for embedded dictionaries, used in Yandex.Metrica.
|
<!-- 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. -->
|
<!-- Path to file with region hierarchy. -->
|
||||||
@@ -203,8 +311,9 @@
|
|||||||
<!-- Path to directory with files containing names of regions -->
|
<!-- Path to directory with files containing names of regions -->
|
||||||
<!-- <path_to_regions_names_files>/opt/geo/</path_to_regions_names_files> -->
|
<!-- <path_to_regions_names_files>/opt/geo/</path_to_regions_names_files> -->
|
||||||
|
|
||||||
|
|
||||||
<!-- Configuration of external dictionaries. See:
|
<!-- 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>
|
<dictionaries_config>*_dictionary.xml</dictionaries_config>
|
||||||
|
|
||||||
@@ -221,14 +330,20 @@
|
|||||||
<min_part_size_ratio>0.01</min_part_size_ratio> <!- - Min size of part relative to whole table size. - ->
|
<min_part_size_ratio>0.01</min_part_size_ratio> <!- - Min size of part relative to whole table size. - ->
|
||||||
|
|
||||||
<!- - What compression method to use. - ->
|
<!- - What compression method to use. - ->
|
||||||
<method>zstd</method> <!- - Keep in mind that zstd compression library is highly experimental. - ->
|
<method>zstd</method>
|
||||||
</case>
|
</case>
|
||||||
-->
|
-->
|
||||||
</compression>
|
</compression>
|
||||||
|
|
||||||
<resharding>
|
<!-- Allow to execute distributed DDL queries (CREATE, DROP, ALTER, RENAME) on cluster.
|
||||||
<task_queue_path>/clickhouse/task_queue</task_queue_path>
|
Works only if ZooKeeper is enabled. Comment it if such functionality isn't required. -->
|
||||||
</resharding>
|
<distributed_ddl>
|
||||||
|
<!-- Path in ZooKeeper to queue with DDL queries -->
|
||||||
|
<path>/clickhouse/task_queue/ddl</path>
|
||||||
|
|
||||||
|
<!-- Settings from this profile will be used to execute DDL queries -->
|
||||||
|
<!-- <profile>default</profile> -->
|
||||||
|
</distributed_ddl>
|
||||||
|
|
||||||
<!-- Settings to fine tune MergeTree tables. See documentation in source code, in MergeTreeSettings.h -->
|
<!-- Settings to fine tune MergeTree tables. See documentation in source code, in MergeTreeSettings.h -->
|
||||||
<!--
|
<!--
|
||||||
@@ -240,10 +355,12 @@
|
|||||||
<!-- Protection from accidental DROP.
|
<!-- Protection from accidental DROP.
|
||||||
If size of a MergeTree table is greater than max_table_size_to_drop (in bytes) than table could not be dropped with any DROP query.
|
If size of a MergeTree table is greater than max_table_size_to_drop (in bytes) than table could not be dropped with any DROP query.
|
||||||
If you want do delete one table and don't want to restart clickhouse-server, you could create special file <clickhouse-path>/flags/force_drop_table and make DROP once.
|
If you want do delete one table and don't want to restart clickhouse-server, you could create special file <clickhouse-path>/flags/force_drop_table and make DROP once.
|
||||||
By default max_table_size_to_drop is 50GB, max_table_size_to_drop=0 allows to DROP any tables.
|
By default max_table_size_to_drop is 50GB; max_table_size_to_drop=0 allows to DROP any tables.
|
||||||
|
The same for max_partition_size_to_drop.
|
||||||
Uncomment to disable protection.
|
Uncomment to disable protection.
|
||||||
-->
|
-->
|
||||||
<!-- <max_table_size_to_drop>0</max_table_size_to_drop> -->
|
<!-- <max_table_size_to_drop>0</max_table_size_to_drop> -->
|
||||||
|
<!-- <max_partition_size_to_drop>0</max_partition_size_to_drop> -->
|
||||||
|
|
||||||
<!-- Example of parameters for GraphiteMergeTree table engine -->
|
<!-- Example of parameters for GraphiteMergeTree table engine -->
|
||||||
<graphite_rollup_example>
|
<graphite_rollup_example>
|
||||||
@@ -275,4 +392,26 @@
|
|||||||
</retention>
|
</retention>
|
||||||
</default>
|
</default>
|
||||||
</graphite_rollup_example>
|
</graphite_rollup_example>
|
||||||
|
|
||||||
|
<!-- Directory in <clickhouse-path> containing schema files for various input formats.
|
||||||
|
The directory will be created if it doesn't exist.
|
||||||
|
-->
|
||||||
|
<format_schema_path>/var/lib/clickhouse/format_schemas/</format_schema_path>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Uncomment to use query masking rules.
|
||||||
|
name - name for the rule (optional)
|
||||||
|
regexp - RE2 compatible regular expression (mandatory)
|
||||||
|
replace - substitution string for sensitive data (optional, by default - six asterisks)
|
||||||
|
<query_masking_rules>
|
||||||
|
<rule>
|
||||||
|
<name>hide SSN</name>
|
||||||
|
<regexp>\b\d{3}-\d{2}-\d{4}\b</regexp>
|
||||||
|
<replace>000-00-0000</replace>
|
||||||
|
</rule>
|
||||||
|
</query_masking_rules>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Uncomment to disable ClickHouse internal DNS caching. -->
|
||||||
|
<!-- <disable_internal_dns_cache>1</disable_internal_dns_cache> -->
|
||||||
</yandex>
|
</yandex>
|
||||||
|
|||||||
+164
-27
@@ -1,32 +1,43 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
|
<!--
|
||||||
|
NOTE: User and query level settings are set up in "users.xml" file.
|
||||||
|
-->
|
||||||
<yandex>
|
<yandex>
|
||||||
<logger>
|
<logger>
|
||||||
|
<!-- Possible levels: https://github.com/pocoproject/poco/blob/develop/Foundation/include/Poco/Logger.h#L105 -->
|
||||||
<level>trace</level>
|
<level>trace</level>
|
||||||
<log>/var/log/clickhouse-server/clickhouse-server.log</log>
|
<log>/var/log/clickhouse-server/clickhouse-server.log</log>
|
||||||
<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>
|
<errorlog>/var/log/clickhouse-server/clickhouse-server.err.log</errorlog>
|
||||||
<size>1000M</size>
|
<size>1000M</size>
|
||||||
<count>10</count>
|
<count>10</count>
|
||||||
|
<!-- <console>1</console> --> <!-- Default behavior is autodetection (log to console if not daemon mode and is tty) -->
|
||||||
</logger>
|
</logger>
|
||||||
|
<!--display_name>production</display_name--> <!-- It is the name that will be shown in the client -->
|
||||||
<http_port>8123</http_port>
|
<http_port>8123</http_port>
|
||||||
|
<tcp_port>9000</tcp_port>
|
||||||
|
|
||||||
|
<!-- For HTTPS and SSL over native protocol. -->
|
||||||
<!--
|
<!--
|
||||||
<https_port>8443</https_port>
|
<https_port>8443</https_port>
|
||||||
|
<tcp_port_secure>9440</tcp_port_secure>
|
||||||
-->
|
-->
|
||||||
<!-- Used only with https_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_port_secure. Full ssl options list: https://github.com/ClickHouse-Extras/poco/blob/master/NetSSL_OpenSSL/include/Poco/Net/SSLManager.h#L71 -->
|
||||||
<openSSL>
|
<openSSL>
|
||||||
<server>
|
<server> <!-- Used for https server AND secure tcp port -->
|
||||||
<!-- openssl req -subj "/CN=localhost" -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout server.key -out server.crt -->
|
<!-- 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 -->
|
||||||
<certificateFile>server.crt</certificateFile>
|
<certificateFile>/etc/clickhouse-server/server.crt</certificateFile>
|
||||||
<privateKeyFile>server.key</privateKeyFile>
|
<privateKeyFile>/etc/clickhouse-server/server.key</privateKeyFile>
|
||||||
<!-- openssl dhparam -out dhparam.pem 4096 -->
|
<!-- openssl dhparam -out /etc/clickhouse-server/dhparam.pem 4096 -->
|
||||||
<dhParamsFile>dhparam.pem</dhParamsFile>
|
<dhParamsFile>/etc/clickhouse-server/dhparam.pem</dhParamsFile>
|
||||||
|
<verificationMode>none</verificationMode>
|
||||||
<loadDefaultCAFile>true</loadDefaultCAFile>
|
<loadDefaultCAFile>true</loadDefaultCAFile>
|
||||||
<cacheSessions>true</cacheSessions>
|
<cacheSessions>true</cacheSessions>
|
||||||
<disableProtocols>sslv2,sslv3</disableProtocols>
|
<disableProtocols>sslv2,sslv3</disableProtocols>
|
||||||
<preferServerCiphers>true</preferServerCiphers>
|
<preferServerCiphers>true</preferServerCiphers>
|
||||||
</server>
|
</server>
|
||||||
<client>
|
|
||||||
|
<client> <!-- Used for connecting to https dictionary source -->
|
||||||
<loadDefaultCAFile>true</loadDefaultCAFile>
|
<loadDefaultCAFile>true</loadDefaultCAFile>
|
||||||
<cacheSessions>true</cacheSessions>
|
<cacheSessions>true</cacheSessions>
|
||||||
<disableProtocols>sslv2,sslv3</disableProtocols>
|
<disableProtocols>sslv2,sslv3</disableProtocols>
|
||||||
@@ -44,10 +55,8 @@
|
|||||||
<http_server_default_response><![CDATA[<html ng-app="SMI2"><head><base href="http://ui.tabix.io/"></head><body><div ui-view="" class="content-ui"></div><script src="http://loader.tabix.io/master.js"></script></body></html>]]></http_server_default_response>
|
<http_server_default_response><![CDATA[<html ng-app="SMI2"><head><base href="http://ui.tabix.io/"></head><body><div ui-view="" class="content-ui"></div><script src="http://loader.tabix.io/master.js"></script></body></html>]]></http_server_default_response>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<tcp_port>9000</tcp_port>
|
|
||||||
|
|
||||||
<!-- Port for communication between replicas. Used for data exchange. -->
|
<!-- Port for communication between replicas. Used for data exchange. -->
|
||||||
<interserver_http_port>9010</interserver_http_port>
|
<interserver_http_port>9009</interserver_http_port>
|
||||||
|
|
||||||
<!-- Hostname that is used by other replicas to request this server.
|
<!-- Hostname that is used by other replicas to request this server.
|
||||||
If not specified, than it is determined analoguous to 'hostname -f' command.
|
If not specified, than it is determined analoguous to 'hostname -f' command.
|
||||||
@@ -58,9 +67,22 @@
|
|||||||
-->
|
-->
|
||||||
|
|
||||||
<!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
|
<!-- Listen specified host. use :: (wildcard IPv6 address), if you want to accept connections both with IPv4 and IPv6 from everywhere. -->
|
||||||
<listen_host>::</listen_host>
|
<!-- <listen_host>::</listen_host> -->
|
||||||
<!--<listen_host>::</listen_host>-->
|
<!-- Same for hosts with disabled ipv6: -->
|
||||||
|
<!-- <listen_host>0.0.0.0</listen_host> -->
|
||||||
|
|
||||||
|
<!-- Default values - try listen localhost on ipv4 and ipv6: -->
|
||||||
|
<!--
|
||||||
|
<listen_host>::1</listen_host>
|
||||||
<listen_host>127.0.0.1</listen_host>
|
<listen_host>127.0.0.1</listen_host>
|
||||||
|
-->
|
||||||
|
<!-- Don't exit if ipv6 or ipv4 unavailable, but listen_host with this protocol specified -->
|
||||||
|
<!-- <listen_try>0</listen_try> -->
|
||||||
|
|
||||||
|
<!-- Allow listen on same address:port -->
|
||||||
|
<!-- <listen_reuse_port>0</listen_reuse_port> -->
|
||||||
|
|
||||||
|
<!-- <listen_backlog>64</listen_backlog> -->
|
||||||
|
|
||||||
<max_connections>4096</max_connections>
|
<max_connections>4096</max_connections>
|
||||||
<keep_alive_timeout>3</keep_alive_timeout>
|
<keep_alive_timeout>3</keep_alive_timeout>
|
||||||
@@ -85,18 +107,25 @@
|
|||||||
-->
|
-->
|
||||||
<mark_cache_size>5368709120</mark_cache_size>
|
<mark_cache_size>5368709120</mark_cache_size>
|
||||||
|
|
||||||
|
|
||||||
<!-- Path to data directory, with trailing slash. -->
|
<!-- Path to data directory, with trailing slash. -->
|
||||||
<path>/var/lib/clickhouse/</path>
|
<path>/var/lib/clickhouse/</path>
|
||||||
|
|
||||||
<!-- Path to temporary data for processing hard queries. -->
|
<!-- Path to temporary data for processing hard queries. -->
|
||||||
<tmp_path>/var/lib/clickhouse/tmp/</tmp_path>
|
<tmp_path>/var/lib/clickhouse/tmp/</tmp_path>
|
||||||
|
|
||||||
|
<!-- Directory with user provided files that are accessible by 'file' table function. -->
|
||||||
|
<user_files_path>/var/lib/clickhouse/user_files/</user_files_path>
|
||||||
|
|
||||||
<!-- Path to configuration file with users, access rights, profiles of settings, quotas. -->
|
<!-- Path to configuration file with users, access rights, profiles of settings, quotas. -->
|
||||||
<users_config>users.xml</users_config>
|
<users_config>users.xml</users_config>
|
||||||
|
|
||||||
<!-- Default profile of settings.. -->
|
<!-- Default profile of settings. -->
|
||||||
<default_profile>default</default_profile>
|
<default_profile>default</default_profile>
|
||||||
|
|
||||||
|
<!-- System profile of settings. This settings are used by internal processes (Buffer storage, Distibuted DDL worker and so on). -->
|
||||||
|
<!-- <system_profile>default</system_profile> -->
|
||||||
|
|
||||||
<!-- Default database. -->
|
<!-- Default database. -->
|
||||||
<default_database>default</default_database>
|
<default_database>default</default_database>
|
||||||
|
|
||||||
@@ -108,25 +137,46 @@
|
|||||||
|
|
||||||
Time zone is specified as identifier from IANA time zone database, like UTC or Africa/Abidjan.
|
Time zone is specified as identifier from IANA time zone database, like UTC or Africa/Abidjan.
|
||||||
If not specified, system time zone at server startup is used.
|
If not specified, system time zone at server startup is used.
|
||||||
|
|
||||||
|
Please note, that server could display time zone alias instead of specified name.
|
||||||
|
Example: W-SU is an alias for Europe/Moscow and Zulu is an alias for UTC.
|
||||||
-->
|
-->
|
||||||
<!-- <timezone>Europe/Moscow</timezone> -->
|
<!-- <timezone>Europe/Moscow</timezone> -->
|
||||||
|
|
||||||
|
<!-- You can specify umask here (see "man umask"). Server will apply it on startup.
|
||||||
|
Number is always parsed as octal. Default umask is 027 (other users cannot read logs, data files, etc; group can only read).
|
||||||
|
-->
|
||||||
|
<!-- <umask>022</umask> -->
|
||||||
|
|
||||||
|
<!-- Perform mlockall after startup to lower first queries latency
|
||||||
|
and to prevent clickhouse executable from being paged out under high IO load.
|
||||||
|
Enabling this option is recommended but will lead to increased startup time for up to a few seconds.
|
||||||
|
-->
|
||||||
|
<mlock_executable>false</mlock_executable>
|
||||||
|
|
||||||
<!-- Configuration of clusters that could be used in Distributed tables.
|
<!-- 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" />
|
<remote_servers incl="clickhouse_remote_servers" />
|
||||||
|
|
||||||
|
|
||||||
<!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
|
<!-- If element has 'incl' attribute, then for it's value will be used corresponding substitution from another file.
|
||||||
By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element.
|
By default, path to file with substitutions is /etc/metrika.xml. It could be changed in config in 'include_from' element.
|
||||||
Values for substitutions are specified in /yandex/name_of_substitution elements in that file.
|
Values for substitutions are specified in /yandex/name_of_substitution elements in that file.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!-- 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/docs/en/table_engines/replication/
|
||||||
|
-->
|
||||||
|
|
||||||
<zookeeper incl="clickhouse_zookeeper_servers" optional="true" />
|
<zookeeper incl="clickhouse_zookeeper_servers" optional="true" />
|
||||||
|
|
||||||
<!-- Substitutions for parameters of replicated tables.
|
<!-- Substitutions for parameters of replicated tables.
|
||||||
Optional. If you don't use replicated tables, you could omit that.
|
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>
|
<macros>
|
||||||
<shard>shard_02</shard>
|
<shard>shard_02</shard>
|
||||||
@@ -139,10 +189,17 @@
|
|||||||
<builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
|
<builtin_dictionaries_reload_interval>3600</builtin_dictionaries_reload_interval>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Maximum session timeout, in seconds. Default: 3600. -->
|
||||||
|
<max_session_timeout>3600</max_session_timeout>
|
||||||
|
|
||||||
|
<!-- Default session timeout, in seconds. Default: 60. -->
|
||||||
|
<default_session_timeout>60</default_session_timeout>
|
||||||
|
|
||||||
<!-- Sending data to Graphite for monitoring. Several sections can be defined. -->
|
<!-- Sending data to Graphite for monitoring. Several sections can be defined. -->
|
||||||
<!--
|
<!--
|
||||||
interval - send every X second
|
interval - send every X second
|
||||||
root_path - prefix for keys
|
root_path - prefix for keys
|
||||||
|
hostname_in_path - append hostname to root_path (default = true)
|
||||||
metrics - send data from table system.metrics
|
metrics - send data from table system.metrics
|
||||||
events - send data from table system.events
|
events - send data from table system.events
|
||||||
asynchronous_metrics - send data from table system.asynchronous_metrics
|
asynchronous_metrics - send data from table system.asynchronous_metrics
|
||||||
@@ -154,9 +211,11 @@
|
|||||||
<timeout>0.1</timeout>
|
<timeout>0.1</timeout>
|
||||||
<interval>60</interval>
|
<interval>60</interval>
|
||||||
<root_path>one_min</root_path>
|
<root_path>one_min</root_path>
|
||||||
|
<hostname_in_path>true</hostname_in_path>
|
||||||
|
|
||||||
<metrics>true</metrics>
|
<metrics>true</metrics>
|
||||||
<events>true</events>
|
<events>true</events>
|
||||||
|
<events_cumulative>false</events_cumulative>
|
||||||
<asynchronous_metrics>true</asynchronous_metrics>
|
<asynchronous_metrics>true</asynchronous_metrics>
|
||||||
</graphite>
|
</graphite>
|
||||||
<graphite>
|
<graphite>
|
||||||
@@ -168,10 +227,12 @@
|
|||||||
|
|
||||||
<metrics>true</metrics>
|
<metrics>true</metrics>
|
||||||
<events>true</events>
|
<events>true</events>
|
||||||
|
<events_cumulative>false</events_cumulative>
|
||||||
<asynchronous_metrics>false</asynchronous_metrics>
|
<asynchronous_metrics>false</asynchronous_metrics>
|
||||||
</graphite>
|
</graphite>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
<!-- Query log. Used only for queries with setting log_queries = 1. -->
|
<!-- Query log. Used only for queries with setting log_queries = 1. -->
|
||||||
<query_log>
|
<query_log>
|
||||||
<!-- What table to insert data. If table is not exist, it will be created.
|
<!-- What table to insert data. If table is not exist, it will be created.
|
||||||
@@ -180,22 +241,68 @@
|
|||||||
-->
|
-->
|
||||||
<database>system</database>
|
<database>system</database>
|
||||||
<table>query_log</table>
|
<table>query_log</table>
|
||||||
|
<!--
|
||||||
|
PARTITION BY expr https://clickhouse.yandex/docs/en/table_engines/custom_partitioning_key/
|
||||||
|
Example:
|
||||||
|
event_date
|
||||||
|
toMonday(event_date)
|
||||||
|
toYYYYMM(event_date)
|
||||||
|
toStartOfHour(event_time)
|
||||||
|
-->
|
||||||
|
<partition_by>toYYYYMM(event_date)</partition_by>
|
||||||
<!-- Interval of flushing data. -->
|
<!-- Interval of flushing data. -->
|
||||||
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
</query_log>
|
</query_log>
|
||||||
|
|
||||||
<!-- Uncomment if use part_log
|
<!-- Trace log. Stores stack traces collected by query profilers.
|
||||||
|
See query_profiler_real_time_period_ns and query_profiler_cpu_time_period_ns settings. -->
|
||||||
|
<trace_log>
|
||||||
|
<database>system</database>
|
||||||
|
<table>trace_log</table>
|
||||||
|
|
||||||
|
<partition_by>toYYYYMM(event_date)</partition_by>
|
||||||
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
|
</trace_log>
|
||||||
|
|
||||||
|
<!-- Query thread log. Has information about all threads participated in query execution.
|
||||||
|
Used only for queries with setting log_query_threads = 1. -->
|
||||||
|
<query_thread_log>
|
||||||
|
<database>system</database>
|
||||||
|
<table>query_thread_log</table>
|
||||||
|
<partition_by>toYYYYMM(event_date)</partition_by>
|
||||||
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
|
</query_thread_log>
|
||||||
|
|
||||||
|
<!-- Uncomment if use part log.
|
||||||
|
Part log contains information about all actions with parts in MergeTree tables (creation, deletion, merges, downloads).
|
||||||
<part_log>
|
<part_log>
|
||||||
<database>system</database>
|
<database>system</database>
|
||||||
<table>part_log</table>
|
<table>part_log</table>
|
||||||
|
|
||||||
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
</part_log>
|
</part_log>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
<!-- Uncomment to write text log into table.
|
||||||
|
Text log contains all information from usual server log but stores it in structured and efficient way.
|
||||||
|
<text_log>
|
||||||
|
<database>system</database>
|
||||||
|
<table>text_log</table>
|
||||||
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
|
</text_log>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Uncomment to write metric log into table.
|
||||||
|
Metric log contains rows with current values of ProfileEvents, CurrentMetrics collected with "collect_interval_milliseconds" interval.
|
||||||
|
<metric_log>
|
||||||
|
<database>system</database>
|
||||||
|
<table>metric_log</table>
|
||||||
|
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
|
||||||
|
<collect_interval_milliseconds>1000</collect_interval_milliseconds>
|
||||||
|
</metric_log>
|
||||||
|
-->
|
||||||
|
|
||||||
<!-- Parameters for embedded dictionaries, used in Yandex.Metrica.
|
<!-- 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. -->
|
<!-- Path to file with region hierarchy. -->
|
||||||
@@ -206,7 +313,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<!-- Configuration of external dictionaries. See:
|
<!-- 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>
|
<dictionaries_config>*_dictionary.xml</dictionaries_config>
|
||||||
|
|
||||||
@@ -223,14 +330,20 @@
|
|||||||
<min_part_size_ratio>0.01</min_part_size_ratio> <!- - Min size of part relative to whole table size. - ->
|
<min_part_size_ratio>0.01</min_part_size_ratio> <!- - Min size of part relative to whole table size. - ->
|
||||||
|
|
||||||
<!- - What compression method to use. - ->
|
<!- - What compression method to use. - ->
|
||||||
<method>zstd</method> <!- - Keep in mind that zstd compression library is highly experimental. - ->
|
<method>zstd</method>
|
||||||
</case>
|
</case>
|
||||||
-->
|
-->
|
||||||
</compression>
|
</compression>
|
||||||
|
|
||||||
<resharding>
|
<!-- Allow to execute distributed DDL queries (CREATE, DROP, ALTER, RENAME) on cluster.
|
||||||
<task_queue_path>/clickhouse/task_queue</task_queue_path>
|
Works only if ZooKeeper is enabled. Comment it if such functionality isn't required. -->
|
||||||
</resharding>
|
<distributed_ddl>
|
||||||
|
<!-- Path in ZooKeeper to queue with DDL queries -->
|
||||||
|
<path>/clickhouse/task_queue/ddl</path>
|
||||||
|
|
||||||
|
<!-- Settings from this profile will be used to execute DDL queries -->
|
||||||
|
<!-- <profile>default</profile> -->
|
||||||
|
</distributed_ddl>
|
||||||
|
|
||||||
<!-- Settings to fine tune MergeTree tables. See documentation in source code, in MergeTreeSettings.h -->
|
<!-- Settings to fine tune MergeTree tables. See documentation in source code, in MergeTreeSettings.h -->
|
||||||
<!--
|
<!--
|
||||||
@@ -242,10 +355,12 @@
|
|||||||
<!-- Protection from accidental DROP.
|
<!-- Protection from accidental DROP.
|
||||||
If size of a MergeTree table is greater than max_table_size_to_drop (in bytes) than table could not be dropped with any DROP query.
|
If size of a MergeTree table is greater than max_table_size_to_drop (in bytes) than table could not be dropped with any DROP query.
|
||||||
If you want do delete one table and don't want to restart clickhouse-server, you could create special file <clickhouse-path>/flags/force_drop_table and make DROP once.
|
If you want do delete one table and don't want to restart clickhouse-server, you could create special file <clickhouse-path>/flags/force_drop_table and make DROP once.
|
||||||
By default max_table_size_to_drop is 50GB, max_table_size_to_drop=0 allows to DROP any tables.
|
By default max_table_size_to_drop is 50GB; max_table_size_to_drop=0 allows to DROP any tables.
|
||||||
|
The same for max_partition_size_to_drop.
|
||||||
Uncomment to disable protection.
|
Uncomment to disable protection.
|
||||||
-->
|
-->
|
||||||
<!-- <max_table_size_to_drop>0</max_table_size_to_drop> -->
|
<!-- <max_table_size_to_drop>0</max_table_size_to_drop> -->
|
||||||
|
<!-- <max_partition_size_to_drop>0</max_partition_size_to_drop> -->
|
||||||
|
|
||||||
<!-- Example of parameters for GraphiteMergeTree table engine -->
|
<!-- Example of parameters for GraphiteMergeTree table engine -->
|
||||||
<graphite_rollup_example>
|
<graphite_rollup_example>
|
||||||
@@ -277,4 +392,26 @@
|
|||||||
</retention>
|
</retention>
|
||||||
</default>
|
</default>
|
||||||
</graphite_rollup_example>
|
</graphite_rollup_example>
|
||||||
|
|
||||||
|
<!-- Directory in <clickhouse-path> containing schema files for various input formats.
|
||||||
|
The directory will be created if it doesn't exist.
|
||||||
|
-->
|
||||||
|
<format_schema_path>/var/lib/clickhouse/format_schemas/</format_schema_path>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Uncomment to use query masking rules.
|
||||||
|
name - name for the rule (optional)
|
||||||
|
regexp - RE2 compatible regular expression (mandatory)
|
||||||
|
replace - substitution string for sensitive data (optional, by default - six asterisks)
|
||||||
|
<query_masking_rules>
|
||||||
|
<rule>
|
||||||
|
<name>hide SSN</name>
|
||||||
|
<regexp>\b\d{3}-\d{2}-\d{4}\b</regexp>
|
||||||
|
<replace>000-00-0000</replace>
|
||||||
|
</rule>
|
||||||
|
</query_masking_rules>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- Uncomment to disable ClickHouse internal DNS caching. -->
|
||||||
|
<!-- <disable_internal_dns_cache>1</disable_internal_dns_cache> -->
|
||||||
</yandex>
|
</yandex>
|
||||||
|
|||||||
Reference in New Issue
Block a user