Skip to content

Commit

Permalink
[skip ci] doc update (#213)
Browse files Browse the repository at this point in the history
* [skip ci] doc update
  • Loading branch information
Ryan-Git authored and ming535 committed Sep 25, 2019
1 parent 4e09412 commit dc97ba7
Show file tree
Hide file tree
Showing 12 changed files with 40 additions and 19 deletions.
2 changes: 1 addition & 1 deletion docs/2.0/00-arch-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ type Msg struct {

Gravity Cluster supports cluster deployment on Kubernetes natively. Please see [here](https://github.com/moiot/gravity-operator).

It provides Rest API to create the data synchronization task to report the task status. It manages each DRC task in the Web interface (Gravity Admin).
It provides Rest API to create the data synchronization task to report the task status. It manages each Gravity task in the Web interface (Gravity Admin).
2 changes: 1 addition & 1 deletion docs/2.0/00-arch.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ type Msg struct {

集群版本的 Gravity 原生支持 Kubernetes 上的集群部署,请查看[这里](https://github.com/moiot/gravity-operator)

集群版本 DRC 提供 Rest API 创建创建数据同步任务,汇报状态。自带 Web 界面 (DRC Admin) 管理各个 DRC 任务
集群版本 Gravity 提供 Rest API 创建创建数据同步任务,汇报状态。自带 Web 界面 (Gravity Admin) 管理各个任务

4 changes: 2 additions & 2 deletions docs/2.0/02-config-index-en.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Configuration

This document introduces how to configure DRC Single Process and DRC Cluster respectively.
This document introduces how to configure Gravity Single Process and Gravity Cluster respectively.

## Gravity Single Process

To configure Gravity Single Process, use the configuration file.

Gravity works in the plugin-based mode and each plugin has its own configuration. Currently, DRC supports the configuration file in the `toml` and `json` formats.
Gravity works in the plugin-based mode and each plugin has its own configuration. Currently, Gravity supports the configuration file in the `toml` and `json` formats.

This section uses the configuration file in the `toml` format to describe configuration rules.

Expand Down
9 changes: 5 additions & 4 deletions docs/2.0/02-config-index.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
### 配置文件

单进程的 DRC 使用配置文件来配置。
单进程的 Gravity 使用配置文件来配置。

DRC 是基于插件的微内核模式,各个插件有自己独立的配置。目前 DRC 支持以 `toml` 格式和 `json` 格式作为配置文件来配置。
Gravity 是基于插件的微内核模式,各个插件有自己独立的配置。目前 Gravity 支持以 `toml` 格式和 `json` 格式作为配置文件来配置。

本节的描述中,为了方便起见,统一使用 `toml` 格式的配置文件描述配置规则。


### Rest API

集群方式部署的 DRC 集群使用 Rest API 来启动任务,Rest API 和配置文件的 `json` 格式保持一致。
集群方式部署的 Gravity 集群使用 Rest API 来启动任务,Rest API 和配置文件的 `json` 格式保持一致。


集群方式部署提供 Web 界面配置,因此本节不再描述 Rest API 的各个选项,请参考 `toml` 格式的配置文件描述即可。
Expand All @@ -23,4 +23,5 @@ DRC 是基于插件的微内核模式,各个插件有自己独立的配置。
- [Input 配置](03-inputs.md)
- [Output 配置](04-outputs.md)
- [Filter 配置](05-filters.md)
- [Scheduler 配置](06-scheduler.md)
- [Scheduler 配置](06-scheduler.md)
- [Matcher 配置](07-matcher-en.md)
14 changes: 10 additions & 4 deletions docs/2.0/03-inputs-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,11 @@ ignore-bidirectional-data = false
#
[input.config.source]
host = "127.0.0.1"
username = "drc"
username = "_gravity"
password = ""
port = 3306
max-open = 20 # optional, max connections
max-idle = 20 # optional, suggest to be the same as max-open
# The time zone of the source MySQL cluster: https://github.com/go-sql-driver/mysql#loc
location = "Local"

Expand All @@ -75,7 +77,7 @@ binlog-gtid = "abcd:1-123,egbws:1-234"
annotation = "/*some_annotataion*/"
[input.config.source-probe-config.mysql]
host = "127.0.0.1"
username = "drc"
username = "_gravity"
password = ""
port = 3306
```
Expand All @@ -101,9 +103,11 @@ mode = "batch"
#
[input.config.source-master]
host = "127.0.0.1"
username = "drc"
username = "_gravity"
password = ""
port = 3306
max-open = 10 # optional, max connections
max-idle = 10 # optional, suggest to be the same as max-open
# The time zone of the source MySQL cluster: https://github.com/go-sql-driver/mysql#loc
location = "Local"

Expand All @@ -114,9 +118,11 @@ location = "Local"
#
[input.config.source-slave]
host = "127.0.0.1"
username = "drc"
username = "_gravity"
password = ""
port = 3306
max-open = 100 # optional, max connections
max-idle = 100 # optional, suggest to be the same as max-open
# The time zone of the source MySQL cluster: https://github.com/go-sql-driver/mysql#loc
location = "Local"

Expand Down
2 changes: 2 additions & 0 deletions docs/2.0/03-inputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ host = "127.0.0.1"
username = "_gravity"
password = ""
port = 3306
max-open = 20 # 可选,最大连接数
max-idle = 20 # 可选,最大空闲连接数,建议与 max-open 相同

#
# 开始增量同步的起始位置。
Expand Down
6 changes: 4 additions & 2 deletions docs/2.0/04-outputs-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ summary: Learn how to configure Output.

# Output Configuration

Currently, DRC supports the following Output plugins:
Currently, Gravity supports the following Output plugins:

- `async-kafka`: Sends the Input message to Kafka asynchronously.
- `mysql`: Writes data in MySQL.
Expand Down Expand Up @@ -127,6 +127,8 @@ host = "127.0.0.1"
username = ""
password = ""
port = 3306
max-open = 20 # optional, max connections
max-idle = 20 # optional, suggest to be the same as max-open

#
# The routing configuration of the target MySQL cluster. "*" is supported for `match-schema` and `match-table`.
Expand All @@ -147,7 +149,7 @@ target-table = "test_target_table"
use-bidirection = false
```

In the above configuration, if `use-bidirection` is set to "true" as follows, DRC gets the internal identifer of bidirectional synchronization when writing data in the MySQL cluster (by enwrapping the DRC internal table transaction). If `ignore-bidirectional-data` is configured in the source cluster, the write traffic in DRC can be ignored.
In the above configuration, if `use-bidirection` is set to "true" as follows, Gravity gets the internal identifier of bidirectional synchronization when writing data in the MySQL cluster (by wrapping in the Gravity internal table transaction). If `ignore-bidirectional-data` is configured in the source cluster, the write traffic from Gravity can be ignored.

```toml
[output.config.execution-engine]
Expand Down
4 changes: 3 additions & 1 deletion docs/2.0/04-outputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ host = "127.0.0.1"
username = ""
password = ""
port = 3306
max-open = 20 # 可选,最大连接数
max-idle = 20 # 可选,最大空闲连接数,建议与 max-open 相同

#
# 目标端 MySQL 路由配置;match-schema, match-table 支持 * 匹配
Expand Down Expand Up @@ -152,7 +154,7 @@ use-bidirection = false
use-bidirection = true
```

DRC 在写入目标端 MySQL 的时会打上双向同步的内部标识(通过封装 drc 内部表事务的方式),在源端配置好 `ignore-bidirectional-data` 就可以忽略 DRC 内部的写流量。
Gravity 在写入目标端 MySQL 的时会打上双向同步的内部标识(通过封装内部表事务的方式),在源端配置好 `ignore-bidirectional-data` 就可以忽略 Gravity 内部的写流量。

### Elasticsearch

Expand Down
2 changes: 1 addition & 1 deletion docs/2.0/05-filters-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ summary: Learn how to configure Filters.

Filter defines the column mutation operations on the Input message. It is configured in the array and the system executes each Filter in order.

Currently, DRC supports the following Filter plugins:
Currently, Gravity supports the following Filter plugins:

- `reject`: A blacklist filter that rejects specific messages.
- `accept`: A whitelist filter that only accept specific messages.
Expand Down
2 changes: 1 addition & 1 deletion docs/2.0/06-scheduler-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ summary: Learn how to configure Scheduler.

# Scheduler Configuration

Currently, DRC supports only one Scheduler plugin:
Currently, Gravity supports only one Scheduler plugin:

- `batch-table-scheduler`: Guarantees that update operations on the data in the same row defined by the primary key are performed in order.

Expand Down
6 changes: 5 additions & 1 deletion docs/2.0/example-mysql2mysql-full.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ host = "127.0.0.1"
username = "root"
password = ""
port = 3306
max-open = 50 # optional, max connections
max-idle = 50 # optional, suggest to be the same as max-open

[[filters]]
type = "reject"
Expand Down Expand Up @@ -63,6 +65,8 @@ host = "127.0.0.1"
username = "root"
password = ""
port = 3306
max-open = 20 # optional, max connections
max-idle = 20 # optional, suggest to be the same as max-open

[output.config.execution-engine]
use-bidirection = true
Expand All @@ -71,7 +75,7 @@ use-bidirection = true
match-schema = "test_db"
match-table = "test_table"
target-schema = "test_db"
target-table = "test_target_db"
target-table = "*"

[scheduler]
type = "batch-table-scheduler"
Expand Down
6 changes: 5 additions & 1 deletion docs/2.0/example-mysql2mysql-inc.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,14 @@ host = "127.0.0.1"
username = "root"
password = ""
port = 3306
max-open = 20 # optional, max connections
max-idle = 20 # optional, suggest to be the same as max-open

[output.config.execution-engine]
use-bidirection = true
use-shading-proxy = false
# with following two config enabled, gravity will add /*abc*/ to every statement executed, which is useful to hint db proxies
tag-internal-txn = true
sql-annotation = "abc"

[[output.config.routes]]
match-schema = "test_db"
Expand Down

0 comments on commit dc97ba7

Please sign in to comment.