From 4e0a940917c1c861ddbf64804b7bcc71bb64411a Mon Sep 17 00:00:00 2001 From: Charlotte Liu <37295236+CharLotteiu@users.noreply.github.com> Date: Mon, 2 Nov 2020 15:28:03 +0800 Subject: [PATCH 01/13] Add Vale ci job test --- .github/.vale.ini | 5 +++ .github/workflows/ci.yaml | 20 +++++++++- en/tidb-monitoring-api.md | 81 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 .github/.vale.ini create mode 100644 en/tidb-monitoring-api.md diff --git a/.github/.vale.ini b/.github/.vale.ini new file mode 100644 index 000000000..7e8e41eb6 --- /dev/null +++ b/.github/.vale.ini @@ -0,0 +1,5 @@ +StylesPath = .github/styles +MinAlertLevel = suggestion + +[*.md] +BasedOnStyles = Vale diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bb7929582..a7afc1873 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,7 +7,7 @@ jobs: pull: runs-on: ubuntu-latest steps: - - name: Check out + - name: Check out uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: @@ -27,6 +27,22 @@ jobs: - name: Verify internal link anchors run: ./hack/verify-link-anchors.sh - name: "Check unclosed tags" - run: + run: echo "checked files are $(git diff-tree --name-only --no-commit-id -r upstream/master...HEAD -- 'zh/' 'en/' '.md' ':(exclude).github/*')"; python3 ./hack/check-tags.py $(git diff-tree --name-only --no-commit-id -r upstream/master...HEAD -- 'zh/' 'en/' '.md' ':(exclude).github/*') + - name: Vale Linter + uses: errata-ai/vale-action@v1.3.0 + with: + # Optional + styles: | + https://github.com/errata-ai/Microsoft/releases/latest/download/Google.zip + + # Optional + config: https://raw.githubusercontent.com/errata-ai/vale/master/.vale.ini + + # Optional + files: __onlyModified + env: + # Required + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + diff --git a/en/tidb-monitoring-api.md b/en/tidb-monitoring-api.md new file mode 100644 index 000000000..5054d582d --- /dev/null +++ b/en/tidb-monitoring-api.md @@ -0,0 +1,81 @@ +--- +title: TiDB Monitoring API +summary: Learn the API of TiDB monitoring services. +aliases: ['/docs/dev/tidb-monitoring-api/'] +--- + +# TiDB Monitoring API + +You can use the following two types of interfaces to monitor the TiDB cluster state: + +- [The state interface](#use-the-state-interface): this interface uses the HTTP interface to get the component information. +- [The metrics interface](#use-the-metrics-interface): this interface uses Prometheus to record the detailed information of the various operations in components and views these metrics using Grafana. + +## Use the state interface + +The state interface monitors the basic information of a specific component in the TiDB cluster. It can also act as the monitor interface for Keepalive messages. In addition, the state interface for the Placement Driver (PD) can get the details of the entire TiKV cluster. + +### TiDB server + +- TiDB API address: `http://${host}:${port}` +- Default port: `10080` + +The following example uses `http://${host}:${port}/status` to get the current state of the TiDB server and to determine whether the server is alive. The result is returned in JSON format. + +```bash +curl http://127.0.0.1:10080/status +{ + connections: 0, # The current number of clients connected to the TiDB server. + version: "5.7.25-TiDB-v3.0.0-beta-250-g778c3f4a5", # The TiDB version number. + git_hash: "778c3f4a5a716880bcd1d71b257c8165685f0d70" # The Git Hash of the current TiDB code. +} +``` + +### PD server + +- PD API address: `http://${host}:${port}/pd/api/v1/${api_name}` +- Default port: `2379` +- Details about API names: see [PD API doc](https://download.pingcap.com/pd-api-v1.html) + +The PD interface provides the state of all the TiKV servers and the information about load balancing. See the following example for the information about a single-node TiKV cluster: + +```bash +curl http://127.0.0.1:2379/pd/api/v1/stores +{ + "count": 1, # The number of TiKV nodes. + "stores": [ # The list of TiKV nodes. + # The details about the single TiKV node. + { + "store": { + "id": 1, + "address": "127.0.0.1:20160", + "version": "3.0.0-beta", + "state_name": "Up" + }, + "status": { + "capacity": "20 GiB", # The total capacity. + "available": "16 GiB", # The available capacity. + "leader_count": 17, + "leader_weight": 1, + "leader_score": 17, + "leader_size": 17, + "region_count": 17, + "region_weight": 1, + "region_score": 17, + "region_size": 17, + "start_ts": "2019-03-21T14:09:32+08:00", # The starting timestamp. + "last_heartbeat_ts": "2019-03-21T14:14:22.961171958+08:00", # The timestamp of the last heartbeat. + "uptime": "4m50.961171958s" + } + } + ] +``` + +## Use the metrics interface + +The metrics interface monitors the state and performance of the entire TiDB cluster. + +- If you use TiDB Ansible to deploy the TiDB cluster, the monitoring system (Prometheus and Grafana) is deployed at the same time. +- If you use other deployment ways, [deploy Prometheus and Grafana](/deploy-monitoring-services.md) before using this interface. + +After Prometheus and Grafana are successfully deployed, [configure Grafana](/deploy-monitoring-services.md#configure-grafana). From 0b16045cc919aab9bea8d40197101045305f7f38 Mon Sep 17 00:00:00 2001 From: Charlotte Liu <37295236+CharLotteiu@users.noreply.github.com> Date: Mon, 2 Nov 2020 15:35:44 +0800 Subject: [PATCH 02/13] add test files --- en/{tidb-monitoring-api.md => test file.md} | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) rename en/{tidb-monitoring-api.md => test file.md} (83%) diff --git a/en/tidb-monitoring-api.md b/en/test file.md similarity index 83% rename from en/tidb-monitoring-api.md rename to en/test file.md index 5054d582d..7076acf8b 100644 --- a/en/tidb-monitoring-api.md +++ b/en/test file.md @@ -1,15 +1,13 @@ --- -title: TiDB Monitoring API +title: test file summary: Learn the API of TiDB monitoring services. -aliases: ['/docs/dev/tidb-monitoring-api/'] --- # TiDB Monitoring API You can use the following two types of interfaces to monitor the TiDB cluster state: -- [The state interface](#use-the-state-interface): this interface uses the HTTP interface to get the component information. -- [The metrics interface](#use-the-metrics-interface): this interface uses Prometheus to record the detailed information of the various operations in components and views these metrics using Grafana. +this interface uses Prometheus to record the detailed information of the various operations in components and views these metrics using Grafana. ## Use the state interface @@ -76,6 +74,5 @@ curl http://127.0.0.1:2379/pd/api/v1/stores The metrics interface monitors the state and performance of the entire TiDB cluster. - If you use TiDB Ansible to deploy the TiDB cluster, the monitoring system (Prometheus and Grafana) is deployed at the same time. -- If you use other deployment ways, [deploy Prometheus and Grafana](/deploy-monitoring-services.md) before using this interface. After Prometheus and Grafana are successfully deployed, [configure Grafana](/deploy-monitoring-services.md#configure-grafana). From f9562cd6273e551ffd46d82081f88bd490793d1e Mon Sep 17 00:00:00 2001 From: Charlotte Liu <37295236+CharLotteiu@users.noreply.github.com> Date: Mon, 2 Nov 2020 15:37:25 +0800 Subject: [PATCH 03/13] Update test file.md --- en/test file.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/test file.md b/en/test file.md index 7076acf8b..47502cc93 100644 --- a/en/test file.md +++ b/en/test file.md @@ -75,4 +75,4 @@ The metrics interface monitors the state and performance of the entire TiDB clus - If you use TiDB Ansible to deploy the TiDB cluster, the monitoring system (Prometheus and Grafana) is deployed at the same time. -After Prometheus and Grafana are successfully deployed, [configure Grafana](/deploy-monitoring-services.md#configure-grafana). +After Prometheus and Grafana are successfully deployed. From f44ef52be60e8fee99d6773f268739ca5d3e1d25 Mon Sep 17 00:00:00 2001 From: Charlotte Liu <37295236+CharLotteiu@users.noreply.github.com> Date: Mon, 2 Nov 2020 15:58:12 +0800 Subject: [PATCH 04/13] update files path --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a7afc1873..2fd36b3c7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -41,7 +41,7 @@ jobs: config: https://raw.githubusercontent.com/errata-ai/vale/master/.vale.ini # Optional - files: __onlyModified + files: /en env: # Required GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} From 70a9d5987c551c0880869542293388c63554e5d1 Mon Sep 17 00:00:00 2001 From: Charlotte Liu <37295236+CharLotteiu@users.noreply.github.com> Date: Mon, 2 Nov 2020 15:59:53 +0800 Subject: [PATCH 05/13] Update ci.yaml --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2fd36b3c7..575a04a77 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -35,7 +35,7 @@ jobs: with: # Optional styles: | - https://github.com/errata-ai/Microsoft/releases/latest/download/Google.zip + https://github.com/errata-ai/Google/releases/latest/download/Google.zip # Optional config: https://raw.githubusercontent.com/errata-ai/vale/master/.vale.ini From b782fb8ec551fab191665d2ea4b358c1fc01e32c Mon Sep 17 00:00:00 2001 From: Charlotte Liu <37295236+CharLotteiu@users.noreply.github.com> Date: Mon, 2 Nov 2020 16:25:59 +0800 Subject: [PATCH 06/13] Update ci.yaml --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 575a04a77..4e8c2f375 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -41,7 +41,7 @@ jobs: config: https://raw.githubusercontent.com/errata-ai/vale/master/.vale.ini # Optional - files: /en + files: ../../en env: # Required GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} From a560064ba6637e08353e742ec5cb6ef3c838d776 Mon Sep 17 00:00:00 2001 From: Charlotte Liu <37295236+CharLotteiu@users.noreply.github.com> Date: Mon, 2 Nov 2020 19:12:08 +0800 Subject: [PATCH 07/13] change to circle ci --- .circleci/config.yml | 11 +- .github/.vale.ini | 5 - .github/workflows/ci.yaml | 15 --- .vale.ini | 5 + en/test file.md | 78 ------------ en/test-file.md | 16 +++ scripts/get-styles.py | 14 ++ styles/Google/AMPM.yml | 9 ++ styles/Google/Acronyms.yml | 64 ++++++++++ styles/Google/Colons.yml | 7 + styles/Google/Contractions.yml | 30 +++++ styles/Google/DateFormat.yml | 9 ++ styles/Google/Ellipses.yml | 9 ++ styles/Google/EmDash.yml | 12 ++ styles/Google/EnDash.yml | 13 ++ styles/Google/Exclamation.yml | 7 + styles/Google/FirstPerson.yml | 13 ++ styles/Google/Gender.yml | 9 ++ styles/Google/GenderBias.yml | 45 +++++++ styles/Google/HeadingPunctuation.yml | 13 ++ styles/Google/Headings.yml | 26 ++++ styles/Google/Latin.yml | 11 ++ styles/Google/LyHyphens.yml | 14 ++ styles/Google/OptionalPlurals.yml | 12 ++ styles/Google/Ordinal.yml | 7 + styles/Google/OxfordComma.yml | 7 + styles/Google/Parens.yml | 7 + styles/Google/Passive.yml | 184 +++++++++++++++++++++++++++ styles/Google/Periods.yml | 7 + styles/Google/Quotes.yml | 7 + styles/Google/Ranges.yml | 7 + styles/Google/Semicolons.yml | 8 ++ styles/Google/Slang.yml | 11 ++ styles/Google/Spacing.yml | 8 ++ styles/Google/Spelling.yml | 8 ++ styles/Google/Units.yml | 8 ++ styles/Google/We.yml | 11 ++ styles/Google/Will.yml | 7 + styles/Google/WordList.yml | 80 ++++++++++++ styles/Google/meta.json | 4 + styles/Google/vocab.txt | 0 41 files changed, 719 insertions(+), 99 deletions(-) delete mode 100644 .github/.vale.ini create mode 100644 .vale.ini delete mode 100644 en/test file.md create mode 100644 en/test-file.md create mode 100644 scripts/get-styles.py create mode 100644 styles/Google/AMPM.yml create mode 100644 styles/Google/Acronyms.yml create mode 100644 styles/Google/Colons.yml create mode 100644 styles/Google/Contractions.yml create mode 100644 styles/Google/DateFormat.yml create mode 100644 styles/Google/Ellipses.yml create mode 100644 styles/Google/EmDash.yml create mode 100644 styles/Google/EnDash.yml create mode 100644 styles/Google/Exclamation.yml create mode 100644 styles/Google/FirstPerson.yml create mode 100644 styles/Google/Gender.yml create mode 100644 styles/Google/GenderBias.yml create mode 100644 styles/Google/HeadingPunctuation.yml create mode 100644 styles/Google/Headings.yml create mode 100644 styles/Google/Latin.yml create mode 100644 styles/Google/LyHyphens.yml create mode 100644 styles/Google/OptionalPlurals.yml create mode 100644 styles/Google/Ordinal.yml create mode 100644 styles/Google/OxfordComma.yml create mode 100644 styles/Google/Parens.yml create mode 100644 styles/Google/Passive.yml create mode 100644 styles/Google/Periods.yml create mode 100644 styles/Google/Quotes.yml create mode 100644 styles/Google/Ranges.yml create mode 100644 styles/Google/Semicolons.yml create mode 100644 styles/Google/Slang.yml create mode 100644 styles/Google/Spacing.yml create mode 100644 styles/Google/Spelling.yml create mode 100644 styles/Google/Units.yml create mode 100644 styles/Google/We.yml create mode 100644 styles/Google/Will.yml create mode 100644 styles/Google/WordList.yml create mode 100644 styles/Google/meta.json create mode 100644 styles/Google/vocab.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index 5835e0881..1e2890c66 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,16 @@ jobs: - run: name: "Lint" command: | - markdownlint . + markdownlint + - run: + name: "Vale linter" + command: | + curl -sfL https://install.goreleaser.com/github.com/ValeLint/vale.sh | sh -s v2.5.1 + vale $(git diff-tree --name-only --no-commit-id -r upstream/master...HEAD -- 'en/' '.md' ':(exclude).github/*') + + + + build: docker: diff --git a/.github/.vale.ini b/.github/.vale.ini deleted file mode 100644 index 7e8e41eb6..000000000 --- a/.github/.vale.ini +++ /dev/null @@ -1,5 +0,0 @@ -StylesPath = .github/styles -MinAlertLevel = suggestion - -[*.md] -BasedOnStyles = Vale diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4e8c2f375..556ab700b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -30,19 +30,4 @@ jobs: run: echo "checked files are $(git diff-tree --name-only --no-commit-id -r upstream/master...HEAD -- 'zh/' 'en/' '.md' ':(exclude).github/*')"; python3 ./hack/check-tags.py $(git diff-tree --name-only --no-commit-id -r upstream/master...HEAD -- 'zh/' 'en/' '.md' ':(exclude).github/*') - - name: Vale Linter - uses: errata-ai/vale-action@v1.3.0 - with: - # Optional - styles: | - https://github.com/errata-ai/Google/releases/latest/download/Google.zip - - # Optional - config: https://raw.githubusercontent.com/errata-ai/vale/master/.vale.ini - - # Optional - files: ../../en - env: - # Required - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.vale.ini b/.vale.ini new file mode 100644 index 000000000..2097f81b5 --- /dev/null +++ b/.vale.ini @@ -0,0 +1,5 @@ +StylesPath = styles +MinAlertLevel = suggestion + +[*.md] +BasedOnStyles = Google diff --git a/en/test file.md b/en/test file.md deleted file mode 100644 index 47502cc93..000000000 --- a/en/test file.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -title: test file -summary: Learn the API of TiDB monitoring services. ---- - -# TiDB Monitoring API - -You can use the following two types of interfaces to monitor the TiDB cluster state: - -this interface uses Prometheus to record the detailed information of the various operations in components and views these metrics using Grafana. - -## Use the state interface - -The state interface monitors the basic information of a specific component in the TiDB cluster. It can also act as the monitor interface for Keepalive messages. In addition, the state interface for the Placement Driver (PD) can get the details of the entire TiKV cluster. - -### TiDB server - -- TiDB API address: `http://${host}:${port}` -- Default port: `10080` - -The following example uses `http://${host}:${port}/status` to get the current state of the TiDB server and to determine whether the server is alive. The result is returned in JSON format. - -```bash -curl http://127.0.0.1:10080/status -{ - connections: 0, # The current number of clients connected to the TiDB server. - version: "5.7.25-TiDB-v3.0.0-beta-250-g778c3f4a5", # The TiDB version number. - git_hash: "778c3f4a5a716880bcd1d71b257c8165685f0d70" # The Git Hash of the current TiDB code. -} -``` - -### PD server - -- PD API address: `http://${host}:${port}/pd/api/v1/${api_name}` -- Default port: `2379` -- Details about API names: see [PD API doc](https://download.pingcap.com/pd-api-v1.html) - -The PD interface provides the state of all the TiKV servers and the information about load balancing. See the following example for the information about a single-node TiKV cluster: - -```bash -curl http://127.0.0.1:2379/pd/api/v1/stores -{ - "count": 1, # The number of TiKV nodes. - "stores": [ # The list of TiKV nodes. - # The details about the single TiKV node. - { - "store": { - "id": 1, - "address": "127.0.0.1:20160", - "version": "3.0.0-beta", - "state_name": "Up" - }, - "status": { - "capacity": "20 GiB", # The total capacity. - "available": "16 GiB", # The available capacity. - "leader_count": 17, - "leader_weight": 1, - "leader_score": 17, - "leader_size": 17, - "region_count": 17, - "region_weight": 1, - "region_score": 17, - "region_size": 17, - "start_ts": "2019-03-21T14:09:32+08:00", # The starting timestamp. - "last_heartbeat_ts": "2019-03-21T14:14:22.961171958+08:00", # The timestamp of the last heartbeat. - "uptime": "4m50.961171958s" - } - } - ] -``` - -## Use the metrics interface - -The metrics interface monitors the state and performance of the entire TiDB cluster. - -- If you use TiDB Ansible to deploy the TiDB cluster, the monitoring system (Prometheus and Grafana) is deployed at the same time. - -After Prometheus and Grafana are successfully deployed. diff --git a/en/test-file.md b/en/test-file.md new file mode 100644 index 000000000..e70296256 --- /dev/null +++ b/en/test-file.md @@ -0,0 +1,16 @@ +--- +title: test file +summary: Learn the API of TiDB monitoring services. +--- + +### Binlog replication processing unit/sync unit + +Binlog replication processing unit is the processing unit used in DM-worker to read upstream binlogs or local relay logs, and to migrate these logs to the downstream. Each subtask corresponds to a binlog replication processing unit. In the current documentation, the binlog replication processing unit is also referred to as the sync processing unit. + +### Load processing unit/load unit + +The load processing unit is the processing unit used in DM-worker to import the fully exported data to the downstream. Each subtask corresponds to a load processing unit. In the current documentation, the load processing unit is also referred to as the import processing unit. + +### Subtask + +The subtask is a part of a data migration task that is running on each DM-worker instance. In different task configurations, a single data migration task might have one subtask or multiple subtasks. \ No newline at end of file diff --git a/scripts/get-styles.py b/scripts/get-styles.py new file mode 100644 index 000000000..7393b361a --- /dev/null +++ b/scripts/get-styles.py @@ -0,0 +1,14 @@ +get_style () { + echo "Installing $2 from $1 ..." + curl -s https://api.github.com/repos/$1/$2/releases/latest \ + | grep "browser_download_url.*zip" \ + | cut -d : -f 2,3 \ + | tr -d \" \ + | wget -qi - +} + +styles=( Google ) +for i in "${styles[@]}" +do + get_style "errata-ai" $i +done \ No newline at end of file diff --git a/styles/Google/AMPM.yml b/styles/Google/AMPM.yml new file mode 100644 index 000000000..fbdc6e4f8 --- /dev/null +++ b/styles/Google/AMPM.yml @@ -0,0 +1,9 @@ +extends: existence +message: "Use 'AM' or 'PM' (preceded by a space)." +link: 'https://developers.google.com/style/word-list' +level: error +nonword: true +tokens: + - '\d{1,2}[AP]M' + - '\d{1,2} ?[ap]m' + - '\d{1,2} ?[aApP]\.[mM]\.' diff --git a/styles/Google/Acronyms.yml b/styles/Google/Acronyms.yml new file mode 100644 index 000000000..f41af0189 --- /dev/null +++ b/styles/Google/Acronyms.yml @@ -0,0 +1,64 @@ +extends: conditional +message: "Spell out '%s', if it's unfamiliar to the audience." +link: 'https://developers.google.com/style/abbreviations' +level: suggestion +ignorecase: false +# Ensures that the existence of 'first' implies the existence of 'second'. +first: '\b([A-Z]{3,5})\b' +second: '(?:\b[A-Z][a-z]+ )+\(([A-Z]{3,5})\)' +# ... with the exception of these: +exceptions: + - API + - ASP + - CLI + - CPU + - CSS + - CSV + - DEBUG + - DOM + - DPI + - FAQ + - GCC + - GDB + - GET + - GPU + - GTK + - GUI + - HTML + - HTTP + - HTTPS + - IDE + - JAR + - JSON + - JSX + - LESS + - LLDB + - NET + - NOTE + - NVDA + - OSS + - PATH + - PDF + - PHP + - POST + - RAM + - REPL + - RSA + - SCM + - SCSS + - SDK + - SQL + - SSH + - SSL + - SVG + - TBD + - TCP + - TODO + - URI + - URL + - USB + - UTF + - XML + - XSS + - YAML + - ZIP diff --git a/styles/Google/Colons.yml b/styles/Google/Colons.yml new file mode 100644 index 000000000..9a4b4b4ab --- /dev/null +++ b/styles/Google/Colons.yml @@ -0,0 +1,7 @@ +extends: existence +message: "'%s' should be in lowercase." +link: 'https://developers.google.com/style/colons' +nonword: true +level: warning +tokens: + - ':\s[A-Z]' diff --git a/styles/Google/Contractions.yml b/styles/Google/Contractions.yml new file mode 100644 index 000000000..95234987b --- /dev/null +++ b/styles/Google/Contractions.yml @@ -0,0 +1,30 @@ +extends: substitution +message: "Feel free to use '%s' instead of '%s'." +link: 'https://developers.google.com/style/contractions' +level: suggestion +ignorecase: true +action: + name: replace +swap: + are not: aren't + cannot: can't + could not: couldn't + did not: didn't + do not: don't + does not: doesn't + has not: hasn't + have not: haven't + how is: how's + is not: isn't + it is: it's + should not: shouldn't + that is: that's + they are: they're + was not: wasn't + we are: we're + we have: we've + were not: weren't + what is: what's + when is: when's + where is: where's + will not: won't diff --git a/styles/Google/DateFormat.yml b/styles/Google/DateFormat.yml new file mode 100644 index 000000000..e9d227fa1 --- /dev/null +++ b/styles/Google/DateFormat.yml @@ -0,0 +1,9 @@ +extends: existence +message: "Use 'July 31, 2016' format, not '%s'." +link: 'https://developers.google.com/style/dates-times' +ignorecase: true +level: error +nonword: true +tokens: + - '\d{1,2}(?:\.|/)\d{1,2}(?:\.|/)\d{4}' + - '\d{1,2} (?:Jan(?:uary)?|Feb(?:ruary)?|Mar(?:ch)?|Apr(?:il)|May|Jun(?:e)|Jul(?:y)|Aug(?:ust)|Sep(?:tember)?|Oct(?:ober)|Nov(?:ember)?|Dec(?:ember)?) \d{4}' diff --git a/styles/Google/Ellipses.yml b/styles/Google/Ellipses.yml new file mode 100644 index 000000000..1e070517b --- /dev/null +++ b/styles/Google/Ellipses.yml @@ -0,0 +1,9 @@ +extends: existence +message: "In general, don't use an ellipsis." +link: 'https://developers.google.com/style/ellipses' +nonword: true +level: warning +action: + name: remove +tokens: + - '\.\.\.' diff --git a/styles/Google/EmDash.yml b/styles/Google/EmDash.yml new file mode 100644 index 000000000..1befe72aa --- /dev/null +++ b/styles/Google/EmDash.yml @@ -0,0 +1,12 @@ +extends: existence +message: "Don't put a space before or after a dash." +link: 'https://developers.google.com/style/dashes' +nonword: true +level: error +action: + name: edit + params: + - remove + - ' ' +tokens: + - '\s[—–]\s' diff --git a/styles/Google/EnDash.yml b/styles/Google/EnDash.yml new file mode 100644 index 000000000..b314dc4e9 --- /dev/null +++ b/styles/Google/EnDash.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Use an em dash ('—') instead of '–'." +link: 'https://developers.google.com/style/dashes' +nonword: true +level: error +action: + name: edit + params: + - replace + - '-' + - '—' +tokens: + - '–' diff --git a/styles/Google/Exclamation.yml b/styles/Google/Exclamation.yml new file mode 100644 index 000000000..3e15181b2 --- /dev/null +++ b/styles/Google/Exclamation.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Don't use exclamation points in text." +link: 'https://developers.google.com/style/exclamation-points' +nonword: true +level: error +tokens: + - '\w!(?:\s|$)' diff --git a/styles/Google/FirstPerson.yml b/styles/Google/FirstPerson.yml new file mode 100644 index 000000000..0b7b8828c --- /dev/null +++ b/styles/Google/FirstPerson.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Avoid first-person pronouns such as '%s'." +link: 'https://developers.google.com/style/pronouns#personal-pronouns' +ignorecase: true +level: warning +nonword: true +tokens: + - (?:^|\s)I\s + - (?:^|\s)I,\s + - \bI'm\b + - \bme\b + - \bmy\b + - \bmine\b diff --git a/styles/Google/Gender.yml b/styles/Google/Gender.yml new file mode 100644 index 000000000..c8486181d --- /dev/null +++ b/styles/Google/Gender.yml @@ -0,0 +1,9 @@ +extends: existence +message: "Don't use '%s' as a gender-neutral pronoun." +link: 'https://developers.google.com/style/pronouns#gender-neutral-pronouns' +level: error +ignorecase: true +tokens: + - he/she + - s/he + - \(s\)he diff --git a/styles/Google/GenderBias.yml b/styles/Google/GenderBias.yml new file mode 100644 index 000000000..261cfb666 --- /dev/null +++ b/styles/Google/GenderBias.yml @@ -0,0 +1,45 @@ +extends: substitution +message: "Consider using '%s' instead of '%s'." +link: 'https://developers.google.com/style/inclusive-documentation' +ignorecase: true +level: error +swap: + (?:alumna|alumnus): graduate + (?:alumnae|alumni): graduates + air(?:m[ae]n|wom[ae]n): pilot(s) + anchor(?:m[ae]n|wom[ae]n): anchor(s) + authoress: author + camera(?:m[ae]n|wom[ae]n): camera operator(s) + chair(?:m[ae]n|wom[ae]n): chair(s) + congress(?:m[ae]n|wom[ae]n): member(s) of congress + door(?:m[ae]|wom[ae]n): concierge(s) + draft(?:m[ae]n|wom[ae]n): drafter(s) + fire(?:m[ae]n|wom[ae]n): firefighter(s) + fisher(?:m[ae]n|wom[ae]n): fisher(s) + fresh(?:m[ae]n|wom[ae]n): first-year student(s) + garbage(?:m[ae]n|wom[ae]n): waste collector(s) + lady lawyer: lawyer + ladylike: courteous + landlord: building manager + mail(?:m[ae]n|wom[ae]n): mail carriers + man and wife: husband and wife + man enough: strong enough + mankind: human kind + manmade: manufactured + manpower: personnel + men and girls: men and women + middle(?:m[ae]n|wom[ae]n): intermediary + news(?:m[ae]n|wom[ae]n): journalist(s) + ombuds(?:man|woman): ombuds + oneupmanship: upstaging + poetess: poet + police(?:m[ae]n|wom[ae]n): police officer(s) + repair(?:m[ae]n|wom[ae]n): technician(s) + sales(?:m[ae]n|wom[ae]n): salesperson or sales people + service(?:m[ae]n|wom[ae]n): soldier(s) + steward(?:ess)?: flight attendant + tribes(?:m[ae]n|wom[ae]n): tribe member(s) + waitress: waiter + woman doctor: doctor + woman scientist[s]?: scientist(s) + work(?:m[ae]n|wom[ae]n): worker(s) diff --git a/styles/Google/HeadingPunctuation.yml b/styles/Google/HeadingPunctuation.yml new file mode 100644 index 000000000..991330d75 --- /dev/null +++ b/styles/Google/HeadingPunctuation.yml @@ -0,0 +1,13 @@ +extends: existence +message: "Don't put a period at the end of a heading." +link: 'https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings' +nonword: true +level: warning +scope: heading +action: + name: edit + params: + - remove + - '.' +tokens: + - '[a-z0-9][.](?:\s|$)' diff --git a/styles/Google/Headings.yml b/styles/Google/Headings.yml new file mode 100644 index 000000000..5afb968d0 --- /dev/null +++ b/styles/Google/Headings.yml @@ -0,0 +1,26 @@ +extends: capitalization +message: "'%s' should use sentence-style capitalization." +link: 'https://developers.google.com/style/capitalization#capitalization-in-titles-and-headings' +level: warning +scope: heading +match: $sentence +exceptions: + - Azure + - CLI + - Code + - Cosmos + - Docker + - Emmet + - I + - Kubernetes + - Linux + - macOS + - Marketplace + - MongoDB + - REPL + - Studio + - TypeScript + - URLs + - Visual + - VS + - Windows diff --git a/styles/Google/Latin.yml b/styles/Google/Latin.yml new file mode 100644 index 000000000..d91700de3 --- /dev/null +++ b/styles/Google/Latin.yml @@ -0,0 +1,11 @@ +extends: substitution +message: "Use '%s' instead of '%s'." +link: 'https://developers.google.com/style/abbreviations' +ignorecase: true +level: error +nonword: true +action: + name: replace +swap: + '\b(?:eg|e\.g\.)[\s,]': for example + '\b(?:ie|i\.e\.)[\s,]': that is diff --git a/styles/Google/LyHyphens.yml b/styles/Google/LyHyphens.yml new file mode 100644 index 000000000..ac8f557a4 --- /dev/null +++ b/styles/Google/LyHyphens.yml @@ -0,0 +1,14 @@ +extends: existence +message: "'%s' doesn't need a hyphen." +link: 'https://developers.google.com/style/hyphens' +level: error +ignorecase: false +nonword: true +action: + name: edit + params: + - replace + - '-' + - ' ' +tokens: + - '\s[^\s-]+ly-' diff --git a/styles/Google/OptionalPlurals.yml b/styles/Google/OptionalPlurals.yml new file mode 100644 index 000000000..f858ea6fe --- /dev/null +++ b/styles/Google/OptionalPlurals.yml @@ -0,0 +1,12 @@ +extends: existence +message: "Don't use plurals in parentheses such as in '%s'." +link: 'https://developers.google.com/style/plurals-parentheses' +level: error +nonword: true +action: + name: edit + params: + - remove + - '(s)' +tokens: + - '\b\w+\(s\)' diff --git a/styles/Google/Ordinal.yml b/styles/Google/Ordinal.yml new file mode 100644 index 000000000..d1ac7d27e --- /dev/null +++ b/styles/Google/Ordinal.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Spell out all ordinal numbers ('%s') in text." +link: 'https://developers.google.com/style/numbers' +level: error +nonword: true +tokens: + - \d+(?:st|nd|rd|th) diff --git a/styles/Google/OxfordComma.yml b/styles/Google/OxfordComma.yml new file mode 100644 index 000000000..b9ba21ebb --- /dev/null +++ b/styles/Google/OxfordComma.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Use the Oxford comma in '%s'." +link: 'https://developers.google.com/style/commas' +scope: sentence +level: warning +tokens: + - '(?:[^,]+,){1,}\s\w+\s(?:and|or)' diff --git a/styles/Google/Parens.yml b/styles/Google/Parens.yml new file mode 100644 index 000000000..3b8711d0c --- /dev/null +++ b/styles/Google/Parens.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Use parentheses judiciously." +link: 'https://developers.google.com/style/parentheses' +nonword: true +level: suggestion +tokens: + - '\(.+\)' diff --git a/styles/Google/Passive.yml b/styles/Google/Passive.yml new file mode 100644 index 000000000..3265890e5 --- /dev/null +++ b/styles/Google/Passive.yml @@ -0,0 +1,184 @@ +extends: existence +link: 'https://developers.google.com/style/voice' +message: "In general, use active voice instead of passive voice ('%s')." +ignorecase: true +level: suggestion +raw: + - \b(am|are|were|being|is|been|was|be)\b\s* +tokens: + - '[\w]+ed' + - awoken + - beat + - become + - been + - begun + - bent + - beset + - bet + - bid + - bidden + - bitten + - bled + - blown + - born + - bought + - bound + - bred + - broadcast + - broken + - brought + - built + - burnt + - burst + - cast + - caught + - chosen + - clung + - come + - cost + - crept + - cut + - dealt + - dived + - done + - drawn + - dreamt + - driven + - drunk + - dug + - eaten + - fallen + - fed + - felt + - fit + - fled + - flown + - flung + - forbidden + - foregone + - forgiven + - forgotten + - forsaken + - fought + - found + - frozen + - given + - gone + - gotten + - ground + - grown + - heard + - held + - hidden + - hit + - hung + - hurt + - kept + - knelt + - knit + - known + - laid + - lain + - leapt + - learnt + - led + - left + - lent + - let + - lighted + - lost + - made + - meant + - met + - misspelt + - mistaken + - mown + - overcome + - overdone + - overtaken + - overthrown + - paid + - pled + - proven + - put + - quit + - read + - rid + - ridden + - risen + - run + - rung + - said + - sat + - sawn + - seen + - sent + - set + - sewn + - shaken + - shaven + - shed + - shod + - shone + - shorn + - shot + - shown + - shrunk + - shut + - slain + - slept + - slid + - slit + - slung + - smitten + - sold + - sought + - sown + - sped + - spent + - spilt + - spit + - split + - spoken + - spread + - sprung + - spun + - stolen + - stood + - stridden + - striven + - struck + - strung + - stuck + - stung + - stunk + - sung + - sunk + - swept + - swollen + - sworn + - swum + - swung + - taken + - taught + - thought + - thrived + - thrown + - thrust + - told + - torn + - trodden + - understood + - upheld + - upset + - wed + - wept + - withheld + - withstood + - woken + - won + - worn + - wound + - woven + - written + - wrung diff --git a/styles/Google/Periods.yml b/styles/Google/Periods.yml new file mode 100644 index 000000000..d24a6a6c0 --- /dev/null +++ b/styles/Google/Periods.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Don't use periods with acronyms or initialisms such as '%s'." +link: 'https://developers.google.com/style/abbreviations' +level: error +nonword: true +tokens: + - '\b(?:[A-Z]\.){3,}' diff --git a/styles/Google/Quotes.yml b/styles/Google/Quotes.yml new file mode 100644 index 000000000..3cb6f1abd --- /dev/null +++ b/styles/Google/Quotes.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Commas and periods go inside quotation marks." +link: 'https://developers.google.com/style/quotation-marks' +level: error +nonword: true +tokens: + - '"[^"]+"[.,?]' diff --git a/styles/Google/Ranges.yml b/styles/Google/Ranges.yml new file mode 100644 index 000000000..3ec045e77 --- /dev/null +++ b/styles/Google/Ranges.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Don't add words such as 'from' or 'between' to describe a range of numbers." +link: 'https://developers.google.com/style/hyphens' +nonword: true +level: warning +tokens: + - '(?:from|between)\s\d+\s?-\s?\d+' diff --git a/styles/Google/Semicolons.yml b/styles/Google/Semicolons.yml new file mode 100644 index 000000000..bb8b85b42 --- /dev/null +++ b/styles/Google/Semicolons.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Use semicolons judiciously." +link: 'https://developers.google.com/style/semicolons' +nonword: true +scope: sentence +level: suggestion +tokens: + - ';' diff --git a/styles/Google/Slang.yml b/styles/Google/Slang.yml new file mode 100644 index 000000000..63f4c248a --- /dev/null +++ b/styles/Google/Slang.yml @@ -0,0 +1,11 @@ +extends: existence +message: "Don't use internet slang abbreviations such as '%s'." +link: 'https://developers.google.com/style/abbreviations' +ignorecase: true +level: error +tokens: + - 'tl;dr' + - ymmv + - rtfm + - imo + - fwiw diff --git a/styles/Google/Spacing.yml b/styles/Google/Spacing.yml new file mode 100644 index 000000000..5f209a9f9 --- /dev/null +++ b/styles/Google/Spacing.yml @@ -0,0 +1,8 @@ +extends: existence +message: "'%s' should have one space." +link: 'https://developers.google.com/style/sentence-spacing' +level: error +nonword: true +tokens: + - '[.?!] {2,}[A-Z]' + - '[.?!][A-Z]' diff --git a/styles/Google/Spelling.yml b/styles/Google/Spelling.yml new file mode 100644 index 000000000..57acb8841 --- /dev/null +++ b/styles/Google/Spelling.yml @@ -0,0 +1,8 @@ +extends: existence +message: "In general, use American spelling instead of '%s'." +link: 'https://developers.google.com/style/spelling' +ignorecase: true +level: warning +tokens: + - '(?:\w+)nised?' + - '(?:\w+)logue' diff --git a/styles/Google/Units.yml b/styles/Google/Units.yml new file mode 100644 index 000000000..379fad6b8 --- /dev/null +++ b/styles/Google/Units.yml @@ -0,0 +1,8 @@ +extends: existence +message: "Put a nonbreaking space between the number and the unit in '%s'." +link: 'https://developers.google.com/style/units-of-measure' +nonword: true +level: error +tokens: + - \d+(?:B|kB|MB|GB|TB) + - \d+(?:ns|ms|s|min|h|d) diff --git a/styles/Google/We.yml b/styles/Google/We.yml new file mode 100644 index 000000000..c7ac7d362 --- /dev/null +++ b/styles/Google/We.yml @@ -0,0 +1,11 @@ +extends: existence +message: "Try to avoid using first-person plural like '%s'." +link: 'https://developers.google.com/style/pronouns#personal-pronouns' +level: warning +ignorecase: true +tokens: + - we + - we'(?:ve|re) + - ours? + - us + - let's diff --git a/styles/Google/Will.yml b/styles/Google/Will.yml new file mode 100644 index 000000000..128a91836 --- /dev/null +++ b/styles/Google/Will.yml @@ -0,0 +1,7 @@ +extends: existence +message: "Avoid using '%s'." +link: 'https://developers.google.com/style/tense' +ignorecase: true +level: warning +tokens: + - will diff --git a/styles/Google/WordList.yml b/styles/Google/WordList.yml new file mode 100644 index 000000000..bb711517e --- /dev/null +++ b/styles/Google/WordList.yml @@ -0,0 +1,80 @@ +extends: substitution +message: "Use '%s' instead of '%s'." +link: 'https://developers.google.com/style/word-list' +level: warning +ignorecase: false +action: + name: replace +swap: + '(?:API Console|dev|developer) key': API key + '(?:cell ?phone|smart ?phone)': phone|mobile phone + '(?:dev|developer|APIs) console': API console + '(?:e-mail|Email|E-mail)': email + '(?:file ?path|path ?name)': path + '(?:kill|terminate|abort)': stop|exit|cancel|end + '(?:OAuth ?2|Oauth)': OAuth 2.0 + '(?:ok|Okay)': OK|okay + '(?:WiFi|wifi)': Wi-Fi + '[\.]+apk': APK + '3\-D': 3D + 'Google (?:I\-O|IO)': Google I/O + 'tap (?:&|and) hold': touch & hold + 'un(?:check|select)': clear + above: preceding + account name: username + action bar: app bar + admin: administrator + Ajax: AJAX + Android device: Android-powered device + android: Android + API explorer: APIs Explorer + application: app + approx\.: approximately + authN: authentication + authZ: authorization + autoupdate: automatically update + cellular data: mobile data + cellular network: mobile network + chapter: documents|pages|sections + check box: checkbox + check: select + CLI: command-line tool + click on: click|click in + Cloud: Google Cloud Platform|GCP + Container Engine: Kubernetes Engine + content type: media type + curated roles: predefined roles + data are: data is + Developers Console: Google API Console|API Console + disabled?: turn off|off + ephemeral IP address: ephemeral external IP address + fewer data: less data + file name: filename + firewalls: firewall rules + functionality: capability|feature + Google account: Google Account + Google accounts: Google Accounts + Googling: search with Google + grayed-out: unavailable + HTTPs: HTTPS + in order to: to + ingest: import|load + k8s: Kubernetes + long press: touch & hold + network IP address: internal IP address + omnibox: address bar + open-source: open source + overview screen: recents screen + regex: regular expression + SHA1: SHA-1|HAS-SHA1 + sign into: sign in to + sign-?on: single sign-on + static IP address: static external IP address + stylesheet: style sheet + synch: sync + tablename: table name + tablet: device + touch: tap + url: URL + vs\.: versus + World Wide Web: web diff --git a/styles/Google/meta.json b/styles/Google/meta.json new file mode 100644 index 000000000..a5da2a848 --- /dev/null +++ b/styles/Google/meta.json @@ -0,0 +1,4 @@ +{ + "feed": "https://github.com/errata-ai/Google/releases.atom", + "vale_version": ">=1.0.0" +} diff --git a/styles/Google/vocab.txt b/styles/Google/vocab.txt new file mode 100644 index 000000000..e69de29bb From fd9e74dea76bf3f6559982c71da97e11a9abd9f9 Mon Sep 17 00:00:00 2001 From: Charlotte Liu <37295236+CharLotteiu@users.noreply.github.com> Date: Mon, 2 Nov 2020 19:19:42 +0800 Subject: [PATCH 08/13] Update .circleci/config.yml Co-authored-by: Keke Yi <40977455+yikeke@users.noreply.github.com> --- .circleci/config.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1e2890c66..9028f6641 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,17 +14,13 @@ jobs: - run: name: "Lint" command: | - markdownlint + markdownlint . - run: name: "Vale linter" command: | curl -sfL https://install.goreleaser.com/github.com/ValeLint/vale.sh | sh -s v2.5.1 vale $(git diff-tree --name-only --no-commit-id -r upstream/master...HEAD -- 'en/' '.md' ':(exclude).github/*') - - - - build: docker: - image: andelf/doc-build:0.1.9 From c7e501cb445e3410c10ae0ff7cea64358fc48b19 Mon Sep 17 00:00:00 2001 From: Charlotte Liu <37295236+CharLotteiu@users.noreply.github.com> Date: Mon, 2 Nov 2020 19:26:52 +0800 Subject: [PATCH 09/13] Update config.yml --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9028f6641..6c13b8828 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,6 +18,8 @@ jobs: - run: name: "Vale linter" command: | + git remote add upstream https://github.com/pingcap/docs-dm.git + git fetch upstream curl -sfL https://install.goreleaser.com/github.com/ValeLint/vale.sh | sh -s v2.5.1 vale $(git diff-tree --name-only --no-commit-id -r upstream/master...HEAD -- 'en/' '.md' ':(exclude).github/*') From 62a103943f25c988735661fb4bf5b19b16f7538d Mon Sep 17 00:00:00 2001 From: Charlotte Liu <37295236+CharLotteiu@users.noreply.github.com> Date: Mon, 2 Nov 2020 19:28:59 +0800 Subject: [PATCH 10/13] Update config.yml --- .circleci/config.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6c13b8828..5de80f709 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,18 +3,29 @@ version: 2 jobs: lint: docker: - - image: circleci/ruby:2.4.1-node + - image: circleci/node:lts working_directory: ~/pingcap/docs-dm steps: - checkout + + - run: + name: Setup + command: | + mkdir ~/.npm-global + npm config set prefix '~/.npm-global' + echo 'export PATH=~/.npm-global/bin:$PATH' >> $BASH_ENV + echo 'export NODE_PATH=~/.npm-global/lib/node_modules:$NODE_PATH' >> $BASH_ENV + - run: name: "Install markdownlint" command: | sudo npm install -g markdownlint-cli@0.17.0 + - run: name: "Lint" command: | markdownlint . + - run: name: "Vale linter" command: | From 40c6020f2cc8d4e9693c9445c3e657bb5f397c2c Mon Sep 17 00:00:00 2001 From: Charlotte Liu <37295236+CharLotteiu@users.noreply.github.com> Date: Tue, 3 Nov 2020 11:43:26 +0800 Subject: [PATCH 11/13] Update test-file.md --- en/test-file.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/en/test-file.md b/en/test-file.md index e70296256..761158165 100644 --- a/en/test-file.md +++ b/en/test-file.md @@ -13,4 +13,8 @@ The load processing unit is the processing unit used in DM-worker to import the ### Subtask -The subtask is a part of a data migration task that is running on each DM-worker instance. In different task configurations, a single data migration task might have one subtask or multiple subtasks. \ No newline at end of file +The subtask is a part of a data migration task that is running on each DM-worker instance. In different task configurations, a single data migration task might have one subtask or multiple subtasks. + +### Subtask status + +The subtask status is the status of a data migration subtask. The current status options include `New`, `Running`, `Paused`, `Stopped`, and `Finished`. Refer to [subtask status](query-status.md#subtask-status) for more details about the status of a data migration task or subtask. \ No newline at end of file From 115451b67a432156bcdade45a499eb26dd58532c Mon Sep 17 00:00:00 2001 From: Charlotte Liu <37295236+CharLotteiu@users.noreply.github.com> Date: Tue, 3 Nov 2020 14:04:02 +0800 Subject: [PATCH 12/13] Update test-file.md --- en/test-file.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/en/test-file.md b/en/test-file.md index 761158165..ed1f6801e 100644 --- a/en/test-file.md +++ b/en/test-file.md @@ -17,4 +17,8 @@ The subtask is a part of a data migration task that is running on each DM-worker ### Subtask status -The subtask status is the status of a data migration subtask. The current status options include `New`, `Running`, `Paused`, `Stopped`, and `Finished`. Refer to [subtask status](query-status.md#subtask-status) for more details about the status of a data migration task or subtask. \ No newline at end of file +The subtask status is the status of a data migration subtask. The current status options include `New`, `Running`, `Paused`, `Stopped`, and `Finished`. Refer to [subtask status](query-status.md#subtask-status) for more details about the status of a data migration task or subtask. + +### `rows` + +Setting the `rows` option enables concurrently exporting data from a single table using multi-thread. The value of `rows` is the maximum number of rows contained in each exported chunk. After this option is enabled, DM selects a column as the split benchmark when the data of a MySQL single table is concurrently exported. This column can be one of the following columns: the primary key column, the unique index column, and the normal index column (ordered from highest priority to lowest). Make sure this column is of integer type (for example, `INT`, `MEDIUMINT`, `BIGINT`). \ No newline at end of file From 9b0d01091487694fa89c09890c0cf21b5ab2ead8 Mon Sep 17 00:00:00 2001 From: Charlotte Liu <37295236+CharLotteiu@users.noreply.github.com> Date: Tue, 3 Nov 2020 14:08:34 +0800 Subject: [PATCH 13/13] Update config.yml --- .circleci/config.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5de80f709..9f6d8272b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,19 +3,11 @@ version: 2 jobs: lint: docker: - - image: circleci/node:lts + - image: circleci/ruby:2.4.1-node working_directory: ~/pingcap/docs-dm steps: - checkout - - run: - name: Setup - command: | - mkdir ~/.npm-global - npm config set prefix '~/.npm-global' - echo 'export PATH=~/.npm-global/bin:$PATH' >> $BASH_ENV - echo 'export NODE_PATH=~/.npm-global/lib/node_modules:$NODE_PATH' >> $BASH_ENV - - run: name: "Install markdownlint" command: |