Skip to content

Commit c36211b

Browse files
authored
Merge pull request #4 from morningman/doris-ui-doc
Add restful api docs and modify some codes
2 parents afac376 + 4f4e171 commit c36211b

77 files changed

Lines changed: 2675 additions & 1878 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
---
2+
{
3+
"title": "Bootstrap Action",
4+
"language": "zh-CN"
5+
}
6+
---
7+
8+
<!--
9+
Licensed to the Apache Software Foundation (ASF) under one
10+
or more contributor license agreements. See the NOTICE file
11+
distributed with this work for additional information
12+
regarding copyright ownership. The ASF licenses this file
13+
to you under the Apache License, Version 2.0 (the
14+
"License"); you may not use this file except in compliance
15+
with the License. You may obtain a copy of the License at
16+
17+
http://www.apache.org/licenses/LICENSE-2.0
18+
19+
Unless required by applicable law or agreed to in writing,
20+
software distributed under the License is distributed on an
21+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
22+
KIND, either express or implied. See the License for the
23+
specific language governing permissions and limitations
24+
under the License.
25+
-->
26+
27+
# Bootstrap Action
28+
29+
## Request
30+
31+
`GET /api/bootstrap`
32+
33+
## Description
34+
35+
用于判断FE是否启动完成。当不提供任何参数时,仅返回是否启动成功。如果提供了 `token` 和 `cluster_id`,则返回更多详细信息
36+
37+
## Path parameters
38+
39+
无
40+
41+
## Query parameters
42+
43+
* `cluster_id`
44+
45+
集群id。可以在 `palo-meta/image/VERSION` 文件中查看。
46+
47+
* `token`
48+
49+
集群token。可以在 `palo-meta/image/VERSION` 文件中查看。
50+
51+
## Request body
52+
53+
无
54+
55+
## Response
56+
57+
* 不提供参数
58+
59+
```
60+
{
61+
"msg": "OK",
62+
"code": 200,
63+
"data": null,
64+
"count": 0
65+
}
66+
```
67+
68+
code 为 200 表示FE节点启动成功。非 200 的错误码表示其他错误。
69+
70+
* 提供 `token` 和 `cluster_id`
71+
72+
```
73+
{
74+
"msg": "OK",
75+
"code": 200,
76+
"data": {
77+
"queryPort": 9030,
78+
"rpcPort": 9020,
79+
"maxReplayedJournal": 17287
80+
},
81+
"count": 0
82+
}
83+
```
84+
85+
* `queryPort` 是 FE 节点的 MySQL 协议端口。
86+
* `rpcPort` 是 FE 节点的 thrift RPC 端口。
87+
* `maxReplayedJournal` 表示 FE 节点当前回放的最大元数据日志id。
88+
89+
## Examples
90+
91+
1. 不提供参数
92+
93+
```
94+
GET /api/bootstrap
95+
96+
Response:
97+
{
98+
"msg": "OK",
99+
"code": 200,
100+
"data": null,
101+
"count": 0
102+
}
103+
```
104+
105+
2. 提供 `token` 和 `cluster_id`
106+
107+
```
108+
GET /api/bootstrap?cluster_id=935437471&token=ad87f6dd-c93f-4880-bcdb-8ca8c9ab3031
109+
110+
Response:
111+
{
112+
"msg": "OK",
113+
"code": 200,
114+
"data": {
115+
"queryPort": 9030,
116+
"rpcPort": 9020,
117+
"maxReplayedJournal": 17287
118+
},
119+
"count": 0
120+
}
121+
```
122+
123+
124+
125+
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
---
2+
{
3+
"title": "CANCEL LOAD",
4+
"language": "zh-CN"
5+
}
6+
---
7+
8+
<!--
9+
Licensed to the Apache Software Foundation (ASF) under one
10+
or more contributor license agreements. See the NOTICE file
11+
distributed with this work for additional information
12+
regarding copyright ownership. The ASF licenses this file
13+
to you under the Apache License, Version 2.0 (the
14+
"License"); you may not use this file except in compliance
15+
with the License. You may obtain a copy of the License at
16+
17+
http://www.apache.org/licenses/LICENSE-2.0
18+
19+
Unless required by applicable law or agreed to in writing,
20+
software distributed under the License is distributed on an
21+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
22+
KIND, either express or implied. See the License for the
23+
specific language governing permissions and limitations
24+
under the License.
25+
-->
26+
27+
# CANCEL LOAD
28+
29+
## Request
30+
31+
`POST /api/<db>/_cancel`
32+
33+
## Description
34+
35+
用于取消掉指定label的导入任务。
36+
37+
## Path parameters
38+
39+
* `<db>`
40+
41+
指定数据库名称
42+
43+
## Query parameters
44+
45+
* `<label>`
46+
47+
指定导入label
48+
49+
## Request body
50+
51+
无
52+
53+
## Response
54+
55+
* 取消成功
56+
57+
```
58+
{
59+
"msg": "OK",
60+
"code": 200,
61+
"data": null,
62+
"count": 0
63+
}
64+
```
65+
66+
* 取消失败
67+
68+
```
69+
{
70+
"msg": "Error msg",
71+
"code": 1,
72+
"data": null,
73+
"count": 0
74+
}
75+
```
76+
77+
## Examples
78+
79+
1. 取消指定label的导入事务
80+
81+
```
82+
POST /api/example_db/_cancel?label=my_label1
83+
84+
Response:
85+
{
86+
"msg": "OK",
87+
"code": 200,
88+
"data": null,
89+
"count": 0
90+
}
91+
```
92+
93+
94+
95+
96+
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
{
3+
"title": "Check Decommission Action",
4+
"language": "zh-CN"
5+
}
6+
---
7+
8+
<!--
9+
Licensed to the Apache Software Foundation (ASF) under one
10+
or more contributor license agreements. See the NOTICE file
11+
distributed with this work for additional information
12+
regarding copyright ownership. The ASF licenses this file
13+
to you under the Apache License, Version 2.0 (the
14+
"License"); you may not use this file except in compliance
15+
with the License. You may obtain a copy of the License at
16+
17+
http://www.apache.org/licenses/LICENSE-2.0
18+
19+
Unless required by applicable law or agreed to in writing,
20+
software distributed under the License is distributed on an
21+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
22+
KIND, either express or implied. See the License for the
23+
specific language governing permissions and limitations
24+
under the License.
25+
-->
26+
27+
# Check Decommission Action
28+
29+
## Request
30+
31+
`GET /api/check_decommission`
32+
33+
## Description
34+
35+
用于指定的BE是否能够被下线。比如判断节点下线后,剩余的节点是否能够满足空间要求和副本数要求等。
36+
37+
## Path parameters
38+
39+
无
40+
41+
## Query parameters
42+
43+
* `host_ports`
44+
45+
指定一个多个BE,由逗号分隔。如:`ip1:port1,ip2:port2,...`。
46+
47+
其中 port 为 BE 的 heartbeat port。
48+
49+
## Request body
50+
51+
TODO
52+
53+
## Response
54+
55+
返回可以被下线的节点列表
56+
57+
```
58+
{
59+
"msg": "OK",
60+
"code": 200,
61+
"data": ["192.168.10.11:9050", "192.168.10.11:9050"],
62+
"count": 0
63+
}
64+
```
65+
66+
## Examples
67+
68+
1. 查看指定BE节点是否可以下线
69+
70+
```
71+
GET /api/check_decommission?host_ports=192.168.10.11:9050,192.168.10.11:9050
72+
73+
Response:
74+
{
75+
"msg": "OK",
76+
"code": 200,
77+
"data": ["192.168.10.11:9050"],
78+
"count": 0
79+
}
80+
```
81+
82+
83+
84+
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
{
3+
"title": "Check Storage Type Action",
4+
"language": "zh-CN"
5+
}
6+
---
7+
8+
<!--
9+
Licensed to the Apache Software Foundation (ASF) under one
10+
or more contributor license agreements. See the NOTICE file
11+
distributed with this work for additional information
12+
regarding copyright ownership. The ASF licenses this file
13+
to you under the Apache License, Version 2.0 (the
14+
"License"); you may not use this file except in compliance
15+
with the License. You may obtain a copy of the License at
16+
17+
http://www.apache.org/licenses/LICENSE-2.0
18+
19+
Unless required by applicable law or agreed to in writing,
20+
software distributed under the License is distributed on an
21+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
22+
KIND, either express or implied. See the License for the
23+
specific language governing permissions and limitations
24+
under the License.
25+
-->
26+
27+
# Check Storage Type Action
28+
29+
## Request
30+
31+
`GET /api/_check_storagetype`
32+
33+
## Description
34+
35+
用于检查指定数据库下的表的存储格式是行存还是列存
36+
37+
## Path parameters
38+
39+
无
40+
41+
## Query parameters
42+
43+
* db
44+
45+
指定数据库
46+
47+
## Request body
48+
49+
无
50+
51+
## Response
52+
53+
TODO
54+
55+
## Examples
56+
57+
TODO

0 commit comments

Comments
 (0)