|
| 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 | +
|
0 commit comments