This is an automated email from the ASF dual-hosted git repository. luzhijing pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 0b86d07c0c [Docs](docs) Update BE http documents (#17604) 0b86d07c0c is described below commit 0b86d07c0c3e47fd0ba8013d9072a6a33887e4a3 Author: xiaojunjie <xiaojun...@baidu.com> AuthorDate: Fri Jun 2 18:01:44 2023 +0800 [Docs](docs) Update BE http documents (#17604) --- .../http-actions/be/check-reset-rpc-cache.md | 47 ----- .../be/{restore-tablet.md => check-rpc-channel.md} | 52 +++-- .../http-actions/be/check-tablet-segment-action.md | 53 ------ .../http-actions/be/check-tablet-segment.md | 72 +++++++ .../be/{restore-tablet.md => checksum.md} | 45 +++-- .../http-actions/be/compaction-action.md | 211 --------------------- .../admin-manual/http-actions/be/compaction-run.md | 129 +++++++++++++ .../http-actions/be/compaction-status.md | 112 +++++++++++ .../be/{restore-tablet.md => config.md} | 61 ++++-- .../be/{restore-tablet.md => download.md} | 40 ++-- .../admin-manual/http-actions/be/get-tablets.md | 65 ------- .../be/{restore-tablet.md => health.md} | 38 ++-- .../http-actions/be/{restore-tablet.md => meta.md} | 54 ++++-- .../be/{restore-tablet.md => metrics.md} | 48 +++-- .../admin-manual/http-actions/be/pad-rowset.md | 49 +++-- .../be/{restore-tablet.md => reset-rpc-channel.md} | 48 +++-- .../be/{restore-tablet.md => snapshot.md} | 43 +++-- .../http-actions/be/tablet-distribution.md | 92 +++++++++ .../admin-manual/http-actions/be/tablet-info.md | 78 ++++++++ ...let-migration-action.md => tablet-migration.md} | 70 ++++--- .../be/{restore-tablet.md => tablet-reload.md} | 46 +++-- .../be/{restore-tablet.md => tablet-restore.md} | 46 +++-- .../http-actions/be/tablets_distribution.md | 124 ------------ .../{be-version-info-action.md => version-info.md} | 38 +--- docs/sidebars.json | 26 ++- .../http-actions/be/check-reset-rpc-cache.md | 46 ----- .../be/{pad_rowset.md => check-rpc-channel.md} | 54 ++++-- ...t-segment-action.md => check-tablet-segment.md} | 65 ++++--- .../be/{restore-tablet.md => checksum.md} | 47 +++-- .../admin-manual/http-actions/be/compaction-run.md | 132 +++++++++++++ .../{compaction-action.md => compaction-status.md} | 144 +++----------- .../http-actions/be/{pad_rowset.md => config.md} | 63 ++++-- .../http-actions/be/{pad_rowset.md => download.md} | 42 ++-- .../admin-manual/http-actions/be/get-tablets.md | 65 ------- .../docs/admin-manual/http-actions/be/health.md} | 38 ++-- .../http-actions/be/{pad_rowset.md => meta.md} | 56 ++++-- .../http-actions/be/{pad_rowset.md => metrics.md} | 50 +++-- .../be/{restore-tablet.md => pad-rowset.md} | 51 +++-- .../be/{pad_rowset.md => reset-rpc-channel.md} | 51 +++-- .../docs/admin-manual/http-actions/be/snapshot.md} | 45 +++-- .../http-actions/be/tablet-distribution.md | 92 +++++++++ .../admin-manual/http-actions/be/tablet-info.md | 78 ++++++++ ...let-migration-action.md => tablet-migration.md} | 56 ++++-- .../admin-manual/http-actions/be/tablet-reload.md} | 48 +++-- .../http-actions/be/tablet-restore.md} | 48 +++-- .../http-actions/be/tablets_distribution.md | 124 ------------ .../{be-version-info-action.md => version-info.md} | 28 +-- 47 files changed, 1844 insertions(+), 1266 deletions(-) diff --git a/docs/en/docs/admin-manual/http-actions/be/check-reset-rpc-cache.md b/docs/en/docs/admin-manual/http-actions/be/check-reset-rpc-cache.md deleted file mode 100644 index 35dac165c6..0000000000 --- a/docs/en/docs/admin-manual/http-actions/be/check-reset-rpc-cache.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -{ - "title": "CHECK/RESET Stub Cache", - "language": "en" -} ---- - -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -# CHECK/RESET Stub Cache -## description - -### Check Stub Cache - Check whether the connection cache is available - - Description: Check whether the connection cache is available, the maximum load is 10M - METHOD: GET - URI: http://be_host:be_http_port/api/check_rpc_channel/{host_to_check}/{remot_brpc_port}/{payload_size} - -### Reset Stub Cache - This api is used to reset the connection cache of brpc. Endpoints can be in the form of `all` to clear all caches, `host1:port1,host2:port2,...`: clear to the cache of the specified target - - Description: Reset connection cache - METHOD: GET - URI: http://be_host:be_http_port/api/reset_rpc_channel/{endpoints} -## example - - curl -X GET "http://host:port/api/check_rpc_channel/host2/8060/1024000" - curl -X GET "http://host:port/api/reset_rpc_channel/all" - diff --git a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md b/docs/en/docs/admin-manual/http-actions/be/check-rpc-channel.md similarity index 53% copy from docs/en/docs/admin-manual/http-actions/be/restore-tablet.md copy to docs/en/docs/admin-manual/http-actions/be/check-rpc-channel.md index df6c8867d0..995c841e6d 100644 --- a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md +++ b/docs/en/docs/admin-manual/http-actions/be/check-rpc-channel.md @@ -1,6 +1,6 @@ --- { - "title": "RESTORE TABLET", + "title": "Check Stub Cache", "language": "en" } --- @@ -24,18 +24,48 @@ specific language governing permissions and limitations under the License. --> -# RESTORE TABLET -## description - - To restore the tablet data from trash dir on BE +# CHECK Stub Cache - METHOD: POST - URI: http://be_host:be_http_port/api/restore_tablet?tablet_id=xxx&schema_hash=xxx +## Request -## example +`GET /api/check_rpc_channel/{host_to_check}/{remot_brpc_port}/{payload_size}` - curl -X POST "http://hostname:8088/api/restore_tablet?tablet_id=123456\&schema_hash=1111111" +## Description -## keyword +Check whether the connection cache is available + +## Path parameters + +* `host_to_check` + + Host to check + +* `remot_brpc_port` + + Remot brpc port + +* `payload_size` + + Load size, unit: B, value range 1~1024000. + +## Request body + +None + +## Response + + ``` + { + "msg":"success", + "code":0, + "data": "open brpc connection to {host_to_check}:{remot_brpc_port} succcess.", + "count":0 + } + ``` +## Examples + + + ``` + curl http://127.0.0.1:8040/api/be_version_info/127.0.0.1/8888/1024000 + ``` - RESTORE,TABLET,RESTORE,TABLET diff --git a/docs/en/docs/admin-manual/http-actions/be/check-tablet-segment-action.md b/docs/en/docs/admin-manual/http-actions/be/check-tablet-segment-action.md deleted file mode 100644 index 1a46baedcc..0000000000 --- a/docs/en/docs/admin-manual/http-actions/be/check-tablet-segment-action.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -{ - "title": "CHECK ALL TABLET SEGMENT LOST", - "language": "en" -} ---- - -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -# CHECK ALL TABLET SEGMENT LOST - -There may be some exceptions that cause segment to be lost on BE node. However, the metadata shows that the tablet is normal. This abnormal replica is not detected by FE and cannot be automatically repaired. -When query comes, exception information is thrown that `failed to initialize storage reader`. The function of this interface is to check all tablets on the current BE node that have lost segment. - -``` -curl -X POST http://be_host:webserver_port/api/check_tablet_segment_lost?repair=xxx -``` - -When parameter `repair` is set to `true`, tablets with lost segment will be set to `SHUTDOWN` status and treated as bad replica, which can be detected and repaired by FE. Otherwise, all tablets with missing segment are returned and nothing is done. - -The return is all tablets on the current BE node that have lost segment: - -``` -{ - status: "Success", - msg: "Succeed to check all tablet segment", - num: 3, - bad_tablets: [ - 11190, - 11210, - 11216 - ], - set_bad: true, - host: "172.3.0.101" -} -``` \ No newline at end of file diff --git a/docs/en/docs/admin-manual/http-actions/be/check-tablet-segment.md b/docs/en/docs/admin-manual/http-actions/be/check-tablet-segment.md new file mode 100644 index 0000000000..675f90afa4 --- /dev/null +++ b/docs/en/docs/admin-manual/http-actions/be/check-tablet-segment.md @@ -0,0 +1,72 @@ +--- +{ + "title": "Check All Tablet Segment Lost", + "language": "en" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +# Check All Tablet Segment Lost + +## Request + +`GET /api/check_tablet_segment_lost?repair={bool}` + +## Description + +There may be some exceptions that cause segment to be lost on BE node. However, the metadata shows that the tablet is normal. This abnormal replica is not detected by FE and cannot be automatically repaired. When query comes, exception information is thrown that `failed to initialize storage reader`. The function of this interface is to check all tablets on the current BE node that have lost segment. + +## Query parameters + +* `repair` + - `true`: tablets with lost segment will be set to SHUTDOWN status and treated as bad replica, which can be detected and repaired by FE. + - `false`: all tablets with missing segment are returned and nothing is done. + +## Request body + +None + +## Response + + The return is all tablets on the current BE node that have lost segment: + + ``` + { + status: "Success", + msg: "Succeed to check all tablet segment", + num: 3, + bad_tablets: [ + 11190, + 11210, + 11216 + ], + set_bad: true, + host: "172.3.0.101" + } + ``` + +## Examples + + + ``` + curl http://127.0.0.1:8040/api/check_tablet_segment_lost?repair=false + ``` + diff --git a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md b/docs/en/docs/admin-manual/http-actions/be/checksum.md similarity index 62% copy from docs/en/docs/admin-manual/http-actions/be/restore-tablet.md copy to docs/en/docs/admin-manual/http-actions/be/checksum.md index df6c8867d0..fa529f4160 100644 --- a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md +++ b/docs/en/docs/admin-manual/http-actions/be/checksum.md @@ -1,6 +1,6 @@ --- { - "title": "RESTORE TABLET", + "title": "Checksum", "language": "en" } --- @@ -24,18 +24,41 @@ specific language governing permissions and limitations under the License. --> -# RESTORE TABLET -## description - - To restore the tablet data from trash dir on BE +# Checksum - METHOD: POST - URI: http://be_host:be_http_port/api/restore_tablet?tablet_id=xxx&schema_hash=xxx +## Request -## example +`GET /api/checksum?tablet_id={int}&version={int}&schema_hash={int}` - curl -X POST "http://hostname:8088/api/restore_tablet?tablet_id=123456\&schema_hash=1111111" +## Description -## keyword +Checksum + +## Query parameters + +* `tablet_id` + ID of the tablet to be checked + +* `version` + Version of the tablet to be verified + +* `schema_hash` + Schema hash + +## Request body + +None + +## Response + + ``` + 1843743562 + ``` +## Examples + + + ``` + curl "http://127.0.0.1:8040/api/checksum?tablet_id=1&version=1&schema_hash=-1" + + ``` - RESTORE,TABLET,RESTORE,TABLET diff --git a/docs/en/docs/admin-manual/http-actions/be/compaction-action.md b/docs/en/docs/admin-manual/http-actions/be/compaction-action.md deleted file mode 100644 index 40a7e6b867..0000000000 --- a/docs/en/docs/admin-manual/http-actions/be/compaction-action.md +++ /dev/null @@ -1,211 +0,0 @@ ---- -{ - "title": "Compaction Action", - "language": "en" -} ---- - -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -# Compaction Action - -This API is used to view the overall compaction status of a BE node or the compaction status of a specified tablet. It can also be used to manually trigger Compaction. - -## View Compaction status - -### The overall compaction status of the node - -``` -curl -X GET http://be_host:webserver_port/api/compaction/run_status -``` - -Return JSON: - -``` -{ - "CumulativeCompaction": { - "/home/disk1" : [10001, 10002], - "/home/disk2" : [10003] - }, - "BaseCompaction": { - "/home/disk1" : [10001, 10002], - "/home/disk2" : [10003] - } -} -``` - -This structure represents the id of the tablet that is performing the compaction task in a certain data directory, and the type of compaction. - -### Specify the compaction status of the tablet - -``` -curl -X GET http://be_host:webserver_port/api/compaction/show?tablet_id=xxxx -``` - -If the tablet does not exist, an error in JSON format is returned: - -``` -{ - "status": "Fail", - "msg": "Tablet not found" -} -``` - -If the tablet exists, the result is returned in JSON format: - -``` -{ - "cumulative policy type": "SIZE_BASED", - "cumulative point": 50, - "last cumulative failure time": "2019-12-16 18:13:43.224", - "last base failure time": "2019-12-16 18:13:23.320", - "last cumu success time": "2019-12-16 18:12:15.110", - "last base success time": "2019-12-16 18:11:50.780", - "rowsets": [ - "[0-48] 10 DATA OVERLAPPING 574.00 MB", - "[49-49] 2 DATA OVERLAPPING 574.00 B", - "[50-50] 0 DELETE NONOVERLAPPING 574.00 B", - "[51-51] 5 DATA OVERLAPPING 574.00 B" - ], - "missing_rowsets": [], - "stale version path": [ - { - "path id": "2", - "last create time": "2019-12-16 18:11:15.110 +0800", - "path list": "2-> [0-24] -> [25-48]" - }, - { - "path id": "1", - "last create time": "2019-12-16 18:13:15.110 +0800", - "path list": "1-> [25-40] -> [40-48]" - } - ] -} -``` - -Explanation of results: - -* cumulative policy type: The cumulative compaction policy type which is used by current tablet. -* cumulative point: The version boundary between base and cumulative compaction. Versions before (excluding) points are handled by base compaction. Versions after (inclusive) are handled by cumulative compaction. -* last cumulative failure time: The time when the last cumulative compaction failed. After 10 minutes by default, cumulative compaction is attempted on the this tablet again. -* last base failure time: The time when the last base compaction failed. After 10 minutes by default, base compaction is attempted on the this tablet again. -* rowsets: The current rowsets collection of this tablet. [0-48] means a rowset with version 0-48. The second number is the number of segments in a rowset. The `DELETE` indicates the delete version. `OVERLAPPING` and `NONOVERLAPPING` indicates whether data between segments is overlap. -* missing_rowset: The missing rowsets. -* stale version path: The merged version path of the rowset collection currently merged in the tablet. It is an array structure and each element represents a merged path. Each element contains three attributes: path id indicates the version path id, and last create time indicates the creation time of the most recent rowset on the path. By default, all rowsets on this path will be deleted after half an hour at the last create time. - -### Examples - -``` -curl -X GET http://192.168.10.24:8040/api/compaction/show?tablet_id=10015 -``` - -## Manually trigger Compaction - -``` -curl -X POST http://be_host:webserver_port/api/compaction/run?tablet_id=xxxx\&compact_type=cumulative -``` - -The only one manual compaction task that can be performed at a moment, and the value range of compact_type is base or cumulative - -If the tablet does not exist, an error in JSON format is returned: - -``` -{ - "status": "Fail", - "msg": "Tablet not found" -} -``` - -If the compaction execution task fails to be triggered, an error in JSON format is returned: - -``` -{ - "status": "Fail", - "msg": "fail to execute compaction, error = -2000" -} -``` - -If the compaction execution task successes to be triggered, an error in JSON format is returned: - -``` -{ - "status": "Success", - "msg": "compaction task is successfully triggered." -} -``` - -Explanation of results: - -* status: Trigger task status, when it is successfully triggered, it is Success; when for some reason (for example, the appropriate version is not obtained), it returns Fail. -* msg: Give specific success or failure information. - -### Examples - -``` -curl -X POST http://192.168.10.24:8040/api/compaction/run?tablet_id=10015\&compact_type=cumulative -``` - -## Manual Compaction execution status - -``` -curl -X GET http://be_host:webserver_port/api/compaction/run_status?tablet_id=xxxx -``` -If the tablet does not exist, an error in JSON format is returned: - -``` -{ - "status": "Fail", - "msg": "Tablet not found" -} -``` - -If the tablet exists and the tablet is not running, JSON format is returned: - -``` -{ - "status" : "Success", - "run_status" : false, - "msg" : "this tablet_id is not running", - "tablet_id" : 11308, - "compact_type" : "" -} -``` - -If the tablet exists and the tablet is running, JSON format is returned: - -``` -{ - "status" : "Success", - "run_status" : true, - "msg" : "this tablet_id is running", - "tablet_id" : 11308, - "compact_type" : "cumulative" -} -``` - -Explanation of results: - -* run_status: Get the current manual compaction task execution status. - -### Examples - -``` -curl -X GET http://192.168.10.24:8040/api/compaction/run_status?tablet_id=10015 - diff --git a/docs/en/docs/admin-manual/http-actions/be/compaction-run.md b/docs/en/docs/admin-manual/http-actions/be/compaction-run.md new file mode 100644 index 0000000000..a1944acd9b --- /dev/null +++ b/docs/en/docs/admin-manual/http-actions/be/compaction-run.md @@ -0,0 +1,129 @@ +--- +{ + "title": "Manually Trigger Compaction", + "language": "en" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +# Manually Trigger Compaction + +## Request + +`POST /api/compaction/run?tablet_id={int}&compact_type={enum}` +`GET /api/compaction/run_status?tablet_id={int}` + + +## Description + +Used to manually trigger the comparison and show status. + +## Query parameters + +* `tablet_id` + - ID of the tablet + +* `compact_type` + - The value is `base` or `cumulative` + +## Request body + +None + +## Response + +### Trigger Compaction + +If the tablet does not exist, an error in JSON format is returned: + +``` +{ + "status": "Fail", + "msg": "Tablet not found" +} +``` + +If the tablet exists and the tablet is not running, JSON format is returned: + +``` +{ + "status": "Fail", + "msg": "fail to execute compaction, error = -2000" +} +``` + +If the tablet exists and the tablet is running, JSON format is returned: + +``` +{ + "status": "Success", + "msg": "compaction task is successfully triggered." +} +``` + +Explanation of results: + +* status: Trigger task status, when it is successfully triggered, it is Success; when for some reason (for example, the appropriate version is not obtained), it returns Fail. +* msg: Give specific success or failure information. + +### Show Status + +If the tablet does not exist, an error in JSON format is returned: +``` +{ + "status": "Fail", + "msg": "Tablet not found" +} +``` +If the tablet exists and the tablet is not running, JSON format is returned: + +``` +{ + "status" : "Success", + "run_status" : false, + "msg" : "this tablet_id is not running", + "tablet_id" : 11308, + "schema_hash" : 700967178, + "compact_type" : "" +} +``` + +If the tablet exists and the tablet is running, JSON format is returned: +``` +{ + "status" : "Success", + "run_status" : true, + "msg" : "this tablet_id is running", + "tablet_id" : 11308, + "schema_hash" : 700967178, + "compact_type" : "cumulative" +} +``` + +Explanation of results: + +* run_status: Get the current manual compaction task execution status. + +### Examples + +``` +curl -X POST "http://127.0.0.1:8040/api/compaction/run?tablet_id=10015&compact_type=cumulative" +``` \ No newline at end of file diff --git a/docs/en/docs/admin-manual/http-actions/be/compaction-status.md b/docs/en/docs/admin-manual/http-actions/be/compaction-status.md new file mode 100644 index 0000000000..7d2d85320b --- /dev/null +++ b/docs/en/docs/admin-manual/http-actions/be/compaction-status.md @@ -0,0 +1,112 @@ +--- +{ + "title": "View Compaction Status", + "language": "en" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +# View Compaction Status + +## Request + +`GET /api/compaction/run_status` +`GET /api/compaction/show?tablet_id={int}` + +## Description + +It is used to view the overall compaction status of a BE node and the compaction status of a specified tablet. + +## Query parameters + +* `tablet_id` + ID of the tablet + +## Request body + +None + +## Response + +### The overall compaction status of the node + +``` +{ + "CumulativeCompaction": { + "/home/disk1" : [10001, 10002], + "/home/disk2" : [10003] + }, + "BaseCompaction": { + "/home/disk1" : [10001, 10002], + "/home/disk2" : [10003] + } +} +``` + +This structure represents the id of the tablet that is performing the compaction task in a certain data directory, and the type of compaction. + +### Specify the compaction status of the tablet + +``` +{ + "cumulative policy type": "SIZE_BASED", + "cumulative point": 50, + "last cumulative failure time": "2019-12-16 18:13:43.224", + "last base failure time": "2019-12-16 18:13:23.320", + "last cumu success time": , + "last base success time": "2019-12-16 18:11:50.780", + "rowsets": [ + "[0-48] 10 DATA OVERLAPPING 574.00 MB", + "[49-49] 2 DATA OVERLAPPING 574.00 B", + "[50-50] 0 DELETE NONOVERLAPPING 574.00 B", + "[51-51] 5 DATA OVERLAPPING 574.00 B" + ], + "missing_rowsets": [], + "stale version path": [ + { + "path id": "2", + "last create time": "2019-12-16 18:11:15.110 +0800", + "path list": "2-> [0-24] -> [25-48]" + }, + { + "path id": "1", + "last create time": "2019-12-16 18:13:15.110 +0800", + "path list": "1-> [25-40] -> [40-48]" + } + ] +} +``` + +Explanation of results: + +* cumulative policy type: The cumulative compaction policy type which is used by current tablet. +* cumulative point: The version boundary between base and cumulative compaction. Versions before (excluding) points are handled by base compaction. Versions after (inclusive) are handled by cumulative compaction. +* last cumulative failure time: The time when the last cumulative compaction failed. After 10 minutes by default, cumulative compaction is attempted on the this tablet again. +* last base failure time: The time when the last base compaction failed. After 10 minutes by default, base compaction is attempted on the this tablet again. +* rowsets: The current rowsets collection of this tablet. [0-48] means a rowset with version 0-48. The second number is the number of segments in a rowset. The DELETE indicates the delete version. OVERLAPPING and NONOVERLAPPING indicates whether data between segments is overlap. +* missing_rowset: The missing rowsets. +* stale version path: The merged version path of the rowset collection currently merged in the tablet. It is an array structure and each element represents a merged path. Each element contains three attributes: path id indicates the version path id, and last create time indicates the creation time of the most recent rowset on the path. By default, all rowsets on this path will be deleted after half an hour at the last create time. + +## Examples + +``` +curl http://192.168.10.24:8040/api/compaction/show?tablet_id=10015 +``` diff --git a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md b/docs/en/docs/admin-manual/http-actions/be/config.md similarity index 51% copy from docs/en/docs/admin-manual/http-actions/be/restore-tablet.md copy to docs/en/docs/admin-manual/http-actions/be/config.md index df6c8867d0..5d914a1597 100644 --- a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md +++ b/docs/en/docs/admin-manual/http-actions/be/config.md @@ -1,6 +1,6 @@ --- { - "title": "RESTORE TABLET", + "title": "Config of BE", "language": "en" } --- @@ -24,18 +24,57 @@ specific language governing permissions and limitations under the License. --> -# RESTORE TABLET -## description - - To restore the tablet data from trash dir on BE +# Config of BE - METHOD: POST - URI: http://be_host:be_http_port/api/restore_tablet?tablet_id=xxx&schema_hash=xxx +## Request -## example +`GET /api/show_config` +`POST /api/update_config?{key}={val}` - curl -X POST "http://hostname:8088/api/restore_tablet?tablet_id=123456\&schema_hash=1111111" +## Description -## keyword +Query and update the config of BE + +## Query parameters + +* `persist` + Whether to persist. Optional with default `false`. + +* `key` + Config item name + +* `val` + Config item value + +## Request body + +None + +## Response + +### Query + + ``` + [["agent_task_trace_threshold_sec","int32_t","2","true"], ...] + ``` + +### Update + ``` + { + "status": "OK", + "msg": "" + } + ``` + +## Examples + + + ``` + curl http://127.0.0.1:8040/api/show_config + ``` + + ``` + curl -X POST "http://127.0.0.1:8040/api/update_config?agent_task_trace_threshold_sec=2&persist=true" + + ``` - RESTORE,TABLET,RESTORE,TABLET diff --git a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md b/docs/en/docs/admin-manual/http-actions/be/download.md similarity index 65% copy from docs/en/docs/admin-manual/http-actions/be/restore-tablet.md copy to docs/en/docs/admin-manual/http-actions/be/download.md index df6c8867d0..600ff72c17 100644 --- a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md +++ b/docs/en/docs/admin-manual/http-actions/be/download.md @@ -1,6 +1,6 @@ --- { - "title": "RESTORE TABLET", + "title": "Download Log about Load Error", "language": "en" } --- @@ -24,18 +24,36 @@ specific language governing permissions and limitations under the License. --> -# RESTORE TABLET -## description - - To restore the tablet data from trash dir on BE +# Download Log about Load Error - METHOD: POST - URI: http://be_host:be_http_port/api/restore_tablet?tablet_id=xxx&schema_hash=xxx +## Request -## example +`GET /api/_load_error_log?token={string}&file={string}` - curl -X POST "http://hostname:8088/api/restore_tablet?tablet_id=123456\&schema_hash=1111111" +## Description -## keyword +Download log file about load error + +## Query parameters + +* `file` + Path of log + +* `token` + token + +## Request body + +None + +## Response + + File of log + +## Examples + + + ``` + curl "http://127.0.0.1:8040/api/_load_error_log?file=a&token=1" + ``` - RESTORE,TABLET,RESTORE,TABLET diff --git a/docs/en/docs/admin-manual/http-actions/be/get-tablets.md b/docs/en/docs/admin-manual/http-actions/be/get-tablets.md deleted file mode 100644 index 8dd6581ced..0000000000 --- a/docs/en/docs/admin-manual/http-actions/be/get-tablets.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -{ - "title": "GET TABLETS ON A PARTICULAR BE", - "language": "en" -} ---- - -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -# GET TABLETS ON A PARTICULAR BE - -Get the tablet id and schema hash for a certain number of tablets on a particular BE node - -``` -curl -X GET http://be_host:webserver_port/tablets_page?limit=XXXXX -``` - -The return is the tablet id and schema hash for a certain number of tablets on the BE node. The data is returned as a rendered Web page. The number of returned tablets is determined by the parameter limit. If parameter limit does not exist, none tablet will be returned. if the value of parameter limit is "all", all the tablets on the BE node will be returned. if the value of parameter limit is non-numeric type other than "all", none tablet will be returned. - -``` -curl -X GET http://be_host:webserver_port/tablets_json?limit=XXXXX -``` - -The return is the tablet id and schema hash for a certain number of tablets on the BE node. The returned data is organized as a Json object. The number of returned tablets is determined by the parameter limit. If parameter limit does not exist, none tablet will be returned. if the value of parameter limit is "all", all the tablets on the BE node will be returned. if the value of parameter limit is non-numeric type other than "all", none tablet will be returned. - -``` -{ - msg: "OK", - code: 0, - data: { - host: "10.38.157.107", - tablets: [ - { - tablet_id: 11119, - schema_hash: 714349777 - }, - - ... - - { - tablet_id: 11063, - schema_hash: 714349777 - } - ] - }, - count: 30 -} -``` diff --git a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md b/docs/en/docs/admin-manual/http-actions/be/health.md similarity index 67% copy from docs/en/docs/admin-manual/http-actions/be/restore-tablet.md copy to docs/en/docs/admin-manual/http-actions/be/health.md index df6c8867d0..91d4cf81e9 100644 --- a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md +++ b/docs/en/docs/admin-manual/http-actions/be/health.md @@ -1,6 +1,6 @@ --- { - "title": "RESTORE TABLET", + "title": "Check Alive", "language": "en" } --- @@ -24,18 +24,34 @@ specific language governing permissions and limitations under the License. --> -# RESTORE TABLET -## description - - To restore the tablet data from trash dir on BE +# Check Alive - METHOD: POST - URI: http://be_host:be_http_port/api/restore_tablet?tablet_id=xxx&schema_hash=xxx +## Request -## example +`GET /api/health` - curl -X POST "http://hostname:8088/api/restore_tablet?tablet_id=123456\&schema_hash=1111111" +## Description -## keyword +Provided for the monitoring service to Check whether the BE is alive,Be will respond if alive. + +## Query parameters + +None + +## Request body + +None + +## Response + + ``` + {"status": "OK","msg": "To Be Added"} + ``` + +## Examples + + + ``` + curl http://127.0.0.1:8040/api/health + ``` - RESTORE,TABLET,RESTORE,TABLET diff --git a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md b/docs/en/docs/admin-manual/http-actions/be/meta.md similarity index 51% copy from docs/en/docs/admin-manual/http-actions/be/restore-tablet.md copy to docs/en/docs/admin-manual/http-actions/be/meta.md index df6c8867d0..6b415d30ea 100644 --- a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md +++ b/docs/en/docs/admin-manual/http-actions/be/meta.md @@ -1,6 +1,6 @@ --- { - "title": "RESTORE TABLET", + "title": "View Meta", "language": "en" } --- @@ -24,18 +24,50 @@ specific language governing permissions and limitations under the License. --> -# RESTORE TABLET -## description - - To restore the tablet data from trash dir on BE +# View Meta - METHOD: POST - URI: http://be_host:be_http_port/api/restore_tablet?tablet_id=xxx&schema_hash=xxx +## Request -## example +`GET /api/meta/header/{tablet_id}?byte_to_base64={bool}` - curl -X POST "http://hostname:8088/api/restore_tablet?tablet_id=123456\&schema_hash=1111111" +## Description -## keyword +View meta of a tablet + +## Path parameters + +* `tablet_id` + ID of the tablet + +## Query parameters + +* `byte_to_base64` + Whether to encode by base64. Optional with default `false`. + +## Request body + +None + +## Response + + ``` + { + "table_id": 148107, + "partition_id": 148104, + "tablet_id": 148193, + "schema_hash": 2090621954, + "shard_id": 38, + "creation_time": 1673253868, + "cumulative_layer_point": -1, + "tablet_state": "PB_RUNNING", + ... + } + ``` +## Examples + + + ``` + curl "http://127.0.0.1:8040/api/meta/header/148193&byte_to_base64=true" + + ``` - RESTORE,TABLET,RESTORE,TABLET diff --git a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md b/docs/en/docs/admin-manual/http-actions/be/metrics.md similarity index 51% copy from docs/en/docs/admin-manual/http-actions/be/restore-tablet.md copy to docs/en/docs/admin-manual/http-actions/be/metrics.md index df6c8867d0..f3ea8b3559 100644 --- a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md +++ b/docs/en/docs/admin-manual/http-actions/be/metrics.md @@ -1,6 +1,6 @@ --- { - "title": "RESTORE TABLET", + "title": "Metrics", "language": "en" } --- @@ -24,18 +24,44 @@ specific language governing permissions and limitations under the License. --> -# RESTORE TABLET -## description - - To restore the tablet data from trash dir on BE +# Metrics - METHOD: POST - URI: http://be_host:be_http_port/api/restore_tablet?tablet_id=xxx&schema_hash=xxx +## Request -## example +`GET /metrics?type={enum}&with_tablet={bool}` - curl -X POST "http://hostname:8088/api/restore_tablet?tablet_id=123456\&schema_hash=1111111" +## Description -## keyword +Provided for prometheus + +## Query parameters + +* `type` + Output style, Optional with default `all` and the following values: + - `core`: Only core items + - `json`: Json format + +* `with_tablet` + Whether to output tablet-related items,Optional with default `false`. + +## Request body + +None + +## Response + + ``` + doris_be__max_network_receive_bytes_rate LONG 60757 + doris_be__max_network_send_bytes_rate LONG 16232 + doris_be_process_thread_num LONG 1120 + doris_be_process_fd_num_used LONG 336 + ,,, + + ``` +## Examples + + + ``` + curl "http://127.0.0.1:8040/metrics?type=json&with_tablet=true" + ``` - RESTORE,TABLET,RESTORE,TABLET diff --git a/docs/en/docs/admin-manual/http-actions/be/pad-rowset.md b/docs/en/docs/admin-manual/http-actions/be/pad-rowset.md index 9ff6b89053..963e1b5742 100644 --- a/docs/en/docs/admin-manual/http-actions/be/pad-rowset.md +++ b/docs/en/docs/admin-manual/http-actions/be/pad-rowset.md @@ -1,6 +1,6 @@ --- { - "title": "PAD ROWSET", + "title": "Pad Rowset", "language": "en" } --- @@ -24,18 +24,45 @@ specific language governing permissions and limitations under the License. --> -# PAD ROWSET -## description - - Pad one empty rowset as one substitute for error replica. +# Pad Rowset - METHOD: POST - URI: http://be_host:be_http_port/api/pad_rowset?tablet_id=xxx&start_version=xxx&end_version=xxx +## Request -## example +`POST /api/pad_rowset?tablet_id={int}&start_version={int}&end_version={int}` - curl -X POST "http://hostname:8088/api/pad_rowset?tablet_id=123456\&start_version=1111111\$end_version=1111112" +## Description -## keyword +Pad one empty rowset as one substitute for error replica. + +## Query parameters + +* `tablet_id` + ID of the tablet + +* `start_version` + Start version + +* `end_version` + End version + + +## Request body + +None + +## Response + + ``` + { + msg: "OK", + code: 0 + } + ``` +## Examples + + + ``` + curl -X POST "http://127.0.0.1:8040/api/pad_rowset?tablet_id=123456&start_version=1111111&end_version=1111112" + + ``` - ROWSET,TABLET,ROWSET,TABLET diff --git a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md b/docs/en/docs/admin-manual/http-actions/be/reset-rpc-channel.md similarity index 55% copy from docs/en/docs/admin-manual/http-actions/be/restore-tablet.md copy to docs/en/docs/admin-manual/http-actions/be/reset-rpc-channel.md index df6c8867d0..9deda1640e 100644 --- a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md +++ b/docs/en/docs/admin-manual/http-actions/be/reset-rpc-channel.md @@ -1,6 +1,6 @@ --- { - "title": "RESTORE TABLET", + "title": "Reset Stub Cache", "language": "en" } --- @@ -24,18 +24,44 @@ specific language governing permissions and limitations under the License. --> -# RESTORE TABLET -## description - - To restore the tablet data from trash dir on BE +# Reset Stub Cache - METHOD: POST - URI: http://be_host:be_http_port/api/restore_tablet?tablet_id=xxx&schema_hash=xxx +## Request -## example +`GET /api/reset_rpc_channel/{endpoints}` - curl -X POST "http://hostname:8088/api/restore_tablet?tablet_id=123456\&schema_hash=1111111" +## Description -## keyword +Reset the connection cache of brpc + +## Path parameters + +* `endpoints` + - `all`: clear all caches + - `host1:port1,host2:port2`: clear cache of the specified target + +## Request body + +None + +## Response + + ``` + { + "msg":"success", + "code":0, + "data": "no cached channel.", + "count":0 + } + ``` +## Examples + + + ``` + curl http://127.0.0.1:8040/api/reset_rpc_channel/all + ``` + + ``` + curl http://127.0.0.1:8040/api/reset_rpc_channel/1.1.1.1:8080,2.2.2.2:8080 + ``` - RESTORE,TABLET,RESTORE,TABLET diff --git a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md b/docs/en/docs/admin-manual/http-actions/be/snapshot.md similarity index 64% copy from docs/en/docs/admin-manual/http-actions/be/restore-tablet.md copy to docs/en/docs/admin-manual/http-actions/be/snapshot.md index df6c8867d0..688276a985 100644 --- a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md +++ b/docs/en/docs/admin-manual/http-actions/be/snapshot.md @@ -1,6 +1,6 @@ --- { - "title": "RESTORE TABLET", + "title": "Make Snapshot", "language": "en" } --- @@ -24,18 +24,39 @@ specific language governing permissions and limitations under the License. --> -# RESTORE TABLET -## description - - To restore the tablet data from trash dir on BE +# Make Snapshot - METHOD: POST - URI: http://be_host:be_http_port/api/restore_tablet?tablet_id=xxx&schema_hash=xxx +## Request -## example +`GET /api/snapshot?tablet_id={int}&schema_hash={int}"` - curl -X POST "http://hostname:8088/api/restore_tablet?tablet_id=123456\&schema_hash=1111111" +## Description -## keyword +Make snapshot of a tablet + +## Query parameters + +* `tablet_id` + ID of the tablet + +* `schema_hash` + Schema hash + + +## Request body + +None + +## Response + + ``` + /path/to/snapshot + ``` +## Examples + + + ``` + curl "http://127.0.0.1:8040/api/snapshot?tablet_id=123456&schema_hash=1111111" + + ``` - RESTORE,TABLET,RESTORE,TABLET diff --git a/docs/en/docs/admin-manual/http-actions/be/tablet-distribution.md b/docs/en/docs/admin-manual/http-actions/be/tablet-distribution.md new file mode 100644 index 0000000000..90cbe54244 --- /dev/null +++ b/docs/en/docs/admin-manual/http-actions/be/tablet-distribution.md @@ -0,0 +1,92 @@ +--- +{ + "title": "View Tablet Distribution", + "language": "en" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +# View Tablet Distribution + +## Request + +`GET /api/tablets_distribution?group_by={enum}&partition_id={int}` + +## Description + +Get the distribution of tablets under each partition between different disks on BE node + +## Query parameters + +* `group_by` + only supports `partition` + +* `partition_id` + ID of the specified partition,Optional with default all partition。 + +## Request body + +None + +## Response + + ``` + { + msg: "OK", + code: 0, + data: { + host: "***", + tablets_distribution: [ + { + partition_id:***, + disks:[ + { + disk_path:"***", + tablets_num:***, + tablets:[ + { + tablet_id:***, + schema_hash:***, + tablet_size:*** + }, + + ... + + ] + }, + + ... + + ] + } + ] + }, + count: *** + } + ``` +## Examples + + + ``` + curl "http://127.0.0.1:8040/api/tablets_distribution?group_by=partition&partition_id=123" + + ``` + diff --git a/docs/en/docs/admin-manual/http-actions/be/tablet-info.md b/docs/en/docs/admin-manual/http-actions/be/tablet-info.md new file mode 100644 index 0000000000..2252e8399c --- /dev/null +++ b/docs/en/docs/admin-manual/http-actions/be/tablet-info.md @@ -0,0 +1,78 @@ +--- +{ + "title": "View Tablet Info", + "language": "en" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +# View Tablet Info + +## Request + +`GET /tablets_json?limit={int}` + +## Description + +View Tablet Info, including ID and schema hash. + +## Query parameters + +* `limit` + Number of tablets output,Optional with default 1000. Take `all` to output all tablets. + +## Request body + +None + +## Response + + ``` + { + msg: "OK", + code: 0, + data: { + host: "10.38.157.107", + tablets: [ + { + tablet_id: 11119, + schema_hash: 714349777 + }, + + ... + + { + tablet_id: 11063, + schema_hash: 714349777 + } + ] + }, + count: 30 + } + ``` +## Examples + + + ``` + curl http://127.0.0.1:8040/api/tablets_json?limit=all + + ``` + diff --git a/docs/en/docs/admin-manual/http-actions/be/tablet-migration-action.md b/docs/en/docs/admin-manual/http-actions/be/tablet-migration.md similarity index 63% rename from docs/en/docs/admin-manual/http-actions/be/tablet-migration-action.md rename to docs/en/docs/admin-manual/http-actions/be/tablet-migration.md index 7ecc552552..667f2f9739 100644 --- a/docs/en/docs/admin-manual/http-actions/be/tablet-migration-action.md +++ b/docs/en/docs/admin-manual/http-actions/be/tablet-migration.md @@ -1,6 +1,6 @@ --- { - "title": "MIGRATE SINGLE TABLET TO A PARTICULAR DISK", + "title": "Migration Tablet", "language": "en" } --- @@ -24,17 +24,38 @@ specific language governing permissions and limitations under the License. --> -# MIGRATE SINGLE TABLET TO A PARTICULAR DISK - -Migrate single tablet to a particular disk. +# Migration Tablet -Submit the migration task: +## Request -``` -curl -X GET http://be_host:webserver_port/api/tablet_migration?goal=run&tablet_id=xxx&schema_hash=xxx&disk=xxx -``` +`GET /api/tablet_migration?goal={enum}&tablet_id={int}&schema_hash={int}&disk={string}` + +## Description + +Migrate a tablet to the specified disk. + +## Query parameters + +* `goal` + - `run`:submit the migration task + - `status`:show the status of migration task + +* `tablet_id` + ID of the tablet + +* `schema_hash` + Schema hash + +* `disk` + The specified disk. + +## Request body + +None + +## Response -The return is the submission result of the migration task: +### Submit Task ``` { @@ -42,9 +63,7 @@ The return is the submission result of the migration task: msg: "migration task is successfully submitted." } ``` - -or - +Or ``` { status: "Fail", @@ -52,33 +71,27 @@ or } ``` -Show the status of migration task: - -``` -curl -X GET http://be_host:webserver_port/api/tablet_migration?goal=status&tablet_id=xxx&schema_hash=xxx -``` - -The return is the execution result of the migration task: +### Show Status ``` { status: "Success", - msg: "migration task is running.", + msg: "migration task is running", dest_disk: "xxxxxx" } ``` -or +Or ``` { status: "Success", - msg: "migration task has finished successfully.", + msg: "migration task has finished successfully", dest_disk: "xxxxxx" } ``` -or +Or ``` { @@ -86,4 +99,13 @@ or msg: "migration task failed.", dest_disk: "xxxxxx" } -``` \ No newline at end of file +``` + +## Examples + + + ``` + curl "http://127.0.0.1:8040/api/tablet_migration?goal=run&tablet_id=123&schema_hash=333&disk=/disk1" + + ``` + diff --git a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md b/docs/en/docs/admin-manual/http-actions/be/tablet-reload.md similarity index 61% copy from docs/en/docs/admin-manual/http-actions/be/restore-tablet.md copy to docs/en/docs/admin-manual/http-actions/be/tablet-reload.md index df6c8867d0..b213a64872 100644 --- a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md +++ b/docs/en/docs/admin-manual/http-actions/be/tablet-reload.md @@ -1,6 +1,6 @@ --- { - "title": "RESTORE TABLET", + "title": "Reload Tablet", "language": "en" } --- @@ -24,18 +24,42 @@ specific language governing permissions and limitations under the License. --> -# RESTORE TABLET -## description - - To restore the tablet data from trash dir on BE +# Reload Tablet - METHOD: POST - URI: http://be_host:be_http_port/api/restore_tablet?tablet_id=xxx&schema_hash=xxx +## Request -## example +`GET /api/reload_tablet?tablet_id={int}&schema_hash={int}&path={string}"` - curl -X POST "http://hostname:8088/api/restore_tablet?tablet_id=123456\&schema_hash=1111111" +## Description -## keyword +Reload tablet + +## Query parameters + +* `tablet_id` + ID of the tablet + +* `schema_hash` + Schema hash + +* `path` + Path of file + + +## Request body + +None + +## Response + + ``` + load header succeed + ``` +## Examples + + + ``` + curl "http://127.0.0.1:8040/api/reload_tablet?tablet_id=123456&schema_hash=1111111&path=/abc" + + ``` - RESTORE,TABLET,RESTORE,TABLET diff --git a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md b/docs/en/docs/admin-manual/http-actions/be/tablet-restore.md similarity index 61% copy from docs/en/docs/admin-manual/http-actions/be/restore-tablet.md copy to docs/en/docs/admin-manual/http-actions/be/tablet-restore.md index df6c8867d0..1d9030d6f8 100644 --- a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md +++ b/docs/en/docs/admin-manual/http-actions/be/tablet-restore.md @@ -1,6 +1,6 @@ --- { - "title": "RESTORE TABLET", + "title": "Restore Tablet", "language": "en" } --- @@ -24,18 +24,42 @@ specific language governing permissions and limitations under the License. --> -# RESTORE TABLET -## description - - To restore the tablet data from trash dir on BE +# Restore Tablet - METHOD: POST - URI: http://be_host:be_http_port/api/restore_tablet?tablet_id=xxx&schema_hash=xxx +## Request -## example +`POST /api/restore_tablet?tablet_id={int}&schema_hash={int}"` - curl -X POST "http://hostname:8088/api/restore_tablet?tablet_id=123456\&schema_hash=1111111" +## Description -## keyword +To restore the tablet data from trash dir on BE + +## Query parameters + +* `tablet_id` + ID of the tablet + +* `schema_hash` + Schema hash + + +## Request body + +None + +## Response + + ``` + { + msg: "OK", + code: 0 + } + ``` +## Examples + + + ``` + curl -X POST "http://127.0.0.1:8040/api/restore_tablet?tablet_id=123456&schema_hash=1111111" + + ``` - RESTORE,TABLET,RESTORE,TABLET diff --git a/docs/en/docs/admin-manual/http-actions/be/tablets_distribution.md b/docs/en/docs/admin-manual/http-actions/be/tablets_distribution.md deleted file mode 100644 index df0b1c9282..0000000000 --- a/docs/en/docs/admin-manual/http-actions/be/tablets_distribution.md +++ /dev/null @@ -1,124 +0,0 @@ ---- -{ - "title": "GET TABLETS DISTRIBUTION BETWEEN DIFFERENT DISKS", - "language": "en" -} ---- - -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -# GET TABLETS DISTRIBUTION BETWEEN DIFFERENT DISKS - -Get the distribution of tablets under each partition between different disks on BE node - -``` -curl -X GET http://be_host:webserver_port/api/tablets_distribution?group_by=partition -``` - -The return is the number distribution of tablets under each partition between different disks on BE node, which only include tablet number. - -``` -{ - msg: "OK", - code: 0, - data: { - host: "***", - tablets_distribution: [ - { - partition_id:***, - disks:[ - { - disk_path:"***", - tablets_num:***, - }, - { - disk_path:"***", - tablets_num:***, - }, - - ... - - ] - }, - { - partition_id:***, - disks:[ - { - disk_path:"***", - tablets_num:***, - }, - { - disk_path:"***", - tablets_num:***, - }, - - ... - - ] - }, - - ... - - ] - }, - count: *** -} -``` - -``` -curl -X GET http://be_host:webserver_port/api/tablets_distribution?group_by=partition&partition_id=xxx -``` - -The return is the number distribution of tablets under the particular partition between different disks on BE node, which include tablet number, tablet id, schema hash and tablet size. - -``` -{ - msg: "OK", - code: 0, - data: { - host: "***", - tablets_distribution: [ - { - partition_id:***, - disks:[ - { - disk_path:"***", - tablets_num:***, - tablets:[ - { - tablet_id:***, - schema_hash:***, - tablet_size:*** - }, - - ... - - ] - }, - - ... - - ] - } - ] - }, - count: *** -} -``` diff --git a/docs/en/docs/admin-manual/http-actions/be/be-version-info-action.md b/docs/en/docs/admin-manual/http-actions/be/version-info.md similarity index 62% rename from docs/en/docs/admin-manual/http-actions/be/be-version-info-action.md rename to docs/en/docs/admin-manual/http-actions/be/version-info.md index d9aba989a1..1523f3364e 100644 --- a/docs/en/docs/admin-manual/http-actions/be/be-version-info-action.md +++ b/docs/en/docs/admin-manual/http-actions/be/version-info.md @@ -1,6 +1,6 @@ --- { - "title": "Be Version Info Action", + "title": "Be Version Info", "language": "en" } --- @@ -24,27 +24,23 @@ specific language governing permissions and limitations under the License. --> -# Be Version Info Action +# Be Version Info ## Request -`GET be_host:be_http_port/api/be_version_info` +`GET /api/be_version_info` ## Description -Get be version info from be host. - -## Path parameters - -None. +Provide BE version info ## Query parameters -None. +None ## Request body -None. +None ## Response @@ -73,27 +69,7 @@ None. ``` - GET be_host:be_http_port/api/be_version_info + curl http://127.0.0.1:8040/api/be_version_info - Response: - { - "msg":"success", - "code":0, - "data":{ - "beVersionInfo":{ - "dorisBuildVersionPrefix":"doris", - "dorisBuildVersionMajor":0, - "dorisBuildVersionMinor":0, - "dorisBuildVersionPatch":0, - "dorisBuildVersionRcVersion":"trunk", - "dorisBuildVersion":"doris-0.0.0-trunk", - "dorisBuildHash":"git://4b7b503d1cb3/data/doris/doris/be/../@a04f9814fe5a09c0d9e9399fe71cc4d765f8bff1", - "dorisBuildShortHash":"a04f981", - "dorisBuildTime":"Fri, 09 Sep 2022 07:57:02 UTC", - "dorisBuildInfo":"root@4b7b503d1cb3" - } - }, - "count":0 - } ``` diff --git a/docs/sidebars.json b/docs/sidebars.json index cc1d5f3810..a553542459 100644 --- a/docs/sidebars.json +++ b/docs/sidebars.json @@ -1205,15 +1205,25 @@ "type": "category", "label": "BE", "items": [ - "admin-manual/http-actions/be/be-version-info-action", - "admin-manual/http-actions/be/restore-tablet", + "admin-manual/http-actions/be/check-rpc-channel", + "admin-manual/http-actions/be/reset-rpc-channel", + "admin-manual/http-actions/be/compaction-status", + "admin-manual/http-actions/be/compaction-run", + "admin-manual/http-actions/be/meta", + "admin-manual/http-actions/be/snapshot", + "admin-manual/http-actions/be/check-tablet-segment", + "admin-manual/http-actions/be/config", + "admin-manual/http-actions/be/metrics", + "admin-manual/http-actions/be/tablet-distribution", + "admin-manual/http-actions/be/tablet-migration", + "admin-manual/http-actions/be/tablet-info", + "admin-manual/http-actions/be/checksum", + "admin-manual/http-actions/be/download", "admin-manual/http-actions/be/pad-rowset", - "admin-manual/http-actions/be/tablet-migration-action", - "admin-manual/http-actions/be/tablets_distribution", - "admin-manual/http-actions/be/compaction-action", - "admin-manual/http-actions/be/get-tablets", - "admin-manual/http-actions/be/check-reset-rpc-cache", - "admin-manual/http-actions/be/check-tablet-segment-action" + "admin-manual/http-actions/be/version-info", + "admin-manual/http-actions/be/health", + "admin-manual/http-actions/be/tablet-reload", + "admin-manual/http-actions/be/tablet-restore" ] } ] diff --git a/docs/zh-CN/docs/admin-manual/http-actions/be/check-reset-rpc-cache.md b/docs/zh-CN/docs/admin-manual/http-actions/be/check-reset-rpc-cache.md deleted file mode 100644 index 8098bf6f32..0000000000 --- a/docs/zh-CN/docs/admin-manual/http-actions/be/check-reset-rpc-cache.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -{ - "title": "检查和重置连接缓存", - "language": "zh-CN" -} ---- - -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -# 检查和重置连接缓存 -## description - -### 检查连接缓存 - 该功能用于检查brpc的连接缓存。 - - 说明:检查连接缓存是否可用,负载最大10M - METHOD: GET - URI: http://be_host:be_http_port/api/check_rpc_channel/{host_to_check}/{remot_brpc_port}/{payload_size} - -### 重置连接缓存 - 该功能用于重置brpc的连接缓存。endpoints 可以时如下形式 `all` 清空全部缓存, `host1:port1,host2:port2,...`: 清空到指定目标的缓存 - - 说明:重置连接缓存,负载最大10M - METHOD: GET - URI: http://be_host:be_http_port/api/reset_rpc_channel/{endpoints} -## example - - curl -X GET "http://host:port/api/check_rpc_channel/host2/8060/1024000" - curl -X GET "http://host:port/api/reset_rpc_channel/all" diff --git a/docs/zh-CN/docs/admin-manual/http-actions/be/pad_rowset.md b/docs/zh-CN/docs/admin-manual/http-actions/be/check-rpc-channel.md similarity index 53% copy from docs/zh-CN/docs/admin-manual/http-actions/be/pad_rowset.md copy to docs/zh-CN/docs/admin-manual/http-actions/be/check-rpc-channel.md index dba241fca7..7a372b4592 100644 --- a/docs/zh-CN/docs/admin-manual/http-actions/be/pad_rowset.md +++ b/docs/zh-CN/docs/admin-manual/http-actions/be/check-rpc-channel.md @@ -1,6 +1,6 @@ --- { - "title": "PAD ROWSET", + "title": "检查连接缓存", "language": "zh-CN" } --- @@ -24,20 +24,48 @@ specific language governing permissions and limitations under the License. --> -# PAD ROWSET -## description - - 该功能用于使用一个空的rowset填充损坏的副本。 +# 检查连接缓存 - 说明:这个功能暂时只在be服务中提供一个http接口。如果要使用, - 需要向要进行数据恢复的那台be机器的http端口发送pad rowset api请求。api格式如下: - METHOD: POST - URI: http://be_host:be_http_port/api/pad_rowset?tablet_id=xxx&start_version=xxx&end_version=xxx +## Request -## example +`GET /api/check_rpc_channel/{host_to_check}/{remot_brpc_port}/{payload_size}` - curl -X POST "http://hostname:8088/api/pad_rowset?tablet_id=123456\&start_version=1111111\&end_version=1111112" +## Description -## keyword +该功能用于检查brpc的连接缓存。 + +## Path parameters + +* `host_to_check` + + 需要查检的IP。 + +* `remot_brpc_port` + + 需要查检的端口。 + +* `payload_size` + + 负载大小,单位B,取值范围1~1024000。 + +## Request body + +无 + +## Response + + ``` + { + "msg":"success", + "code":0, + "data": "open brpc connection to {host_to_check}:{remot_brpc_port} succcess.", + "count":0 + } + ``` +## Examples + + + ``` + curl http://127.0.0.1:8040/api/be_version_info/127.0.0.1/8888/1024000 + ``` - PAD,ROWSET,PAD,ROWSET diff --git a/docs/zh-CN/docs/admin-manual/http-actions/be/check-tablet-segment-action.md b/docs/zh-CN/docs/admin-manual/http-actions/be/check-tablet-segment.md similarity index 55% rename from docs/zh-CN/docs/admin-manual/http-actions/be/check-tablet-segment-action.md rename to docs/zh-CN/docs/admin-manual/http-actions/be/check-tablet-segment.md index b58c75d136..9462a38c44 100644 --- a/docs/zh-CN/docs/admin-manual/http-actions/be/check-tablet-segment-action.md +++ b/docs/zh-CN/docs/admin-manual/http-actions/be/check-tablet-segment.md @@ -1,6 +1,6 @@ --- { - "title": "CHECK ALL TABLET SEGMENT LOST", + "title": "检查tablet文件丢失", "language": "zh-CN" } --- @@ -24,30 +24,51 @@ specific language governing permissions and limitations under the License. --> -# CHECK ALL TABLET SEGMENT LOST - +# 检查tablet文件丢失 + +## Request + +`GET /api/check_tablet_segment_lost?repair={bool}` + +## Description + 在BE节点上,可能会因为一些异常情况导致数据文件丢失,但是元数据显示正常,这种副本异常不会被FE检测到,也不能被修复。 当用户查询时,会报错`failed to initialize storage reader`。该接口的功能是检测出当前BE节点上所有存在文件丢失的tablet。 -``` -curl -X POST http://be_host:webserver_port/api/check_tablet_segment_lost?repair=xxx -``` +## Query parameters -当参数`repair`设置为`true`时,存在文件丢失的tablet都会被设为`SHUTDOWN`状态,该副本会被作为坏副本处理,进而能够被FE检测和修复。否则,只会返回所有存在文件丢失的tablet,并不做任何处理。 +* `repair` -返回值是当前BE节点上所有存在文件丢失的tablet: + - 设置为`true`时,存在文件丢失的tablet都会被设为`SHUTDOWN`状态,该副本会被作为坏副本处理,进而能够被FE检测和修复。 + - 设置为`false`时,只会返回所有存在文件丢失的tablet,并不做任何处理。 + +## Request body + +无 + +## Response + + 返回值是当前BE节点上所有存在文件丢失的tablet + + ``` + { + status: "Success", + msg: "Succeed to check all tablet segment", + num: 3, + bad_tablets: [ + 11190, + 11210, + 11216 + ], + set_bad: true, + host: "172.3.0.101" + } + ``` + +## Examples + + + ``` + curl http://127.0.0.1:8040/api/check_tablet_segment_lost?repair=false + ``` -``` -{ - status: "Success", - msg: "Succeed to check all tablet segment", - num: 3, - bad_tablets: [ - 11190, - 11210, - 11216 - ], - set_bad: true, - host: "172.3.0.101" -} -``` diff --git a/docs/zh-CN/docs/admin-manual/http-actions/be/restore-tablet.md b/docs/zh-CN/docs/admin-manual/http-actions/be/checksum.md similarity index 57% copy from docs/zh-CN/docs/admin-manual/http-actions/be/restore-tablet.md copy to docs/zh-CN/docs/admin-manual/http-actions/be/checksum.md index 786578e30a..2f59fb23a2 100644 --- a/docs/zh-CN/docs/admin-manual/http-actions/be/restore-tablet.md +++ b/docs/zh-CN/docs/admin-manual/http-actions/be/checksum.md @@ -1,6 +1,6 @@ --- { - "title": "RESTORE TABLET", + "title": "Checksum", "language": "zh-CN" } --- @@ -24,20 +24,41 @@ specific language governing permissions and limitations under the License. --> -# RESTORE TABLET -## description - - 该功能用于恢复trash目录中被误删的tablet数据。 +# Checksum - 说明:这个功能暂时只在be服务中提供一个http接口。如果要使用, - 需要向要进行数据恢复的那台be机器的http端口发送restore tablet api请求。api格式如下: - METHOD: POST - URI: http://be_host:be_http_port/api/restore_tablet?tablet_id=xxx&schema_hash=xxx +## Request -## example +`GET /api/checksum?tablet_id={int}&version={int}&schema_hash={int}` - curl -X POST "http://hostname:8088/api/restore_tablet?tablet_id=123456\&schema_hash=1111111" +## Description -## keyword +checksum + +## Query parameters + +* `tablet_id` + 需要校验的tablet的id + +* `version` + 需要校验的tablet的version + +* `schema_hash` + schema hash + +## Request body + +无 + +## Response + + ``` + 1843743562 + ``` +## Examples + + + ``` + curl "http://127.0.0.1:8040/api/checksum?tablet_id=1&version=1&schema_hash=-1" + + ``` - RESTORE,TABLET,RESTORE,TABLET diff --git a/docs/zh-CN/docs/admin-manual/http-actions/be/compaction-run.md b/docs/zh-CN/docs/admin-manual/http-actions/be/compaction-run.md new file mode 100644 index 0000000000..f922ec310f --- /dev/null +++ b/docs/zh-CN/docs/admin-manual/http-actions/be/compaction-run.md @@ -0,0 +1,132 @@ +--- +{ + "title": "触发Compaction", + "language": "zh-CN" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +# 触发Compaction + +## Request + +`POST /api/compaction/run?tablet_id={int}&compact_type={enum}` +`GET /api/compaction/run_status?tablet_id={int}` + + +## Description + +用于手动触发 Compaction 以及状态查询。 + +## Query parameters + +* `tablet_id` + - tablet的id + +* `compact_type` + - 取值为`base`或`cumulative` + +## Request body + +无 + +## Response + +### 触发Compaction + +若 tablet 不存在,返回 JSON 格式的错误: + +``` +{ + "status": "Fail", + "msg": "Tablet not found" +} +``` + +若 compaction 执行任务触发失败时,返回 JSON 格式的错误: + +``` +{ + "status": "Fail", + "msg": "fail to execute compaction, error = -2000" +} +``` + +若 compaction 执行触发成功时,则返回 JSON 格式的结果: + +``` +{ + "status": "Success", + "msg": "compaction task is successfully triggered." +} +``` + +结果说明: + +* status:触发任务状态,当成功触发时为Success;当因某些原因(比如,没有获取到合适的版本)时,返回Fail。 +* msg:给出具体的成功或失败的信息。 + +### 查询状态 + +若 tablet 不存在,返回 JSON 格式: + +``` +{ + "status": "Fail", + "msg": "Tablet not found" +} +``` + +若 tablet 存在并且 tablet 不在正在执行 compaction,返回 JSON 格式: + +``` +{ + "status" : "Success", + "run_status" : false, + "msg" : "this tablet_id is not running", + "tablet_id" : 11308, + "schema_hash" : 700967178, + "compact_type" : "" +} +``` + +若 tablet 存在并且 tablet 正在执行 compaction,返回 JSON 格式: + +``` +{ + "status" : "Success", + "run_status" : true, + "msg" : "this tablet_id is running", + "tablet_id" : 11308, + "schema_hash" : 700967178, + "compact_type" : "cumulative" +} +``` + +结果说明: + +* run_status:获取当前手动 compaction 任务执行状态 + +### Examples + +``` +curl -X POST "http://127.0.0.1:8040/api/compaction/run?tablet_id=10015&compact_type=cumulative" +``` \ No newline at end of file diff --git a/docs/zh-CN/docs/admin-manual/http-actions/be/compaction-action.md b/docs/zh-CN/docs/admin-manual/http-actions/be/compaction-status.md similarity index 55% rename from docs/zh-CN/docs/admin-manual/http-actions/be/compaction-action.md rename to docs/zh-CN/docs/admin-manual/http-actions/be/compaction-status.md index 4eee50182c..0c23156995 100644 --- a/docs/zh-CN/docs/admin-manual/http-actions/be/compaction-action.md +++ b/docs/zh-CN/docs/admin-manual/http-actions/be/compaction-status.md @@ -1,6 +1,6 @@ --- { - "title": "Compaction Action", + "title": "查看Compaction状态", "language": "zh-CN" } --- @@ -24,19 +24,29 @@ specific language governing permissions and limitations under the License. --> -# Compaction Action +# 查看Compaction状态 -该 API 用于查看某个 BE 节点总体的 compaction 状态,或者指定 tablet 的 compaction 状态。也可以用于手动触发 Compaction。 +## Request -## 查看 Compaction 状态 +`GET /api/compaction/run_status` +`GET /api/compaction/show?tablet_id={int}` -### 节点整体 compaction 状态 +## Description -``` -curl -X GET http://be_host:webserver_port/api/compaction/run_status -``` +用于查看某个 BE 节点总体的 compaction 状态,或者指定 tablet 的 compaction 状态。 + +## Query parameters + +* `tablet_id` + - tablet的id + +## Request body -返回 JSON 格式 +无 + +## Response + +### 整体Compaction状态 ``` { @@ -53,22 +63,7 @@ curl -X GET http://be_host:webserver_port/api/compaction/run_status 该结构表示某个数据目录下,正在执行 compaction 任务的 tablet 的 id,以及 compaction 的类型。 -### 指定 tablet 的 compaction 状态 - -``` -curl -X GET http://be_host:webserver_port/api/compaction/show?tablet_id=xxxx -``` - -若 tablet 不存在,返回 JSON 格式的错误: - -``` -{ - "status": "Fail", - "msg": "Tablet not found" -} -``` - -若 tablet 存在,则返回 JSON 格式的结果: +### 指定tablet的Compaction状态 ``` { @@ -110,103 +105,8 @@ curl -X GET http://be_host:webserver_port/api/compaction/show?tablet_id=xxxx * missing_rowsets: 缺失的版本。 * stale version path:该 table 当前被合并rowset集合的合并版本路径,该结构是一个数组结构,每个元素表示一个合并路径。每个元素中包含了三个属性:path id 表示版本路径id,last create time 表示当前路径上最近的 rowset 创建时间,默认在这个时间半个小时之后这条路径上的所有 rowset 会被过期删除。 -### 示例 - -``` -curl -X GET http://192.168.10.24:8040/api/compaction/show?tablet_id=10015 -``` - -## 手动触发 Compaction - -``` -curl -X POST http://be_host:webserver_port/api/compaction/run?tablet_id=xxxx\&compact_type=cumulative -``` - -当前仅能执行一个手动compaction任务,其中compact_type取值为base或cumulative - -若 tablet 不存在,返回 JSON 格式的错误: - -``` -{ - "status": "Fail", - "msg": "Tablet not found" -} -``` - -若 compaction 执行任务触发失败时,返回 JSON 格式的错误: - -``` -{ - "status": "Fail", - "msg": "fail to execute compaction, error = -2000" -} -``` - -若 compaction 执行触发成功时,则返回 JSON 格式的结果: - -``` -{ - "status": "Success", - "msg": "compaction task is successfully triggered." -} -``` - -结果说明: +## Examples -* status:触发任务状态,当成功触发时为Success;当因某些原因(比如,没有获取到合适的版本)时,返回Fail。 -* msg:给出具体的成功或失败的信息。 -### 示例 - -``` -curl -X POST http://192.168.10.24:8040/api/compaction/run?tablet_id=10015\&compact_type=cumulative ``` - -## 手动 Compaction 执行状态 - -``` -curl -X GET http://be_host:webserver_port/api/compaction/run_status?tablet_id=xxxx -``` - -若 tablet 不存在,返回 JSON 格式: - -``` -{ - "status": "Fail", - "msg": "Tablet not found" -} -``` - -若 tablet 存在并且 tablet 不在正在执行 compaction,返回 JSON 格式: - -``` -{ - "status" : "Success", - "run_status" : false, - "msg" : "this tablet_id is not running", - "tablet_id" : 11308, - "schema_hash" : 700967178, - "compact_type" : "" -} -``` - -若 tablet 存在并且 tablet 正在执行 compaction,返回 JSON 格式: - -``` -{ - "status" : "Success", - "run_status" : true, - "msg" : "this tablet_id is running", - "tablet_id" : 11308, - "schema_hash" : 700967178, - "compact_type" : "cumulative" -} -``` - -结果说明: - -* run_status:获取当前手动 compaction 任务执行状态 - -### 示例 - +curl http://192.168.10.24:8040/api/compaction/show?tablet_id=10015 ``` -curl -X GET http://192.168.10.24:8040/api/compaction/run_status?tablet_id=10015 diff --git a/docs/zh-CN/docs/admin-manual/http-actions/be/pad_rowset.md b/docs/zh-CN/docs/admin-manual/http-actions/be/config.md similarity index 52% copy from docs/zh-CN/docs/admin-manual/http-actions/be/pad_rowset.md copy to docs/zh-CN/docs/admin-manual/http-actions/be/config.md index dba241fca7..66612494af 100644 --- a/docs/zh-CN/docs/admin-manual/http-actions/be/pad_rowset.md +++ b/docs/zh-CN/docs/admin-manual/http-actions/be/config.md @@ -1,6 +1,6 @@ --- { - "title": "PAD ROWSET", + "title": "BE的配置信息", "language": "zh-CN" } --- @@ -24,20 +24,57 @@ specific language governing permissions and limitations under the License. --> -# PAD ROWSET -## description - - 该功能用于使用一个空的rowset填充损坏的副本。 +# BE的配置信息 - 说明:这个功能暂时只在be服务中提供一个http接口。如果要使用, - 需要向要进行数据恢复的那台be机器的http端口发送pad rowset api请求。api格式如下: - METHOD: POST - URI: http://be_host:be_http_port/api/pad_rowset?tablet_id=xxx&start_version=xxx&end_version=xxx +## Request -## example +`GET /api/show_config` +`POST /api/update_config?{key}={val}` - curl -X POST "http://hostname:8088/api/pad_rowset?tablet_id=123456\&start_version=1111111\&end_version=1111112" +## Description -## keyword +查询/更新 BE的配置信息 + +## Query parameters + +* `persist` + 是否持久化,选填,默认`false`。 + +* `key` + 配置项名。 + +* `val` + 配置项值。 + +## Request body + +无 + +## Response + +### 查询 + + ``` + [["agent_task_trace_threshold_sec","int32_t","2","true"], ...] + ``` + +### 更新 + ``` + { + "status": "OK", + "msg": "" + } + ``` + +## Examples + + + ``` + curl "http://127.0.0.1:8040/api/show_config" + ``` + + ``` + curl -X POST "http://127.0.0.1:8040/api/update_config?agent_task_trace_threshold_sec=2&persist=true" + + ``` - PAD,ROWSET,PAD,ROWSET diff --git a/docs/zh-CN/docs/admin-manual/http-actions/be/pad_rowset.md b/docs/zh-CN/docs/admin-manual/http-actions/be/download.md similarity index 56% copy from docs/zh-CN/docs/admin-manual/http-actions/be/pad_rowset.md copy to docs/zh-CN/docs/admin-manual/http-actions/be/download.md index dba241fca7..b240f48ba5 100644 --- a/docs/zh-CN/docs/admin-manual/http-actions/be/pad_rowset.md +++ b/docs/zh-CN/docs/admin-manual/http-actions/be/download.md @@ -1,6 +1,6 @@ --- { - "title": "PAD ROWSET", + "title": "下载oad日志", "language": "zh-CN" } --- @@ -24,20 +24,36 @@ specific language governing permissions and limitations under the License. --> -# PAD ROWSET -## description - - 该功能用于使用一个空的rowset填充损坏的副本。 +# 下载load日志 - 说明:这个功能暂时只在be服务中提供一个http接口。如果要使用, - 需要向要进行数据恢复的那台be机器的http端口发送pad rowset api请求。api格式如下: - METHOD: POST - URI: http://be_host:be_http_port/api/pad_rowset?tablet_id=xxx&start_version=xxx&end_version=xxx +## Request -## example +`GET /api/_load_error_log?token={string}&file={string}` - curl -X POST "http://hostname:8088/api/pad_rowset?tablet_id=123456\&start_version=1111111\&end_version=1111112" +## Description -## keyword +下载load错误日志文件。 + +## Query parameters + +* `file` + 文件路径 + +* `token` + token + +## Request body + +无 + +## Response + + 文件 + +## Examples + + + ``` + curl "http://127.0.0.1:8040/api/_load_error_log?file=a&token=1" + ``` - PAD,ROWSET,PAD,ROWSET diff --git a/docs/zh-CN/docs/admin-manual/http-actions/be/get-tablets.md b/docs/zh-CN/docs/admin-manual/http-actions/be/get-tablets.md deleted file mode 100644 index dbfb8c1f55..0000000000 --- a/docs/zh-CN/docs/admin-manual/http-actions/be/get-tablets.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -{ - "title": "GET TABLETS ON A PARTICULAR BE", - "language": "zh-CN" -} ---- - -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -# GET TABLETS ON A PARTICULAR BE - -获取特定BE节点上指定数量的tablet的tablet id和schema hash信息 - -``` -curl -X GET http://be_host:webserver_port/tablets_page?limit=XXXXX -``` - -返回值就是指定BE节点上特定数量tablet的tablet id和schema hash,以渲染的Web页面形式返回。返回的tablet数量由参数limit确定,若limit不存在,则不返回tablet;若limit的值为"all",则返回指定BE节点上所有的tablet;若limit的值为除“all”之外的其他非数值类型,则不返回tablet。 - -``` -curl -X GET http://be_host:webserver_port/tablets_json?limit=XXXXX -``` - -返回值就是指定BE节点上特定数量tablet的tablet id和schema hash,以Json对象形式返回。返回的tablet数量由参数limit确定,若limit不存在,则不返回tablet;若limit的值为"all",则返回指定BE节点上所有的tablet;若limit的值为除“all”之外的其他非数值类型,则不返回tablet。 - -``` -{ - msg: "OK", - code: 0, - data: { - host: "10.38.157.107", - tablets: [ - { - tablet_id: 11119, - schema_hash: 714349777 - }, - - ... - - { - tablet_id: 11063, - schema_hash: 714349777 - } - ] - }, - count: 30 -} -``` diff --git a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md b/docs/zh-CN/docs/admin-manual/http-actions/be/health.md similarity index 66% copy from docs/en/docs/admin-manual/http-actions/be/restore-tablet.md copy to docs/zh-CN/docs/admin-manual/http-actions/be/health.md index df6c8867d0..69e62d1256 100644 --- a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md +++ b/docs/zh-CN/docs/admin-manual/http-actions/be/health.md @@ -1,7 +1,7 @@ --- { - "title": "RESTORE TABLET", - "language": "en" + "title": "BE探活", + "language": "zh-CN" } --- @@ -24,18 +24,32 @@ specific language governing permissions and limitations under the License. --> -# RESTORE TABLET -## description - - To restore the tablet data from trash dir on BE +# BE探活 - METHOD: POST - URI: http://be_host:be_http_port/api/restore_tablet?tablet_id=xxx&schema_hash=xxx +## Request -## example +`GET /api/health` - curl -X POST "http://hostname:8088/api/restore_tablet?tablet_id=123456\&schema_hash=1111111" +## Description -## keyword +给监控服务提供的探活接口,请求能响应代表BE状态正常。 + +## Query parameters +无 + +## Request body +无 + +## Response + + ``` + {"status": "OK","msg": "To Be Added"} + ``` + +## Examples + + + ``` + curl http://127.0.0.1:8040/api/health + ``` - RESTORE,TABLET,RESTORE,TABLET diff --git a/docs/zh-CN/docs/admin-manual/http-actions/be/pad_rowset.md b/docs/zh-CN/docs/admin-manual/http-actions/be/meta.md similarity index 52% copy from docs/zh-CN/docs/admin-manual/http-actions/be/pad_rowset.md copy to docs/zh-CN/docs/admin-manual/http-actions/be/meta.md index dba241fca7..d426f1f0e6 100644 --- a/docs/zh-CN/docs/admin-manual/http-actions/be/pad_rowset.md +++ b/docs/zh-CN/docs/admin-manual/http-actions/be/meta.md @@ -1,6 +1,6 @@ --- { - "title": "PAD ROWSET", + "title": "查询元信息", "language": "zh-CN" } --- @@ -24,20 +24,50 @@ specific language governing permissions and limitations under the License. --> -# PAD ROWSET -## description - - 该功能用于使用一个空的rowset填充损坏的副本。 +# 查询元信息 - 说明:这个功能暂时只在be服务中提供一个http接口。如果要使用, - 需要向要进行数据恢复的那台be机器的http端口发送pad rowset api请求。api格式如下: - METHOD: POST - URI: http://be_host:be_http_port/api/pad_rowset?tablet_id=xxx&start_version=xxx&end_version=xxx +## Request -## example +`GET /api/meta/header/{tablet_id}?byte_to_base64={bool}` - curl -X POST "http://hostname:8088/api/pad_rowset?tablet_id=123456\&start_version=1111111\&end_version=1111112" +## Description -## keyword +查询tablet元信息 + +## Path parameters + +* `tablet_id` + table的id + +## Query parameters + +* `byte_to_base64` + 是否按base64编码,选填,默认`false`。 + +## Request body + +无 + +## Response + + ``` + { + "table_id": 148107, + "partition_id": 148104, + "tablet_id": 148193, + "schema_hash": 2090621954, + "shard_id": 38, + "creation_time": 1673253868, + "cumulative_layer_point": -1, + "tablet_state": "PB_RUNNING", + ... + } + ``` +## Examples + + + ``` + curl "http://127.0.0.1:8040/api/meta/header/148193&byte_to_base64=true" + + ``` - PAD,ROWSET,PAD,ROWSET diff --git a/docs/zh-CN/docs/admin-manual/http-actions/be/pad_rowset.md b/docs/zh-CN/docs/admin-manual/http-actions/be/metrics.md similarity index 51% copy from docs/zh-CN/docs/admin-manual/http-actions/be/pad_rowset.md copy to docs/zh-CN/docs/admin-manual/http-actions/be/metrics.md index dba241fca7..a078d7dee0 100644 --- a/docs/zh-CN/docs/admin-manual/http-actions/be/pad_rowset.md +++ b/docs/zh-CN/docs/admin-manual/http-actions/be/metrics.md @@ -1,6 +1,6 @@ --- { - "title": "PAD ROWSET", + "title": "metrics信息", "language": "zh-CN" } --- @@ -24,20 +24,44 @@ specific language governing permissions and limitations under the License. --> -# PAD ROWSET -## description - - 该功能用于使用一个空的rowset填充损坏的副本。 +# metrics信息 - 说明:这个功能暂时只在be服务中提供一个http接口。如果要使用, - 需要向要进行数据恢复的那台be机器的http端口发送pad rowset api请求。api格式如下: - METHOD: POST - URI: http://be_host:be_http_port/api/pad_rowset?tablet_id=xxx&start_version=xxx&end_version=xxx +## Request -## example +`GET /metrics?type={enum}&with_tablet={bool}` - curl -X POST "http://hostname:8088/api/pad_rowset?tablet_id=123456\&start_version=1111111\&end_version=1111112" +## Description -## keyword +prometheus监控采集接口 + +## Query parameters + +* `type` + 输出方式,选填,默认全部输出,另有以下取值: + - `core`: 只输出核心采集项 + - `json`: 以json格式输出 + +* `with_tablet` + 是否输出tablet相关的采集项,选填,默认`false`。 + +## Request body + +无 + +## Response + + ``` + doris_be__max_network_receive_bytes_rate LONG 60757 + doris_be__max_network_send_bytes_rate LONG 16232 + doris_be_process_thread_num LONG 1120 + doris_be_process_fd_num_used LONG 336 + ,,, + + ``` +## Examples + + + ``` + curl "http://127.0.0.1:8040/metrics?type=json&with_tablet=true" + ``` - PAD,ROWSET,PAD,ROWSET diff --git a/docs/zh-CN/docs/admin-manual/http-actions/be/restore-tablet.md b/docs/zh-CN/docs/admin-manual/http-actions/be/pad-rowset.md similarity index 57% rename from docs/zh-CN/docs/admin-manual/http-actions/be/restore-tablet.md rename to docs/zh-CN/docs/admin-manual/http-actions/be/pad-rowset.md index 786578e30a..864ed519cb 100644 --- a/docs/zh-CN/docs/admin-manual/http-actions/be/restore-tablet.md +++ b/docs/zh-CN/docs/admin-manual/http-actions/be/pad-rowset.md @@ -1,6 +1,6 @@ --- { - "title": "RESTORE TABLET", + "title": "填充坏副本", "language": "zh-CN" } --- @@ -24,20 +24,45 @@ specific language governing permissions and limitations under the License. --> -# RESTORE TABLET -## description - - 该功能用于恢复trash目录中被误删的tablet数据。 +# 填充坏副本 - 说明:这个功能暂时只在be服务中提供一个http接口。如果要使用, - 需要向要进行数据恢复的那台be机器的http端口发送restore tablet api请求。api格式如下: - METHOD: POST - URI: http://be_host:be_http_port/api/restore_tablet?tablet_id=xxx&schema_hash=xxx +## Request -## example +`POST /api/pad_rowset?tablet_id={int}&start_version={int}&end_version={int}` - curl -X POST "http://hostname:8088/api/restore_tablet?tablet_id=123456\&schema_hash=1111111" +## Description -## keyword +该功能用于使用一个空的rowset填充损坏的副本。 + +## Query parameters + +* `tablet_id` + table的id + +* `start_version` + 起始版本 + +* `end_version` + 终止版本 + + +## Request body + +无 + +## Response + + ``` + { + msg: "OK", + code: 0 + } + ``` +## Examples + + + ``` + curl -X POST "http://127.0.0.1:8040/api/pad_rowset?tablet_id=123456&start_version=1111111&end_version=1111112" + + ``` - RESTORE,TABLET,RESTORE,TABLET diff --git a/docs/zh-CN/docs/admin-manual/http-actions/be/pad_rowset.md b/docs/zh-CN/docs/admin-manual/http-actions/be/reset-rpc-channel.md similarity index 56% rename from docs/zh-CN/docs/admin-manual/http-actions/be/pad_rowset.md rename to docs/zh-CN/docs/admin-manual/http-actions/be/reset-rpc-channel.md index dba241fca7..4c9f270f85 100644 --- a/docs/zh-CN/docs/admin-manual/http-actions/be/pad_rowset.md +++ b/docs/zh-CN/docs/admin-manual/http-actions/be/reset-rpc-channel.md @@ -1,6 +1,6 @@ --- { - "title": "PAD ROWSET", + "title": "重置连接缓存", "language": "zh-CN" } --- @@ -24,20 +24,45 @@ specific language governing permissions and limitations under the License. --> -# PAD ROWSET -## description - - 该功能用于使用一个空的rowset填充损坏的副本。 +# 重置连接缓存 - 说明:这个功能暂时只在be服务中提供一个http接口。如果要使用, - 需要向要进行数据恢复的那台be机器的http端口发送pad rowset api请求。api格式如下: - METHOD: POST - URI: http://be_host:be_http_port/api/pad_rowset?tablet_id=xxx&start_version=xxx&end_version=xxx +## Request -## example +`GET /api/reset_rpc_channel/{endpoints}` - curl -X POST "http://hostname:8088/api/pad_rowset?tablet_id=123456\&start_version=1111111\&end_version=1111112" +## Description -## keyword +该功能用于重置brpc的连接缓存。 + +## Path parameters + +* `endpoints` + 支持如下形式: + - `all` + - `host1:port1,host2:port2` + +## Request body + +无 + +## Response + + ``` + { + "msg":"success", + "code":0, + "data": "no cached channel.", + "count":0 + } + ``` +## Examples + + + ``` + curl http://127.0.0.1:8040/api/reset_rpc_channel/all + ``` + + ``` + curl http://127.0.0.1:8040/api/reset_rpc_channel/1.1.1.1:8080,2.2.2.2:8080 + ``` - PAD,ROWSET,PAD,ROWSET diff --git a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md b/docs/zh-CN/docs/admin-manual/http-actions/be/snapshot.md similarity index 62% copy from docs/en/docs/admin-manual/http-actions/be/restore-tablet.md copy to docs/zh-CN/docs/admin-manual/http-actions/be/snapshot.md index df6c8867d0..b8e73addb3 100644 --- a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md +++ b/docs/zh-CN/docs/admin-manual/http-actions/be/snapshot.md @@ -1,7 +1,7 @@ --- { - "title": "RESTORE TABLET", - "language": "en" + "title": "做快照", + "language": "zh-CN" } --- @@ -24,18 +24,39 @@ specific language governing permissions and limitations under the License. --> -# RESTORE TABLET -## description - - To restore the tablet data from trash dir on BE +# 做快照 - METHOD: POST - URI: http://be_host:be_http_port/api/restore_tablet?tablet_id=xxx&schema_hash=xxx +## Request -## example +`GET /api/snapshot?tablet_id={int}&schema_hash={int}"` - curl -X POST "http://hostname:8088/api/restore_tablet?tablet_id=123456\&schema_hash=1111111" +## Description -## keyword +该功能用于tablet做快照。 + +## Query parameters + +* `tablet_id` + 需要做快照的table的id + +* `schema_hash` + schema hash + + +## Request body + +无 + +## Response + + ``` + /path/to/snapshot + ``` +## Examples + + + ``` + curl "http://127.0.0.1:8040/api/snapshot?tablet_id=123456&schema_hash=1111111" + + ``` - RESTORE,TABLET,RESTORE,TABLET diff --git a/docs/zh-CN/docs/admin-manual/http-actions/be/tablet-distribution.md b/docs/zh-CN/docs/admin-manual/http-actions/be/tablet-distribution.md new file mode 100644 index 0000000000..c17fa92c05 --- /dev/null +++ b/docs/zh-CN/docs/admin-manual/http-actions/be/tablet-distribution.md @@ -0,0 +1,92 @@ +--- +{ + "title": "查询tablet分布", + "language": "zh-CN" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +# 查询tablet分布 + +## Request + +`GET /api/tablets_distribution?group_by={enum}&partition_id={int}` + +## Description + +获取BE节点上每一个partition下的tablet在不同磁盘上的分布情况 + +## Query parameters + +* `group_by` + 分组,当前只支持`partition` + +* `partition_id` + 指定partition的id,选填,默认返回所有partition。 + +## Request body + +无 + +## Response + + ``` + { + msg: "OK", + code: 0, + data: { + host: "***", + tablets_distribution: [ + { + partition_id:***, + disks:[ + { + disk_path:"***", + tablets_num:***, + tablets:[ + { + tablet_id:***, + schema_hash:***, + tablet_size:*** + }, + + ... + + ] + }, + + ... + + ] + } + ] + }, + count: *** + } + ``` +## Examples + + + ``` + curl "http://127.0.0.1:8040/api/tablets_distribution?group_by=partition&partition_id=123" + + ``` + diff --git a/docs/zh-CN/docs/admin-manual/http-actions/be/tablet-info.md b/docs/zh-CN/docs/admin-manual/http-actions/be/tablet-info.md new file mode 100644 index 0000000000..877e00eb4c --- /dev/null +++ b/docs/zh-CN/docs/admin-manual/http-actions/be/tablet-info.md @@ -0,0 +1,78 @@ +--- +{ + "title": "查询tablet信息", + "language": "zh-CN" +} +--- + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +# 查询tablet信息 + +## Request + +`GET /tablets_json?limit={int}` + +## Description + +获取特定BE节点上指定数量的tablet的tablet id和schema hash信息 + +## Query parameters + +* `limit` + 返回的tablet数量,选填,默认1000个,可填`all`返回全部tablet。 + +## Request body + +无 + +## Response + + ``` + { + msg: "OK", + code: 0, + data: { + host: "10.38.157.107", + tablets: [ + { + tablet_id: 11119, + schema_hash: 714349777 + }, + + ... + + { + tablet_id: 11063, + schema_hash: 714349777 + } + ] + }, + count: 30 + } + ``` +## Examples + + + ``` + curl http://127.0.0.1:8040/api/tablets_json?limit=123 + + ``` + diff --git a/docs/zh-CN/docs/admin-manual/http-actions/be/tablet-migration-action.md b/docs/zh-CN/docs/admin-manual/http-actions/be/tablet-migration.md similarity index 70% rename from docs/zh-CN/docs/admin-manual/http-actions/be/tablet-migration-action.md rename to docs/zh-CN/docs/admin-manual/http-actions/be/tablet-migration.md index c2855b6f9c..d60997836e 100644 --- a/docs/zh-CN/docs/admin-manual/http-actions/be/tablet-migration-action.md +++ b/docs/zh-CN/docs/admin-manual/http-actions/be/tablet-migration.md @@ -1,6 +1,6 @@ --- { - "title": "MIGRATE SINGLE TABLET TO A PARTICULAR DISK", + "title": "迁移tablet", "language": "zh-CN" } --- @@ -24,17 +24,38 @@ specific language governing permissions and limitations under the License. --> -# MIGRATE SINGLE TABLET TO A PARTICULAR DISK - +# 迁移tablet + +## Request + +`GET /api/tablet_migration?goal={enum}&tablet_id={int}&schema_hash={int}&disk={string}` + +## Description + 在BE节点上迁移单个tablet到指定磁盘 -提交迁移任务: +## Query parameters -``` -curl -X GET http://be_host:webserver_port/api/tablet_migration?goal=run&tablet_id=xxx&schema_hash=xxx&disk=xxx -``` +* `goal` + - `run`:提交迁移任务 + - `status`:查询任务的执行状态 + +* `tablet_id` + 需要迁移的tablet的id + +* `schema_hash` + schema hash + +* `disk` + 目标磁盘。 + +## Request body + +无 -返回值就是tablet迁移任务的提交结果: +## Response + +### 提交结果 ``` { @@ -50,13 +71,7 @@ curl -X GET http://be_host:webserver_port/api/tablet_migration?goal=run&tablet_i } ``` -查询迁移任务状态: - -``` -curl -X GET http://be_host:webserver_port/api/tablet_migration?goal=status&tablet_id=xxx&schema_hash=xxx -``` - -返回值就是tablet迁移任务执行状态: +### 执行状态 ``` { @@ -84,4 +99,13 @@ curl -X GET http://be_host:webserver_port/api/tablet_migration?goal=status&table msg: "migration task failed.", dest_disk: "xxxxxx" } -``` \ No newline at end of file +``` + +## Examples + + + ``` + curl "http://127.0.0.1:8040/api/tablet_migration?goal=run&tablet_id=123&schema_hash=333&disk=/disk1" + + ``` + diff --git a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md b/docs/zh-CN/docs/admin-manual/http-actions/be/tablet-reload.md similarity index 58% copy from docs/en/docs/admin-manual/http-actions/be/restore-tablet.md copy to docs/zh-CN/docs/admin-manual/http-actions/be/tablet-reload.md index df6c8867d0..b03a1c4e8a 100644 --- a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md +++ b/docs/zh-CN/docs/admin-manual/http-actions/be/tablet-reload.md @@ -1,7 +1,7 @@ --- { - "title": "RESTORE TABLET", - "language": "en" + "title": "重加载tablet", + "language": "zh-CN" } --- @@ -24,18 +24,42 @@ specific language governing permissions and limitations under the License. --> -# RESTORE TABLET -## description - - To restore the tablet data from trash dir on BE +# 重加载tablet - METHOD: POST - URI: http://be_host:be_http_port/api/restore_tablet?tablet_id=xxx&schema_hash=xxx +## Request -## example +`GET /api/reload_tablet?tablet_id={int}&schema_hash={int}&path={string}"` - curl -X POST "http://hostname:8088/api/restore_tablet?tablet_id=123456\&schema_hash=1111111" +## Description -## keyword +该功能用于重加载tablet数据。 + +## Query parameters + +* `tablet_id` + 需要重加载的table的id + +* `schema_hash` + schema hash + +* `path` + 文件路径 + + +## Request body + +无 + +## Response + + ``` + load header succeed + ``` +## Examples + + + ``` + curl "http://127.0.0.1:8040/api/reload_tablet?tablet_id=123456&schema_hash=1111111&path=/abc" + + ``` - RESTORE,TABLET,RESTORE,TABLET diff --git a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md b/docs/zh-CN/docs/admin-manual/http-actions/be/tablet-restore.md similarity index 58% rename from docs/en/docs/admin-manual/http-actions/be/restore-tablet.md rename to docs/zh-CN/docs/admin-manual/http-actions/be/tablet-restore.md index df6c8867d0..c738b8e6fd 100644 --- a/docs/en/docs/admin-manual/http-actions/be/restore-tablet.md +++ b/docs/zh-CN/docs/admin-manual/http-actions/be/tablet-restore.md @@ -1,7 +1,7 @@ --- { - "title": "RESTORE TABLET", - "language": "en" + "title": "恢复tablet", + "language": "zh-CN" } --- @@ -24,18 +24,42 @@ specific language governing permissions and limitations under the License. --> -# RESTORE TABLET -## description - - To restore the tablet data from trash dir on BE +# 恢复tablet - METHOD: POST - URI: http://be_host:be_http_port/api/restore_tablet?tablet_id=xxx&schema_hash=xxx +## Request -## example +`POST /api/restore_tablet?tablet_id={int}&schema_hash={int}"` - curl -X POST "http://hostname:8088/api/restore_tablet?tablet_id=123456\&schema_hash=1111111" +## Description -## keyword +该功能用于恢复trash目录中被误删的tablet数据。 + +## Query parameters + +* `tablet_id` + 需要恢复的table的id + +* `schema_hash` + schema hash + + +## Request body + +无 + +## Response + + ``` + { + msg: "OK", + code: 0 + } + ``` +## Examples + + + ``` + curl -X POST "http://127.0.0.1:8040/api/restore_tablet?tablet_id=123456&schema_hash=1111111" + + ``` - RESTORE,TABLET,RESTORE,TABLET diff --git a/docs/zh-CN/docs/admin-manual/http-actions/be/tablets_distribution.md b/docs/zh-CN/docs/admin-manual/http-actions/be/tablets_distribution.md deleted file mode 100644 index 44c410aa6d..0000000000 --- a/docs/zh-CN/docs/admin-manual/http-actions/be/tablets_distribution.md +++ /dev/null @@ -1,124 +0,0 @@ ---- -{ - "title": "GET TABLETS DISTRIBUTION BETWEEN DIFFERENT DISKS", - "language": "zh-CN" -} ---- - -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -# GET TABLETS DISTRIBUTION BETWEEN DIFFERENT DISKS - -获取BE节点上每一个partition下的tablet在不同磁盘上的分布情况 - -``` -curl -X GET http://be_host:webserver_port/api/tablets_distribution?group_by=partition -``` - -返回值就是BE节点上每一个partition下的tablet在各个磁盘上的数量分布,只包含tablet数量。 - -``` -{ - msg: "OK", - code: 0, - data: { - host: "***", - tablets_distribution: [ - { - partition_id:***, - disks:[ - { - disk_path:"***", - tablets_num:***, - }, - { - disk_path:"***", - tablets_num:***, - }, - - ... - - ] - }, - { - partition_id:***, - disks:[ - { - disk_path:"***", - tablets_num:***, - }, - { - disk_path:"***", - tablets_num:***, - }, - - ... - - ] - }, - - ... - - ] - }, - count: *** -} -``` - -``` -curl -X GET http://be_host:webserver_port/api/tablets_distribution?group_by=partition&partition_id=xxx -``` - -返回值就是BE节点上指定id的partition下的tablet在各个磁盘上的分布,包含tablet数量以及每一个tablet的id、schema hash和tablet size信息。 - -``` -{ - msg: "OK", - code: 0, - data: { - host: "***", - tablets_distribution: [ - { - partition_id:***, - disks:[ - { - disk_path:"***", - tablets_num:***, - tablets:[ - { - tablet_id:***, - schema_hash:***, - tablet_size:*** - }, - - ... - - ] - }, - - ... - - ] - } - ] - }, - count: *** -} -``` diff --git a/docs/zh-CN/docs/admin-manual/http-actions/be/be-version-info-action.md b/docs/zh-CN/docs/admin-manual/http-actions/be/version-info.md similarity index 65% rename from docs/zh-CN/docs/admin-manual/http-actions/be/be-version-info-action.md rename to docs/zh-CN/docs/admin-manual/http-actions/be/version-info.md index cbdc744b9d..b527e97798 100644 --- a/docs/zh-CN/docs/admin-manual/http-actions/be/be-version-info-action.md +++ b/docs/zh-CN/docs/admin-manual/http-actions/be/version-info.md @@ -1,6 +1,6 @@ --- { - "title": "Be Version Info Action", + "title": "BE版本信息", "language": "zh-CN" } --- @@ -24,11 +24,11 @@ specific language governing permissions and limitations under the License. --> -# Be Version Info Action +# BE版本信息 ## Request -`GET be_host:be_http_port/api/be_version_info` +`GET /api/be_version_info` ## Description @@ -73,27 +73,7 @@ under the License. ``` - GET be_host:be_http_port/api/be_version_info + curl http://127.0.0.1:8040/api/be_version_info - Response: - { - "msg":"success", - "code":0, - "data":{ - "beVersionInfo":{ - "dorisBuildVersionPrefix":"doris", - "dorisBuildVersionMajor":0, - "dorisBuildVersionMinor":0, - "dorisBuildVersionPatch":0, - "dorisBuildVersionRcVersion":"trunk", - "dorisBuildVersion":"doris-0.0.0-trunk", - "dorisBuildHash":"git://4b7b503d1cb3/data/doris/doris/be/../@a04f9814fe5a09c0d9e9399fe71cc4d765f8bff1", - "dorisBuildShortHash":"a04f981", - "dorisBuildTime":"Fri, 09 Sep 2022 07:57:02 UTC", - "dorisBuildInfo":"root@4b7b503d1cb3" - } - }, - "count":0 - } ``` --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org