From dd23de9739ffa561b6589144316392a2ca674457 Mon Sep 17 00:00:00 2001 From: liukun <451564319@qq.com> Date: Wed, 9 May 2018 15:28:58 +0800 Subject: [PATCH 1/2] update the go version --- scripts/check_requirement.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/check_requirement.sh b/scripts/check_requirement.sh index cae7df70de0ee..28cff378ca087 100755 --- a/scripts/check_requirement.sh +++ b/scripts/check_requirement.sh @@ -25,13 +25,13 @@ function install_go { echo "Intall go ..." case "$OSTYPE" in linux*) - curl -L https://storage.googleapis.com/golang/go1.9.2.linux-amd64.tar.gz -o golang.tar.gz + curl -L https://storage.googleapis.com/golang/go1.10.2.linux-amd64.tar.gz -o golang.tar.gz ${SUDO} tar -C /usr/local -xzf golang.tar.gz rm golang.tar.gz ;; darwin*) - curl -L https://storage.googleapis.com/golang/go1.9.2.darwin-amd64.tar.gz -o golang.tar.gz + curl -L https://storage.googleapis.com/golang/go1.10.2.darwin-amd64.tar.gz -o golang.tar.gz ${SUDO} tar -C /usr/local -xzf golang.tar.gz rm golang.tar.gz ;; @@ -94,8 +94,8 @@ if which go &>/dev/null; then # requires go >= 1.8 GO_VER_1=`go version | awk 'match($0, /([0-9])+(\.[0-9])+/) { ver = substr($0, RSTART, RLENGTH); split(ver, n, "."); print n[1];}'` GO_VER_2=`go version | awk 'match($0, /([0-9])+(\.[0-9])+/) { ver = substr($0, RSTART, RLENGTH); split(ver, n, "."); print n[2];}'` - if [[ (($GO_VER_1 -eq 1 && $GO_VER_2 -lt 8)) || (($GO_VER_1 -lt 1)) ]]; then - echo "Please upgrade Go to 1.8 or later." + if [[ (($GO_VER_1 -eq 1 && $GO_VER_2 -lt 10)) || (($GO_VER_1 -lt 1)) ]]; then + echo "Please upgrade Go to 1.10 or later." exit 1 fi else @@ -115,4 +115,4 @@ else install_gpp fi -echo OK \ No newline at end of file +echo OK From 812f0367c9a900b9243baafe5c5e03c3bc60fe0f Mon Sep 17 00:00:00 2001 From: liukun <451564319@qq.com> Date: Wed, 26 Sep 2018 11:42:06 +0800 Subject: [PATCH 2/2] add topsize command; change the default value of the limit to 16 --- tools/pd-control.md | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/tools/pd-control.md b/tools/pd-control.md index 7264bcd6ffc96..df542088c608f 100644 --- a/tools/pd-control.md +++ b/tools/pd-control.md @@ -463,60 +463,75 @@ Usage: ### `region topread [limit]` -Use this command to list Regions with top read flow. The default value of the limit is 10. +Use this command to list Regions with top read flow. The default value of the limit is 16. Usage: ```bash >> region topread { - "count": 10, + "count": 16, "regions": [......], } ``` ### `region topwrite [limit]` -Use this command to list Regions with top write flow. The default value of the limit is 10. +Use this command to list Regions with top write flow. The default value of the limit is 16. Usage: ```bash >> region topwrite { - "count": 10, + "count": 16, "regions": [......], } ``` ### `region topconfver [limit]` -Use this command to list Regions with top conf version. The default value of the limit is 10. +Use this command to list Regions with top conf version. The default value of the limit is 16. Usage: ```bash >> region topconfver { - "count": 10, + "count": 16, "regions": [......], } ``` ### `region topversion [limit]` -Use this command to list Regions with top version. The default value of the limit is 10. +Use this command to list Regions with top version. The default value of the limit is 16. Usage: ```bash >> region topversion { - "count": 10, + "count": 16, "regions": [......], } ``` +### `region topsize [limit]` + +Use this command to list Regions with top approximate size. The default value of the limit is 16. + +Usage: + +```bash +>> region topsize +{ + "count": 16, + "regions": [......], +} + +``` + ### `region check [miss-peer | extra-peer | down-peer | pending-peer | incorrect-ns]` Use this command to check the Regions in abnormal conditions.