Skip to content

Commit

Permalink
Merge pull request #4 from morningman/doris-ui-doc
Browse files Browse the repository at this point in the history
Add restful api docs and modify some codes
  • Loading branch information
hf200012 authored Aug 3, 2020
2 parents afac376 + 4f4e171 commit c36211b
Show file tree
Hide file tree
Showing 77 changed files with 2,675 additions and 1,878 deletions.
125 changes: 125 additions & 0 deletions docs/zh-CN/administrator-guide/http-actions/fe/bootstrap-action.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
---
{
"title": "Bootstrap Action",
"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.
-->

# Bootstrap Action

## Request

`GET /api/bootstrap`

## Description

用于判断FE是否启动完成。当不提供任何参数时,仅返回是否启动成功。如果提供了 `token``cluster_id`,则返回更多详细信息

## Path parameters


## Query parameters

* `cluster_id`

集群id。可以在 `palo-meta/image/VERSION` 文件中查看。

* `token`

集群token。可以在 `palo-meta/image/VERSION` 文件中查看。

## Request body


## Response

* 不提供参数

```
{
"msg": "OK",
"code": 200,
"data": null,
"count": 0
}
```
code 为 200 表示FE节点启动成功。非 200 的错误码表示其他错误。
* 提供 `token` 和 `cluster_id`
```
{
"msg": "OK",
"code": 200,
"data": {
"queryPort": 9030,
"rpcPort": 9020,
"maxReplayedJournal": 17287
},
"count": 0
}
```
* `queryPort` 是 FE 节点的 MySQL 协议端口。
* `rpcPort` 是 FE 节点的 thrift RPC 端口。
* `maxReplayedJournal` 表示 FE 节点当前回放的最大元数据日志id。
## Examples
1. 不提供参数
```
GET /api/bootstrap
Response:
{
"msg": "OK",
"code": 200,
"data": null,
"count": 0
}
```
2. 提供 `token` 和 `cluster_id`
```
GET /api/bootstrap?cluster_id=935437471&token=ad87f6dd-c93f-4880-bcdb-8ca8c9ab3031
Response:
{
"msg": "OK",
"code": 200,
"data": {
"queryPort": 9030,
"rpcPort": 9020,
"maxReplayedJournal": 17287
},
"count": 0
}
```
96 changes: 96 additions & 0 deletions docs/zh-CN/administrator-guide/http-actions/fe/cancel-load.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
{
"title": "CANCEL LOAD",
"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.
-->

# CANCEL LOAD

## Request

`POST /api/<db>/_cancel`

## Description

用于取消掉指定label的导入任务。

## Path parameters

* `<db>`

指定数据库名称

## Query parameters

* `<label>`

指定导入label

## Request body


## Response

* 取消成功

```
{
"msg": "OK",
"code": 200,
"data": null,
"count": 0
}
```
* 取消失败
```
{
"msg": "Error msg",
"code": 1,
"data": null,
"count": 0
}
```
## Examples
1. 取消指定label的导入事务
```
POST /api/example_db/_cancel?label=my_label1
Response:
{
"msg": "OK",
"code": 200,
"data": null,
"count": 0
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
---
{
"title": "Check Decommission Action",
"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.
-->

# Check Decommission Action

## Request

`GET /api/check_decommission`

## Description

用于指定的BE是否能够被下线。比如判断节点下线后,剩余的节点是否能够满足空间要求和副本数要求等。

## Path parameters


## Query parameters

* `host_ports`

指定一个多个BE,由逗号分隔。如:`ip1:port1,ip2:port2,...`

其中 port 为 BE 的 heartbeat port。

## Request body

TODO

## Response

返回可以被下线的节点列表

```
{
"msg": "OK",
"code": 200,
"data": ["192.168.10.11:9050", "192.168.10.11:9050"],
"count": 0
}
```

## Examples

1. 查看指定BE节点是否可以下线

```
GET /api/check_decommission?host_ports=192.168.10.11:9050,192.168.10.11:9050
Response:
{
"msg": "OK",
"code": 200,
"data": ["192.168.10.11:9050"],
"count": 0
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
{
"title": "Check Storage Type Action",
"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.
-->

# Check Storage Type Action

## Request

`GET /api/_check_storagetype`

## Description

用于检查指定数据库下的表的存储格式是行存还是列存

## Path parameters


## Query parameters

* db

指定数据库

## Request body


## Response

TODO

## Examples

TODO
Loading

0 comments on commit c36211b

Please sign in to comment.