This is an automated email from the ASF dual-hosted git repository.
chenhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new 192f88bb47 [website]rest api documentation patch for GC and
ReadonlyState (#3877)
192f88bb47 is described below
commit 192f88bb470cdec1d731b99a0d85fb668cf3dec2
Author: 赤月 <[email protected]>
AuthorDate: Mon Nov 6 17:41:52 2023 +0800
[website]rest api documentation patch for GC and ReadonlyState (#3877)
### Motivation
Improve the Http Rest API documentation
---
site3/website/docs/admin/http.md | 104 ++++++++++++++++++++++++++++++++++++---
1 file changed, 96 insertions(+), 8 deletions(-)
diff --git a/site3/website/docs/admin/http.md b/site3/website/docs/admin/http.md
index 73777ac128..067c746aab 100644
--- a/site3/website/docs/admin/http.md
+++ b/site3/website/docs/admin/http.md
@@ -22,9 +22,9 @@ Currently all the HTTP endpoints could be divided into these
5 components:
* Description: Get heartbeat status for a specific bookie
* Response:
-| Code | Description |
-|:-------|:------------|
-|200 | Successful operation |
+ | Code | Description |
+ |:-------|:------------|
+ |200 | Successful operation |
## Config
@@ -240,7 +240,7 @@ Currently all the HTTP endpoints could be divided into
these 5 components:
* Response:
| Code | Description |
- |:-------|:------------|
+ |:-------|:------------|
|200 | Successful operation |
|403 | Permission denied |
|404 | Not found |
@@ -324,6 +324,11 @@ Currently all the HTTP endpoints could be divided into
these 5 components:
### Endpoint: /api/v1/bookie/gc
1. Method: PUT
* Description: trigger gc for this bookie.
+ * Parameters:
+ | Name | Type | Required | Description |
+ |:-----|:-----|:---------|:------------|
+ |forceMajor | Boolean | No | only trigger the forceMajor gc for this
bookie. |
+ |forceMinor | Boolean | No | only trigger the forceMinor gc for this
bookie. |
* Response:
| Code | Description |
@@ -383,7 +388,7 @@ Currently all the HTTP endpoints could be divided into
these 5 components:
* Response:
| Code | Description |
- |:-------|:------------|
+ |:-------|:------------|
|200 | Successful operation |
|403 | Permission denied |
|404 | Not found |
@@ -393,7 +398,7 @@ Currently all the HTTP endpoints could be divided into
these 5 components:
* Response:
| Code | Description |
- |:-------|:------------|
+ |:-------|:------------|
|200 | Successful operation |
|403 | Permission denied |
|404 | Not found |
@@ -419,7 +424,7 @@ Currently all the HTTP endpoints could be divided into
these 5 components:
* Response:
| Code | Description |
- |:-------|:------------|
+ |:-------|:------------|
|200 | Successful operation |
|403 | Permission denied |
|404 | Not found |
@@ -482,7 +487,7 @@ Currently all the HTTP endpoints could be divided into
these 5 components:
* Parameters:
| Name | Type | Required | Description |
- |:-----|:-----|:---------|:------------|
+ |:-----|:-----|:---------|:------------|
|entryLocationRocksDBCompact | String | Yes | Configuration name(key) |
|entryLocations | String | no | entry location rocksDB path |
* Body:
@@ -517,9 +522,92 @@ Currently all the HTTP endpoints could be divided into
these 5 components:
}
```
+### Endpoint: /api/v1/bookie/state/readonly
+1. Method: GET
+ * Description: Get bookie readOnly state.
+ * Response:
+
+ | Code | Description |
+ |:-------|:------------|
+ |200 | Successful operation |
+ |403 | Permission denied |
+ |404 | Not found |
+ * Body:
+ ```json
+ {
+ "readOnly" : false
+ }
+ ```
+
+2. Method: PUT
+ * Description: Set bookie readOnly state.
+ * Body:
+ ```json
+ {
+ "readOnly": true
+ }
+ ```
+ * Parameters:
+
+ | Name | Type | Required | Description |
+ |:-----|:-----|:---------|:------------|
+ | readOnly | Boolean | Yes | Whether bookie readOnly state. |
+ * Response:
+
+ | Code | Description |
+ |:-------|:------------|
+ |200 | Successful operation |
+ |403 | Permission denied |
+ |404 | Not found |
+ * Body:
+ ```json
+ {
+ "readOnly": true
+ }
+ ```
+
## Auto recovery
+### Endpoint: /api/v1/autorecovery/status?enabled=<boolean>
+1. Method: GET
+ * Description: Get autorecovery enable status with cluster.
+ * Response:
+
+ | Code | Description |
+ |:-------|:------------|
+ |200 | Successful operation |
+ |403 | Permission denied |
+ |404 | Not found |
+ * Response Body format:
+
+ ```json
+ {
+ "enabled": true
+ }
+ ```
+
+2. Method: PUT
+ * Description: Set autorecovery enable status with cluster.
+ * Parameters:
+
+ | Name | Type | Required | Description |
+ |:-----|:---------|:-----------------------------------|:------------|
+ |enabled | Boolean | Yes | Whether autorecovery enable status |
+ * Response:
+
+ | Code | Description |
+ |:-------|:------------|
+ |200 | Successful operation |
+ |403 | Permission denied |
+ |404 | Not found |
+ * Body:
+ ```json
+ {
+ "enabled": true
+ }
+ ```
+
### Endpoint: /api/v1/autorecovery/bookie/
1. Method: PUT
* Description: Ledger data recovery for failed bookie