Skip to content

Commit eca0509

Browse files
authored
1.1.1 (#47)
1 parent a4d443e commit eca0509

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+3763
-336
lines changed

LICENSE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,4 +672,3 @@ may consider it more useful to permit linking proprietary applications with
672672
the library. If this is what you want to do, use the GNU Lesser General
673673
Public License instead of this License. But first, please read
674674
<https://www.gnu.org/licenses/why-not-lgpl.html>.
675-

README-CN.md

Lines changed: 61 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ mysql -h127.1 -uroot -P2883
112112
- [三节点配置样例](./example/distributed-example.yaml)
113113
- [单节点 + ODP 配置样例](./example/single-with-obproxy-example.yaml)
114114
- [三节点 + ODP 配置样例](./example/distributed-with-obproxy-example.yaml)
115+
- [三节点 + ODP + obagent 配置样例](./example/obagent/distributed-with-obproxy-and-obagent-example.yaml)
115116

116117
本文以 [小规格开发模式-本地单节点](./example/mini-local-example.yaml) 为例,启动一个本地单节点的 OceanBase 数据库。
117118

@@ -310,12 +311,19 @@ obd cluster deploy <deploy name> [-c <yaml path>] [-f] [-U] [-A]
310311
启动已部署的集群,成功时打印集群状态。
311312

312313
```shell
313-
obd cluster start <deploy name> [-s]
314+
obd cluster start <deploy name> [flags]
314315
```
315316

316317
参数 `deploy name` 为部署配置名称,可以理解为配置文件名称。
317318

318-
选项 `-s` 为 `--strict-check`。部分组件在启动前会做相关的检查,当检查不通过的时候会报警告,不会强制停止流程。使用该选项可开启检查失败报错直接退出。建议开启,可以避免一些资源不足导致的启动失败。非必填项。数据类型为 `bool`。默认不开启。
319+
选项说明见下表:
320+
321+
选项名 | 是否必选 | 数据类型 | 默认值 | 说明
322+
--- | --- | --- |--- |---
323+
-s/--servers | 否 | string | 空 | 机器列表,用 `,` 间隔。用于指定启动的机器。如果组件下的机器没有全部启动,则 start 不会执行 bootstrap。
324+
-c/--components | 否 | string | 空 | 组件列表,用 `,` 间隔。用于指定启动的组件。如果配置下的组件没有全部启动,该配置不会进入 running 状态。
325+
--wop/--without-parameter | 否 | bool | false | 无参启动。启动的时候不带参数。节点第一次的启动时,不响应此选项。
326+
-S/--strict-check | 否 | bool | false | 部分组件在启动前会做相关的检查。检查不通过时,OBD 将发出告警,不会强制停止流程。使用该选项可开启检查失败报错直接退出。建议开启,可以避免一些资源不足导致的启动失败。
319327

320328
#### `obd cluster list`
321329

@@ -361,6 +369,14 @@ obd cluster restart <deploy name>
361369

362370
参数 `deploy name` 为部署配置名称,可以理解为配置文件名称。
363371

372+
选项说明见下表:
373+
374+
选项名 | 是否必选 | 数据类型 | 默认值 | 说明
375+
--- | --- | --- |--- |---
376+
-s/--servers | 否 | string | 空 | 机器列表,用 `,` 间隔。
377+
-c/--components | 否 | string | 空 | 组件列表,用 `,` 间隔。用于指定启动的组件。如果配置下的组件没有全部启动,该配置不会进入 running 状态。
378+
--wop/--without-parameter | 否 | bool | false | 无参启动。启动的时候不带参数。节点第一次的启动时,不响应此选项。
379+
364380
#### `obd cluster redeploy`
365381

366382
重启一个运行中集群。当您使用 `edit-config` 修改一个运行的集群的配置信息后,可以通过 `redeploy` 命令应用修改。
@@ -383,9 +399,16 @@ obd cluster stop <deploy name>
383399

384400
参数 `deploy name` 为部署配置名称,可以理解为配置文件名称。
385401

402+
选项说明见下表:
403+
404+
选项名 | 是否必选 | 数据类型 | 默认值 | 说明
405+
--- | --- | --- |--- |---
406+
-s/--servers | 否 | string | 空 | 机器列表,用 `,` 间隔。用于指定停止的机器。
407+
-c/--components | 否 | string | 空 | 组件列表,用 `,` 间隔。用于指定停止的组件。如果配置下的组件没有全部停止,该配置不会进入 stopped 状态。
408+
386409
#### `obd cluster destroy`
387410

388-
销毁已部署的集群。如果集群处于运行中的状态,该命令会先尝试执行`stop`,成功后再执行`destroy`。
411+
销毁已部署的集群。如果集群处于运行中的状态,该命令会先尝试执行 `stop`,成功后再执行 `destroy`。
389412

390413
```shell
391414
obd cluster destroy <deploy name> [-f]
@@ -410,7 +433,7 @@ obd cluster tenant create <deploy name> [-n <tenant name>] [flags]
410433
选项名 | 是否必选 | 数据类型 | 默认值 | 说明
411434
--- | --- | --- |--- | ---
412435
-n/--tenant-name | 否 | string | test | 租户名。对应的资源单元和资源池根据租户名自动生成,并且避免重名。
413-
--max-cpu | 否 | float | 0 | 租户可用最大 CPU 数。为 0 时使用集群剩余全部可用 CPU。实际值低于 2 时报错。
436+
--max-cpu | 否 | float | 0 | 租户可用最大 CPU 数。为 0 时使用集群剩余全部可用 CPU。
414437
--min-cpu | 否 | float | 0 | 租户可用最小 CPU 数。为 0 时等于 --max-cpu。
415438
--max-memory | 否 | int | 0 | 租户可用最大内存。为 0 时使用集群剩余全部可用内存。实际值低于 1G 时报错。
416439
--min-memory | 否 | int | 0 | 租户可用最大内存。为 0 时等于 --max-memory。
@@ -507,6 +530,40 @@ obd test sysbench <deploy name> [flags]
507530
--events | 否 | int | 0 | 最大请求数量,定义数量后可以不需要 --time 选项。
508531
--rand-type | 否 | string | 访问数据时使用的随机生成函数。取值可以为 special、uniform、gaussian 或 pareto。 默认值为 special, 早期值为 uniform。
509532
---skip-trx | 否 | string | 空 | 在只读测试中打开或关闭事务。
533+
-O/--optimization | 否 | int | 1 | 自动调优等级。为 0 时关闭。
534+
535+
536+
#### `obd test tpch`
537+
538+
对 OcecanBase 数据库或 ODP 组件的指定节点执行 TPC-H。 TPC-H 需要 OBClient 和 obtpch,请先安装 OBClient 和 obtpch。
539+
TPC-H 需要指定一台OceanBase目标服务器作为执行对象。在执行TPC-H测试前,OBD会将测试需要的数据文件传输到指定机器的指定目录下,这些文件可能会比较大,请确保机器上足够的磁盘空间。
540+
当然你也可以提前在目标机器上准备好数据文件,再通过`--dt/--disable-transfer`选项关闭传输。
541+
542+
```shell
543+
obd test tpch <deploy name> [flags]
544+
```
545+
546+
参数 `deploy name` 为部署配置名称,可以理解为配置文件名称。
547+
548+
选项名 | 是否必选 | 数据类型 | 默认值 | 说明
549+
--- | --- | --- |--- | ---
550+
--test-server | 否 | string | 默指定的组件下服务器中的第一个节点。 | 必须是指定的组件下的某个节点名。
551+
--user | 否 | string | root | 执行测试的用户名。
552+
--password | 否 | string | 默认为空 | 执行测试的用户密码。
553+
--tenant | 否 | string | test | 执行测试的租户名。
554+
--database | 否 | string | test | 执行测试的数据库。
555+
--obclient-bin | 否 | string | obclient | OBClient 二进制文件路径。
556+
--dbgen-bin | 否 | string | /usr/local/tpc-h-tools/bin/dbgen | dbgen 二进制文件路径。
557+
--dss-config | 否 | string | /usr/local/tpc-h-tools/ | dists.dss所在目录。
558+
-s/--scale-factor | 否 | int | 1 | 自动生成测试数据的规模,单位为G。
559+
-tmp-dir | 否 | string | ./tmp | 执行tpch时的临时目录。自动生成的测试数据,自动调优的sql文件,执行测试sql的日志文件等都会存在这里。
560+
--ddl-path | 否 | string | 默认为空 | ddl 文件路径或目录。为空时,OBD会使用自带的ddl文件。
561+
--tbl-path | 否 | string | 默认为空 | tbl 文件路径或目录。为空时,使用dbgen生成测试数据。
562+
--sql-path | 否 | string | 默认为空 | sql 文件路径或目录。为空时,OBD会使用自带的sql文件。
563+
--remote-tbl-dir | 否 | string | 默认为空 | 目标observer上存放tbl的目录,绝对路径,请保证observer的启动用户对该目录有读写权限。在不开启`--test-only`的情况下该选项为必填项
564+
--test-only | 否 | bool | false | 不执行初始化,仅执行测试sql。
565+
--dt/--disable-transfer | 否 | bool | false | 禁用传输。开启后将不会把本地tbl传输到远程remote-tbl-dir下,而是直接使用目标机器remote-tbl-dir下的tbl文件。
566+
-O/--optimization | 否 | int | 1 | 自动调优等级。为 0 时关闭。
510567

511568
## Q&A
512569

README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -93,27 +93,28 @@ To start an OceanBase cluster, follow these steps:
9393

9494
Select a configuration file based on your resource configurations:
9595

96-
#### Small-scale development mode
96+
#### Small-scale deployment mode
9797

98-
This development mode applies to personal devices with at least 8 GB of memory.
98+
This deployment mode applies to personal devices with at least 8 GB of memory.
9999

100100
- [Sample configuration file for local single-node deployment](./example/mini-local-example.yaml)
101101
- [Sample configuration file for single-node deployment](./example/mini-single-example.yaml)
102102
- [Sample configuration file for three-node deployment](./example/mini-distributed-example.yaml)
103103
- [Sample configuration file for single-node deployment with ODP](./example/mini-single-with-obproxy-example.yaml)
104104
- [Sample configuration file for three-node deployment with ODP](./example/mini-distributed-with-obproxy-example.yaml)
105105

106-
#### Professional development mode
106+
#### Professional deployment mode
107107

108-
This development mode applies to advanced Elastic Compute Service (ECS) instances or physical servers with at least 16 CPU cores and 64 GB of memory.
108+
This deployment mode applies to advanced Elastic Compute Service (ECS) instances or physical servers with at least 16 CPU cores and 64 GB of memory.
109109

110-
- [Sample configuration file for local single-node development](./example/local-example.yaml)
111-
- [Sample configuration file for single-node development](./example/single-example.yaml)
112-
- [Sample configuration file for three-node development](./example/distributed-example.yaml)
113-
- [Sample configuration file for single-node development with ODP](./example/single-with-obproxy-example.yaml)
114-
- [Sample configuration file for three-node development with ODP](./example/distributed-with-obproxy-example.yaml)
110+
- [Sample configuration file for local single-node deployment](./example/local-example.yaml)
111+
- [Sample configuration file for single-node deployment](./example/single-example.yaml)
112+
- [Sample configuration file for three-node deployment](./example/distributed-example.yaml)
113+
- [Sample configuration file for single-node deployment with ODP](./example/single-with-obproxy-example.yaml)
114+
- [Sample configuration file for three-node deployment with ODP](./example/distributed-with-obproxy-example.yaml)
115+
- [Sample configuration file for three-node deployment with ODP and obagent](./example/obagent/distributed-with-obproxy-and-obagent-example.yaml)
115116

116-
This section describes how to start a local single-node OceanBase cluster by using the [sample configuration file for local single-node deployment in the small-scale development mode](./example/mini-local-example.yaml).
117+
This section describes how to start a local single-node OceanBase cluster by using the [sample configuration file for local single-node deployment in the small-scale deployment mode](./example/mini-local-example.yaml).
117118

118119
```shell
119120
# Modify the working directory of the OceanBase cluster: home_path.
@@ -122,7 +123,7 @@ This section describes how to start a local single-node OceanBase cluster by usi
122123
vi ./example/mini-local-example.yaml
123124
```
124125

125-
If the target server to run the OceanBase cluster is not the logged-in server, do not use the `sample configuration file for local single-node development`. Use another configuration file.
126+
If the target server to run the OceanBase cluster is not the logged-in server, do not use the `sample configuration file for local single-node deployment`. Use another configuration file.
126127
Do not forget to change the user password at the beginning of the configuration file.
127128

128129
```yaml
@@ -409,7 +410,7 @@ This table describes the corresponding options.
409410
| Option | Required | Data type | Default value | Description |
410411
--- | --- | --- |--- | ---
411412
| -n/--tenant-name | No | string | test | The tenant name. OBD will automatically generate resource units and resource pools with unique names based on the tenant name. |
412-
| --max-cpu | No | float | 0 | The maximum number of CPU cores available for the tenant. When this option is set to 0, all available CPU cores of the cluster can be used by the tenant. When the value is less than two, an error is returned. |
413+
| --max-cpu | No | float | 0 | The maximum number of CPU cores available for the tenant. When this option is set to 0, all available CPU cores of the cluster can be used by the tenant. |
413414
| --min-cpu | No | float | 0 | The minimum number of CPU cores available for the tenant. When this option is set to 0, the minimum number of CPU cores is the same as the maximum number of CPU cores. |
414415
| --max-memory | No | int | 0 | The maximum memory capacity available for the tenant. When this option is set to 0, all available memory capacity of the cluster can be used by the tenant. When the actual value is less than 1 GB, an error is returned. |
415416
| --min-memory | No | int | 0 | The minimum memory capacity available for the tenant. When this option is set to 0, the minimum memory capacity is the same as the maximum memory capacity. |

_arch.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ def getCanonArch(skipRpmPlatform = 0):
280280
return getCanonSPARCArch(arch)
281281
if arch == "x86_64":
282282
return getCanonX86_64Arch(arch)
283+
return arch
283284

284285
canonArch = getCanonArch()
285286

0 commit comments

Comments
 (0)