提交 430d6a3d 编写于 作者: B BayoNet

Ru contents is synchronized with En one.

Utils section is restructured.
clickhouse-copier is editted.
上级 7e7fe3c4
# The clickhouse-local program
The `clickhouse-local` program enables you to perform fast processing on local files that store tables, without having to deploy and configure clickhouse-server.
# The clickhouse-local program
The `clickhouse-local` program enables you to perform fast processing on local files that store tables, without having to deploy and configure clickhouse-server.
...@@ -12,6 +12,9 @@ edit_uri: 'edit/master/docs/en' ...@@ -12,6 +12,9 @@ edit_uri: 'edit/master/docs/en'
extra_css: extra_css:
- assets/stylesheets/custom.css - assets/stylesheets/custom.css
markdown_extensions:
- codehilite
theme: theme:
name: null name: null
custom_dir: 'mkdocs-material-theme' custom_dir: 'mkdocs-material-theme'
...@@ -34,9 +37,6 @@ extra: ...@@ -34,9 +37,6 @@ extra:
search: search:
language: 'en' language: 'en'
markdown_extensions:
- codehilite
pages: pages:
- 'ClickHouse': 'index.md' - 'ClickHouse': 'index.md'
...@@ -59,7 +59,7 @@ pages: ...@@ -59,7 +59,7 @@ pages:
- 'Star Schema Benchmark': 'getting_started/example_datasets/star_schema.md' - 'Star Schema Benchmark': 'getting_started/example_datasets/star_schema.md'
- 'Interfaces': - 'Interfaces':
- 'Interfaces': 'interfaces/index.md' - 'Introduction': 'interfaces/index.md'
- 'Command-line client': 'interfaces/cli.md' - 'Command-line client': 'interfaces/cli.md'
- 'HTTP interface': 'interfaces/http_interface.md' - 'HTTP interface': 'interfaces/http_interface.md'
- 'JDBC driver': 'interfaces/jdbc.md' - 'JDBC driver': 'interfaces/jdbc.md'
...@@ -71,7 +71,6 @@ pages: ...@@ -71,7 +71,6 @@ pages:
# - 'Query language': 'query_language/index.md' # - 'Query language': 'query_language/index.md'
- 'Queries': 'query_language/queries.md' - 'Queries': 'query_language/queries.md'
- 'Syntax': 'query_language/syntax.md' - 'Syntax': 'query_language/syntax.md'
- 'The clickhouse-local program': 'query_language/clickhouse_local.md'
- 'Table engines': - 'Table engines':
- 'Introduction': 'table_engines/index.md' - 'Introduction': 'table_engines/index.md'
...@@ -234,9 +233,9 @@ pages: ...@@ -234,9 +233,9 @@ pages:
- 'Settings profiles': 'operations/settings/settings_profiles.md' - 'Settings profiles': 'operations/settings/settings_profiles.md'
- 'Utilites': - 'Utilites':
- 'Utilites': 'utils/index.md' - 'Introduction': 'utils/index.md'
- 'clickhouse-copier': 'utils/clickhouse-copier.md' - 'clickhouse-copier': 'utils/clickhouse-copier.md'
#- 'clickhouse-local' : 'utils/clickhouse-local.md' - 'clickhouse-local': 'utils/clickhouse-local.md'
- 'ClickHouse Development': - 'ClickHouse Development':
# - 'ClickHouse Development': 'development/index.md' # - 'ClickHouse Development': 'development/index.md'
......
...@@ -25,8 +25,6 @@ theme: ...@@ -25,8 +25,6 @@ theme:
primary: 'white' primary: 'white'
accent: 'white' accent: 'white'
font: false font: false
# text: Roboto
# code: Roboto Mono
logo: 'images/logo.svg' logo: 'images/logo.svg'
favicon: 'assets/images/favicon.ico' favicon: 'assets/images/favicon.ico'
include_search_page: false include_search_page: false
...@@ -39,8 +37,6 @@ extra: ...@@ -39,8 +37,6 @@ extra:
search: search:
language: 'en, ru' language: 'en, ru'
pages: pages:
- 'ClickHouse': 'index.md' - 'ClickHouse': 'index.md'
...@@ -55,12 +51,12 @@ pages: ...@@ -55,12 +51,12 @@ pages:
- 'Начало работы': - 'Начало работы':
- 'Установка и запуск': 'getting_started/index.md' - 'Установка и запуск': 'getting_started/index.md'
- 'Тестовые наборы данных': - 'Тестовые наборы данных':
- 'OnTime': 'getting_started/example_datasets/ontime.md'
- 'Данные о такси в Нью-Йорке': 'getting_started/example_datasets/nyc_taxi.md'
- 'AMPLab Big Data Benchmark': 'getting_started/example_datasets/amplab_benchmark.md' - 'AMPLab Big Data Benchmark': 'getting_started/example_datasets/amplab_benchmark.md'
- 'WikiStat': 'getting_started/example_datasets/wikistat.md'
- 'Терабайт логов кликов от Criteo': 'getting_started/example_datasets/criteo.md' - 'Терабайт логов кликов от Criteo': 'getting_started/example_datasets/criteo.md'
- 'Данные о такси в Нью-Йорке': 'getting_started/example_datasets/nyc_taxi.md'
- 'OnTime': 'getting_started/example_datasets/ontime.md'
- 'Схема «Звезда»': 'getting_started/example_datasets/star_schema.md' - 'Схема «Звезда»': 'getting_started/example_datasets/star_schema.md'
- 'WikiStat': 'getting_started/example_datasets/wikistat.md'
- 'Интерфейсы': - 'Интерфейсы':
- 'Введение': 'interfaces/index.md' - 'Введение': 'interfaces/index.md'
...@@ -75,100 +71,99 @@ pages: ...@@ -75,100 +71,99 @@ pages:
# - 'Язык запросов': 'query_language/index.md' # - 'Язык запросов': 'query_language/index.md'
- 'Запросы': 'query_language/queries.md' - 'Запросы': 'query_language/queries.md'
- 'Синтаксис': 'query_language/syntax.md' - 'Синтаксис': 'query_language/syntax.md'
- 'Программа clickhouse-local': 'query_language/clickhouse_local.md'
- 'Движки таблиц': - 'Движки таблиц':
- 'Введение': 'table_engines/index.md' - 'Введение': 'table_engines/index.md'
- 'TinyLog': 'table_engines/tinylog.md'
- 'Log': 'table_engines/log.md'
- 'Memory': 'table_engines/memory.md'
- 'MergeTree': 'table_engines/mergetree.md'
- 'Произвольный ключ партиционирования': 'table_engines/custom_partitioning_key.md'
- 'ReplacingMergeTree': 'table_engines/replacingmergetree.md'
- 'SummingMergeTree': 'table_engines/summingmergetree.md'
- 'AggregatingMergeTree': 'table_engines/aggregatingmergetree.md' - 'AggregatingMergeTree': 'table_engines/aggregatingmergetree.md'
- 'Buffer': 'table_engines/buffer.md'
- 'CollapsingMergeTree': 'table_engines/collapsingmergetree.md' - 'CollapsingMergeTree': 'table_engines/collapsingmergetree.md'
- 'Произвольный ключ партиционирования': 'table_engines/custom_partitioning_key.md'
- 'Dictionary': 'table_engines/dictionary.md'
- 'Distributed': 'table_engines/distributed.md'
- 'Внешние данные для обработки запроса': 'table_engines/external_data.md'
- 'File(InputFormat)': 'table_engines/file.md'
- 'GraphiteMergeTree': 'table_engines/graphitemergetree.md' - 'GraphiteMergeTree': 'table_engines/graphitemergetree.md'
- 'Join': 'table_engines/join.md' - 'Data replication': 'table_engines/replication.md'
- 'Kafka': 'table_engines/kafka.md' - 'Distributed': 'table_engines/distributed.md'
- 'Log': 'table_engines/log.md' - 'Dictionary': 'table_engines/dictionary.md'
- 'MaterializedView': 'table_engines/materializedview.md'
- 'Memory': 'table_engines/memory.md'
- 'Merge': 'table_engines/merge.md' - 'Merge': 'table_engines/merge.md'
- 'MergeTree': 'table_engines/mergetree.md' - 'Buffer': 'table_engines/buffer.md'
- 'File': 'table_engines/file.md'
- 'Null': 'table_engines/null.md' - 'Null': 'table_engines/null.md'
- 'ReplacingMergeTree': 'table_engines/replacingmergetree.md'
- 'Репликация данных': 'table_engines/replication.md'
- 'Set': 'table_engines/set.md' - 'Set': 'table_engines/set.md'
- 'SummingMergeTree': 'table_engines/summingmergetree.md' - 'Join': 'table_engines/join.md'
- 'TinyLog': 'table_engines/tinylog.md'
- 'View': 'table_engines/view.md' - 'View': 'table_engines/view.md'
- 'MaterializedView': 'table_engines/materializedview.md'
- 'Kafka': 'table_engines/kafka.md'
- 'Внешние данные для обработки запроса': 'table_engines/external_data.md'
- 'Системные таблицы': - 'Системные таблицы':
- 'Введение': 'system_tables/index.md' - 'Введение': 'system_tables/index.md'
- 'system.asynchronous_metrics': 'system_tables/system.asynchronous_metrics.md' - 'system.one': 'system_tables/system.one.md'
- 'system.clusters': 'system_tables/system.clusters.md'
- 'system.columns': 'system_tables/system.columns.md'
- 'system.databases': 'system_tables/system.databases.md'
- 'system.dictionaries': 'system_tables/system.dictionaries.md'
- 'system.events': 'system_tables/system.events.md'
- 'system.functions': 'system_tables/system.functions.md'
- 'system.merges': 'system_tables/system.merges.md'
- 'system.metrics': 'system_tables/system.metrics.md'
- 'system.numbers': 'system_tables/system.numbers.md' - 'system.numbers': 'system_tables/system.numbers.md'
- 'system.numbers_mt': 'system_tables/system.numbers_mt.md' - 'system.numbers_mt': 'system_tables/system.numbers_mt.md'
- 'system.one': 'system_tables/system.one.md' - 'system.databases': 'system_tables/system.databases.md'
- 'system.tables': 'system_tables/system.tables.md'
- 'system.columns': 'system_tables/system.columns.md'
- 'system.parts': 'system_tables/system.parts.md' - 'system.parts': 'system_tables/system.parts.md'
- 'system.processes': 'system_tables/system.processes.md' - 'system.processes': 'system_tables/system.processes.md'
- 'system.merges': 'system_tables/system.merges.md'
- 'system.events': 'system_tables/system.events.md'
- 'system.metrics': 'system_tables/system.metrics.md'
- 'system.asynchronous_metrics': 'system_tables/system.asynchronous_metrics.md'
- 'system.replicas': 'system_tables/system.replicas.md' - 'system.replicas': 'system_tables/system.replicas.md'
- 'system.dictionaries': 'system_tables/system.dictionaries.md'
- 'system.clusters': 'system_tables/system.clusters.md'
- 'system.functions': 'system_tables/system.functions.md'
- 'system.settings': 'system_tables/system.settings.md' - 'system.settings': 'system_tables/system.settings.md'
- 'system.tables': 'system_tables/system.tables.md'
- 'system.zookeeper': 'system_tables/system.zookeeper.md' - 'system.zookeeper': 'system_tables/system.zookeeper.md'
- 'Табличные функции': - 'Табличные функции':
- 'Общие сведения': 'table_functions/index.md' - 'Введение': 'table_functions/index.md'
- 'merge': 'table_functions/merge.md'
- 'remote': 'table_functions/remote.md' - 'remote': 'table_functions/remote.md'
- 'merge': 'table_functions/merge.md'
- 'Форматы': - 'Форматы':
- 'Введение': 'formats/index.md' - 'Введение': 'formats/index.md'
- 'CapnProto': 'formats/capnproto.md' - 'TabSeparated': 'formats/tabseparated.md'
- 'TabSeparatedRaw': 'formats/tabseparatedraw.md'
- 'TabSeparatedWithNames': 'formats/tabseparatedwithnames.md'
- 'TabSeparatedWithNamesAndTypes': 'formats/tabseparatedwithnamesandtypes.md'
- 'CSV': 'formats/csv.md' - 'CSV': 'formats/csv.md'
- 'CSVWithNames': 'formats/csvwithnames.md' - 'CSVWithNames': 'formats/csvwithnames.md'
- 'Values': 'formats/values.md'
- 'Vertical': 'formats/vertical.md'
- 'JSON': 'formats/json.md' - 'JSON': 'formats/json.md'
- 'JSONCompact': 'formats/jsoncompact.md' - 'JSONCompact': 'formats/jsoncompact.md'
- 'JSONEachRow': 'formats/jsoneachrow.md' - 'JSONEachRow': 'formats/jsoneachrow.md'
- 'Native': 'formats/native.md' - 'TSKV': 'formats/tskv.md'
- 'Null': 'formats/null.md'
- 'Pretty': 'formats/pretty.md' - 'Pretty': 'formats/pretty.md'
- 'PrettyCompact': 'formats/prettycompact.md' - 'PrettyCompact': 'formats/prettycompact.md'
- 'PrettyCompactMonoBlock': 'formats/prettycompactmonoblock.md' - 'PrettyCompactMonoBlock': 'formats/prettycompactmonoblock.md'
- 'PrettyNoEscapes': 'formats/prettynoescapes.md' - 'PrettyNoEscapes': 'formats/prettynoescapes.md'
- 'PrettySpace': 'formats/prettyspace.md' - 'PrettySpace': 'formats/prettyspace.md'
- 'RowBinary': 'formats/rowbinary.md' - 'RowBinary': 'formats/rowbinary.md'
- 'TabSeparated': 'formats/tabseparated.md' - 'Native': 'formats/native.md'
- 'TabSeparatedRaw': 'formats/tabseparatedraw.md' - 'Null': 'formats/null.md'
- 'TabSeparatedWithNames': 'formats/tabseparatedwithnames.md'
- 'TabSeparatedWithNamesAndTypes': 'formats/tabseparatedwithnamesandtypes.md'
- 'TSKV': 'formats/tskv.md'
- 'Values': 'formats/values.md'
- 'Vertical': 'formats/vertical.md'
- 'XML': 'formats/xml.md' - 'XML': 'formats/xml.md'
- 'CapnProto': 'formats/capnproto.md'
- 'Типы данных': - 'Типы данных':
- 'Введение': 'data_types/index.md' - 'Введение': 'data_types/index.md'
- 'Array(T)': 'data_types/array.md' - 'UInt8, UInt16, UInt32, UInt64, Int8, Int16, Int32, Int64': 'data_types/int_uint.md'
- 'Float32, Float64': 'data_types/float.md'
- 'Булевы значения': 'data_types/boolean.md' - 'Булевы значения': 'data_types/boolean.md'
- 'String': 'data_types/string.md'
- 'FixedString(N)': 'data_types/fixedstring.md'
- 'Date': 'data_types/date.md' - 'Date': 'data_types/date.md'
- 'DateTime': 'data_types/datetime.md' - 'DateTime': 'data_types/datetime.md'
- 'Enum': 'data_types/enum.md' - 'Enum': 'data_types/enum.md'
- 'FixedString(N)': 'data_types/fixedstring.md' - 'Array(T)': 'data_types/array.md'
- 'Float32, Float64': 'data_types/float.md' - 'AggregateFunction(name, types_of_arguments...)': 'data_types/nested_data_structures/aggregatefunction.md'
- 'UInt8, UInt16, UInt32, UInt64, Int8, Int16, Int32, Int64': 'data_types/int_uint.md'
- 'String': 'data_types/string.md'
- 'Tuple(T1, T2, ...)': 'data_types/tuple.md' - 'Tuple(T1, T2, ...)': 'data_types/tuple.md'
- 'Вложенные структуры данных': - 'Вложенные структуры данных':
# - 'Вложенные структуры данных': 'data_types/nested_data_structures/index.md' # - 'Вложенные структуры данных': 'data_types/nested_data_structures/index.md'
- 'AggregateFunction(name, types_of_arguments...)': 'data_types/nested_data_structures/aggregatefunction.md'
- 'Nested(Name1 Type1, Name2 Type2, ...)': 'data_types/nested_data_structures/nested.md' - 'Nested(Name1 Type1, Name2 Type2, ...)': 'data_types/nested_data_structures/nested.md'
- 'Служебные типы данных': - 'Служебные типы данных':
# - 'Служебные типы данных': 'data_types/special_data_types/index.md' # - 'Служебные типы данных': 'data_types/special_data_types/index.md'
...@@ -180,31 +175,31 @@ pages: ...@@ -180,31 +175,31 @@ pages:
- 'Функции': - 'Функции':
- 'Общее описание': 'functions/index.md' - 'Общее описание': 'functions/index.md'
- 'Арифметические функции': 'functions/arithmetic_functions.md' - 'Арифметические функции': 'functions/arithmetic_functions.md'
- 'Функции по работе с массивами': 'functions/array_functions.md'
- 'Функция arrayJoin': 'functions/array_join.md'
- 'Битовые функции': 'functions/bit_functions.md'
- 'Функции сравнения': 'functions/comparison_functions.md' - 'Функции сравнения': 'functions/comparison_functions.md'
- 'Условные функции': 'functions/conditional_functions.md'
- 'Функции для работы с датами и временем': 'functions/date_time_functions.md'
- 'Функции кодирования': 'functions/encoding_functions.md'
- 'Функции для работы с внешними словарями': 'functions/ext_dict_functions.md'
- 'Функции хэширования': 'functions/hash_functions.md'
- 'Функции высшего порядка': 'functions/higher_order_functions.md'
- 'Функции для реализации оператора IN.': 'functions/in_functions.md'
- 'Функции для работы с IP-адресами': 'functions/ip_address_functions.md'
- 'Функции для работы с JSON.': 'functions/json_functions.md'
- 'Логические функции': 'functions/logical_functions.md' - 'Логические функции': 'functions/logical_functions.md'
- 'Функции преобразования типов': 'functions/type_conversion_functions.md'
- 'Функции для работы с датами и временем': 'functions/date_time_functions.md'
- 'Функции для работы со строками': 'functions/string_functions.md'
- 'Функции поиска в строках': 'functions/string_search_functions.md'
- 'Функции поиска и замены в строках': 'functions/string_replace_functions.md'
- 'Условные функции': 'functions/conditional_functions.md'
- 'Математические функции': 'functions/math_functions.md' - 'Математические функции': 'functions/math_functions.md'
- 'Прочие функции': 'functions/other_functions.md'
- 'Функции генерации псевдослучайных чисел': 'functions/random_functions.md'
- 'Функции округления': 'functions/rounding_functions.md' - 'Функции округления': 'functions/rounding_functions.md'
- 'Функции по работе с массивами': 'functions/array_functions.md'
- 'Функции разбиения и слияния строк и массивов': 'functions/splitting_merging_functions.md' - 'Функции разбиения и слияния строк и массивов': 'functions/splitting_merging_functions.md'
- 'Функции для работы со строками': 'functions/string_functions.md' - 'Битовые функции': 'functions/bit_functions.md'
- 'Функции поиска и замены в строках': 'functions/string_replace_functions.md' - 'Функции хэширования': 'functions/hash_functions.md'
- 'Функции поиска в строках': 'functions/string_search_functions.md' - 'Функции генерации псевдослучайных чисел': 'functions/random_functions.md'
- 'Функции преобразования типов': 'functions/type_conversion_functions.md' - 'Функции кодирования': 'functions/encoding_functions.md'
- 'Функции для работы с URL': 'functions/url_functions.md' - 'Функции для работы с URL': 'functions/url_functions.md'
- 'Функции для работы с IP-адресами': 'functions/ip_address_functions.md'
- 'Функции для работы с JSON.': 'functions/json_functions.md'
- 'Функции высшего порядка': 'functions/higher_order_functions.md'
- 'Прочие функции': 'functions/other_functions.md'
- 'Функции для работы с внешними словарями': 'functions/ext_dict_functions.md'
- 'Функции для работы со словарями Яндекс.Метрики': 'functions/ym_dict_functions.md' - 'Функции для работы со словарями Яндекс.Метрики': 'functions/ym_dict_functions.md'
- 'Функции для реализации оператора IN.': 'functions/in_functions.md'
- 'Функция arrayJoin': 'functions/array_join.md'
- 'Агрегатные функции': - 'Агрегатные функции':
- 'Введение': 'agg_functions/index.md' - 'Введение': 'agg_functions/index.md'
...@@ -239,9 +234,9 @@ pages: ...@@ -239,9 +234,9 @@ pages:
- 'Профили настроек': 'operations/settings/settings_profiles.md' - 'Профили настроек': 'operations/settings/settings_profiles.md'
- 'Утилиты': - 'Утилиты':
- 'Утилиты': 'utils/index.md' - 'Введение': 'utils/index.md'
- 'clickhouse-copier': 'utils/clickhouse-copier.md' - 'clickhouse-copier': 'utils/clickhouse-copier.md'
#- 'clickhouse-local' : 'utils/clickhouse-local.md' - 'clickhouse-local': 'utils/clickhouse-local.md'
- 'ClickHouse Development': - 'ClickHouse Development':
# - 'ClickHouse Development': 'development/index.md' # - 'ClickHouse Development': 'development/index.md'
......
# Программа clickhouse-local
Программа `clickhouse-local` позволяет выполнять быструю обработку локальных файлов, хранящих таблицы, не прибегая к развертыванию и настройке clickhouse-server ...
# clickhouse-copier util <a name="utils-clickhouse-copier"/>
The util copies tables data from one cluster to new tables of other (possibly the same) cluster in distributed and fault-tolerant manner. # clickhouse-copier
Configuration of copying tasks is set in special ZooKeeper node (called the `/description` node). Копирует данные из таблиц одного кластера в таблицы другого (или этого же) кластера.
A ZooKeeper path to the description node is specified via `--task-path </task/path>` parameter.
So, node `/task/path/description` should contain special XML content describing copying tasks.
Simultaneously many `clickhouse-copier` processes located on any servers could execute the same task. Можно запустить несколько `clickhouse-copier` для разных серверах для выполнения одного и того же задания. Для синхронизации между процессами используется ZooKeeper.
ZooKeeper node `/task/path/` is used by the processes to coordinate their work.
You must not add additional child nodes to `/task/path/`.
Currently you are responsible for manual launching of all `cluster-copier` processes. После запуска, `clickhouse-copier`:
You can launch as many processes as you want, whenever and wherever you want. - Соединяется с ZooKeeper и получает:
Each process try to select the nearest available shard of source cluster and copy some part of data (partition) from it to the whole - Задания на копирование.
destination cluster (with resharding). - Состояние заданий на копирование.
Therefore it makes sense to launch cluster-copier processes on the source cluster nodes to reduce the network usage. - Выполняет задания.
Каждый запущенный процесс выбирает "ближайший" шард исходного кластера и копирует данные в кластер назначения, при необходимости перешардируя их.
Since the workers coordinate their work via ZooKeeper, in addition to `--task-path </task/path>` you have to specify ZooKeeper `clickhouse-copier` отслеживает изменения в ZooKeeper и применяет их "на лету".
cluster configuration via `--config-file <zookeeper.xml>` parameter. Example of `zookeeper.xml`:
Для снижения сетевого трафика рекомендуем запускать `clickhouse-copier` на том же сервере, где находятся исходные данные.
## Запуск clickhouse-copier
Утилиту следует запускать вручную следующим образом:
```bash
clickhouse-copier copier --daemon --config zookeeper.xml --task-path /task/path --base-dir /path/to/dir
```
Параметры запуска:
- `daemon` - запускает `clickhouse-copier` в режиме демона.
- `config` - путь к файлу `zookeeper.xml` с параметрами соединения с ZooKeeper.
- `task-path` - путь к ноде ZooKeeper. Нода используется для синхронизации между процессами `clickhouse-copier` и для хранения заданий. Задания хранятся в `$task-path/description`.
- `base-dir` - путь к логам и вспомогательным файлам. При запуске `clickhouse-copier` создает в `$base-dir` подкаталоги `clickhouse-copier_YYYYMMHHSS_<PID>`. Если параметр не указан, то каталоги будут создаваться в каталоге, где `clickhouse-copier` был запущен.
## Формат zookeeper.xml
```xml ```xml
<yandex> <yandex>
...@@ -30,11 +44,7 @@ cluster configuration via `--config-file <zookeeper.xml>` parameter. Example of ...@@ -30,11 +44,7 @@ cluster configuration via `--config-file <zookeeper.xml>` parameter. Example of
</yandex> </yandex>
``` ```
When you run `clickhouse-copier --config-file <zookeeper.xml> --task-path </task/path>` the process connects to ZooKeeper cluster, reads tasks config from `/task/path/description` and executes them. ## Конфигурация заданий на копирование
## Format of task config
Here is an example of `/task/path/description` content:
```xml ```xml
<yandex> <yandex>
...@@ -103,7 +113,8 @@ Here is an example of `/task/path/description` content: ...@@ -103,7 +113,8 @@ Here is an example of `/task/path/description` content:
specify partitions that should be copied in <enabled_partitions/>, they should be in quoted format like partition column of specify partitions that should be copied in <enabled_partitions/>, they should be in quoted format like partition column of
system.parts table. system.parts table.
--> -->
<engine>ENGINE=ReplicatedMergeTree('/clickhouse/tables/{cluster}/{shard}/hits2', '{replica}') <engine>
ENGINE=ReplicatedMergeTree('/clickhouse/tables/{cluster}/{shard}/hits2', '{replica}')
PARTITION BY toMonday(date) PARTITION BY toMonday(date)
ORDER BY (CounterID, EventDate) ORDER BY (CounterID, EventDate)
</engine> </engine>
...@@ -142,15 +153,4 @@ Here is an example of `/task/path/description` content: ...@@ -142,15 +153,4 @@ Here is an example of `/task/path/description` content:
</yandex> </yandex>
``` ```
cluster-copier processes watch for `/task/path/description` node update. `clickhouse-copier` отслеживает изменения `/task/path/description` и применяет их "на лету". Если вы поменяете, например, значение `max_workers`, то количество процессов, выполняющих задания, также изменится.
So, if you modify the config settings or `max_workers` params, they will be updated.
## Example
```bash
clickhouse-copier copier --daemon --config /path/to/copier/zookeeper.xml --task-path /clickhouse-copier/cluster1_tables_hits --base-dir /path/to/copier_logs
```
`--base-dir /path/to/copier_logs` specifies where auxilary and log files of the copier process will be saved.
In this case it will create `/path/to/copier_logs/clickhouse-copier_YYYYMMHHSS_<PID>/` dir with log and status-files.
If it is not specified it will use current dir (`/clickhouse-copier_YYYYMMHHSS_<PID>/` if it is run as a `--daemon`).
<a name="utils-clickhouse-local"/>
#clickhouse-local
Программа `clickhouse-local` позволяет выполнять быструю обработку локальных файлов, хранящих таблицы, не прибегая к развертыванию и настройке сервера ClickHouse.
# Утилиты ClickHouse # Утилиты ClickHouse
Существует несколько утилит ClickHouse, которые представляют из себя отдельные исполняемые файлы: * [clickhouse-local](clickhouse-local.md#utils-clickhouse-local) - позволяет выполнять SQL-запросы над данными без установки сервера ClickHouse подобно тому, как это делает `awk`.
* [clickhouse-copier](clickhouse-copier.md#utils-clickhouse-copier) - копирует (и перешардирует) данные с одного кластера на другой.
* `clickhouse-local` позволяет выполнять SQL-запросы над данными подобно тому, как это делает `awk`
* `clickhouse-copier` копирует (и перешардирует) неизменяемые данные с одного кластера на другой отказоустойчивым способом.
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册