Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ greptime metasrv start --help
| `--http-timeout <HTTP_TIMEOUT>` | HTTP 请求超时时间(秒) |
| `--selector <SELECTOR>` | 您可以参考 [selector-type](/contributor-guide/metasrv/selector.md#selector-type) |
| `--store-addrs <STORE_ADDR>` | 逗号或空格分隔的键值存储服务器(默认是 etcd)地址,用于存储元数据 |
| `--use-memory-store` | 用内存存储而不是其他持久化的存储后端,仅用于测试目的的 |
| `--use-memory-store` | 用内存存储而不是其他持久化的存储后端,仅用于测试目的 |

所有的 `addr` 类选项都是 `ip:port` 形式的字符串。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ ALTER TABLE monitor DROP COLUMN load_15;
ALTER TABLE monitor MODIFY COLUMN load_15 STRING;
```

被修改的的列不能是 tag 列(primary key)或 time index 列,同时该列必须允许空值 `NULL` 存在来保证数据能够安全地进行转换(转换失败时返回 `NULL`)。
被修改的列不能是 tag 列(primary key)或 time index 列,同时该列必须允许空值 `NULL` 存在来保证数据能够安全地进行转换(转换失败时返回 `NULL`)。

### 设置列默认值

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ GreptimeDB 的存储文件结构包括以下内容:
- `cache`: 内部的数据缓存目录,比如对象存储的本地缓存等。
- `logs`: GreptimeDB 日志文件目录。
- `wal`: 预写日志文件目录。
- `index_intermediate`: 索引构建和查询相关的的临时中间数据目录
- `index_intermediate`: 索引构建和查询相关的临时中间数据目录

## 云存储

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ create_topic_timeout = "30s"
| `data_home` | String | `./greptimedb_data/metasrv/` | 工作目录。 |
| `bind_addr` | String | `127.0.0.1:3002` | Metasrv 的绑定地址。 |
| `server_addr` | String | `127.0.0.1:3002` | 前端和 datanode 连接到 Metasrv 的通信服务器地址,默认为本地主机的 `127.0.0.1:3002`。 |
| `store_addrs` | Array | `["127.0.0.1:2379"]` | 元数据服务地址,默认值为 `["127.0.0.1:2379"]`。支持配置多个服务地址,格式为 `["ip1:port1","ip2:port2",...]`。默认使用 Etcd 做为元数据后端。<br/>根据你的存储服务器类型配置地址,例如:<br/>- 使用 `"127.0.0.1:2379"` 连接到 etcd<br/>- 使用 `"password=password dbname=postgres user=postgres host=localhost port=5432"` 连接到 postgres<br/>- 使用 `"mysql://user:password@ip:port/dbname"` 连接到 mysql |
| `store_addrs` | Array | `["127.0.0.1:2379"]` | 元数据服务地址,默认值为 `["127.0.0.1:2379"]`。支持配置多个服务地址,格式为 `["ip1:port1","ip2:port2",...]`。默认使用 Etcd 作为元数据后端。<br/>根据你的存储服务器类型配置地址,例如:<br/>- 使用 `"127.0.0.1:2379"` 连接到 etcd<br/>- 使用 `"password=password dbname=postgres user=postgres host=localhost port=5432"` 连接到 postgres<br/>- 使用 `"mysql://user:password@ip:port/dbname"` 连接到 mysql |
| `selector` | String | `lease_based` | 创建新表时选择 datanode 的负载均衡策略,详见 [选择器](/contributor-guide/metasrv/selector.md)。 |
| `use_memory_store` | Boolean | `false` | 仅用于在没有 etcd 集群时的测试,将数据存储在内存中,默认值为 `false`。 |
| `enable_region_failover` | Bool | `false` | 是否启用 region failover。<br/>该功能仅在以集群模式运行的 GreptimeDB 上可用,并且<br/>- 使用远程 WAL<br/>- 使用共享存储(如 s3)。 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ GreptimeDB 支持对数据表进行分区,以分散读写热点并实现水平

GreptimeDB 在每次主要版本更新时都会发布[benchmark report](https://github.com/GreptimeTeam/greptimedb/tree/VAR::greptimedbVersion/docs/benchmarks/tsbs),
里面提供了单个分区的写入吞吐量作为参考。
你可以在你的的目标场景根据该报告来估计写入量是否接近单个分区的限制
你可以在你的目标场景根据该报告来估计写入量是否接近单个分区的限制

估计分区总数时,可以考虑写入吞吐量并额外预留 50% 的 CPU 资源,以确保查询性能和稳定性。也可以根据需要调整此比例。例如,如果查询较多,那么可以预留更多 CPU 资源。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ EOF

## 从局域网连接运行在安卓设备上的 GreptimeDB

> 您可以通过`ifconfig`来获取您所使用的的安卓设备的网络地址
> 您可以通过`ifconfig`来获取您所使用的安卓设备的网络地址

在启动 GreptimeDB 后,您可以从局域网内安装了 MySQL 客户端的设备上通过 MySQL 协议访问 GreptimeDB。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ curl -i -XPOST "http://localhost:4000/v1/influxdb/write?db=public&precision=ms&u
`/influxdb/write` 支持查询参数,包括:

* `db`:指定要写入的数据库。默认值为 `public`
* `precision`:定义请求体中提供的时间戳的精度,可接受的值为 `ns`(纳秒)、`us`(微秒)、`ms`(毫秒)和 `s`(秒),默认值为 `ns`(纳秒)。该 API 写入的时间戳类型为 `TimestampNanosecond`,因此默认精度为 `ns`(纳秒)。如果你在请求体中使用了其他精度的的时间戳,需要使用此参数指定精度。该参数确保时间戳能够被准确解释并以纳秒精度存储。
* `precision`:定义请求体中提供的时间戳的精度,可接受的值为 `ns`(纳秒)、`us`(微秒)、`ms`(毫秒)和 `s`(秒),默认值为 `ns`(纳秒)。该 API 写入的时间戳类型为 `TimestampNanosecond`,因此默认精度为 `ns`(纳秒)。如果你在请求体中使用了其他精度的时间戳,需要使用此参数指定精度。该参数确保时间戳能够被准确解释并以纳秒精度存储。

你还可以在发送请求时省略 timestamp,GreptimeDB 将使用主机机器的当前系统时间(UTC 时间)作为 timestamp。例如:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ org = ""
token = ""
```

上述配置使用的是 InfluxDB 行协议的 v2 版本。Vector 会根据 TOML 配置中的的字段来判断 InfluxDB 协议的版本,所以请务必确保配置中存在 `bucket`、`org` 和 `token` 字段。具体字段的解释如下:
上述配置使用的是 InfluxDB 行协议的 v2 版本。Vector 会根据 TOML 配置中的字段来判断 InfluxDB 协议的版本,所以请务必确保配置中存在 `bucket`、`org` 和 `token` 字段。具体字段的解释如下:

- `type`: InfluxDB 行协议的值为 `influxdb_metrics`.
- `bucket`: GreptimeDB 中的 database 名称。
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ ALTER TABLE monitor DROP COLUMN load_15;
ALTER TABLE monitor MODIFY COLUMN load_15 STRING;
```

被修改的的列不能是 tag 列(primary key)或 time index 列,同时该列必须允许空值 `NULL` 存在来保证数据能够安全地进行转换(转换失败时返回 `NULL`)。
被修改的列不能是 tag 列(primary key)或 time index 列,同时该列必须允许空值 `NULL` 存在来保证数据能够安全地进行转换(转换失败时返回 `NULL`)。

#### 修改表的参数

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ GreptimeDB 的存储文件结构包括以下内容:
- `cache`: 内部的数据缓存目录,比如对象存储的本地缓存等。
- `logs`: GreptimeDB 日志文件目录。
- `wal`: 预写日志文件目录。
- `index_intermediate`: 索引构建和查询相关的的临时中间数据目录
- `index_intermediate`: 索引构建和查询相关的临时中间数据目录

## 云存储

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ backoff_deadline = "5mins"
| `data_home` | String | `/tmp/metasrv/` | 工作目录。 |
| `bind_addr` | String | `127.0.0.1:3002` | Metasrv 的绑定地址。 |
| `server_addr` | String | `127.0.0.1:3002` | 前端和 datanode 连接到 Metasrv 的通信服务器地址,默认为本地主机的 `127.0.0.1:3002`。 |
| `store_addrs` | Array | `["127.0.0.1:2379"]` | 元数据服务地址,默认值为 `["127.0.0.1:2379"]`。支持配置多个服务地址,格式为 `["ip1:port1","ip2:port2",...]`。默认使用 Etcd 做为元数据后端。<br/>根据你的存储服务器类型配置地址,例如:<br/>- 使用 `"127.0.0.1:2379"` 连接到 etcd<br/>- 使用 `"password=password dbname=postgres user=postgres host=localhost port=5432"` 连接到 postgres |
| `store_addrs` | Array | `["127.0.0.1:2379"]` | 元数据服务地址,默认值为 `["127.0.0.1:2379"]`。支持配置多个服务地址,格式为 `["ip1:port1","ip2:port2",...]`。默认使用 Etcd 作为元数据后端。<br/>根据你的存储服务器类型配置地址,例如:<br/>- 使用 `"127.0.0.1:2379"` 连接到 etcd<br/>- 使用 `"password=password dbname=postgres user=postgres host=localhost port=5432"` 连接到 postgres |
| `selector` | String | `lease_based` | 创建新表时选择 datanode 的负载均衡策略,详见 [选择器](/contributor-guide/metasrv/selector.md)。 |
| `use_memory_store` | Boolean | `false` | 仅用于在没有 etcd 集群时的测试,将数据存储在内存中,默认值为 `false`。 |
| enable_region_failover | Bool | false | 是否启用 region failover。<br/>该功能仅在以集群模式运行的 GreptimeDB 上可用,并且<br/>- 使用远程 WAL<br/>- 使用共享存储(如 s3)。 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ EOF

## 从局域网连接运行在安卓设备上的 GreptimeDB

> 您可以通过`ifconfig`来获取您所使用的的安卓设备的网络地址
> 您可以通过`ifconfig`来获取您所使用的安卓设备的网络地址

在启动 GreptimeDB 后,您可以从局域网内安装了 MySQL 客户端的设备上通过 MySQL 协议访问 GreptimeDB。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ curl -i -XPOST "http://localhost:4000/v1/influxdb/write?db=public&precision=ms"
`/influxdb/write` 支持查询参数,包括:

* `db`:指定要写入的数据库。默认值为 `public`。
* `precision`:定义请求体中提供的时间戳的精度,可接受的值为 `ns`(纳秒)、`us`(微秒)、`ms`(毫秒)和 `s`(秒),默认值为 `ns`(纳秒)。该 API 写入的时间戳类型为 `TimestampNanosecond`,因此默认精度为 `ns`(纳秒)。如果你在请求体中使用了其他精度的的时间戳,需要使用此参数指定精度。该参数确保时间戳能够被准确解释并以纳秒精度存储。
* `precision`:定义请求体中提供的时间戳的精度,可接受的值为 `ns`(纳秒)、`us`(微秒)、`ms`(毫秒)和 `s`(秒),默认值为 `ns`(纳秒)。该 API 写入的时间戳类型为 `TimestampNanosecond`,因此默认精度为 `ns`(纳秒)。如果你在请求体中使用了其他精度的时间戳,需要使用此参数指定精度。该参数确保时间戳能够被准确解释并以纳秒精度存储。

你还可以在发送请求时省略 timestamp,GreptimeDB 将使用主机机器的当前系统时间(UTC 时间)作为 timestamp。例如:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ ALTER TABLE monitor DROP COLUMN load_15;
ALTER TABLE monitor MODIFY COLUMN load_15 STRING;
```

被修改的的列不能是 tag 列(primary key)或 time index 列,同时该列必须允许空值 `NULL` 存在来保证数据能够安全地进行转换(转换失败时返回 `NULL`)。
被修改的列不能是 tag 列(primary key)或 time index 列,同时该列必须允许空值 `NULL` 存在来保证数据能够安全地进行转换(转换失败时返回 `NULL`)。

### 修改表的参数

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ GreptimeDB 支持对数据表进行分区,以分散读写热点并实现水平

GreptimeDB 在每次主要版本更新时都会发布[benchmark report](https://github.com/GreptimeTeam/greptimedb/tree/main/docs/benchmarks/tsbs),
里面提供了单个分区的写入吞吐量作为参考。
你可以在你的的目标场景根据该报告来估计写入量是否接近单个分区的限制
你可以在你的目标场景根据该报告来估计写入量是否接近单个分区的限制

估计分区总数时,可以考虑写入吞吐量并额外预留 50% 的 CPU 资源,以确保查询性能和稳定性。也可以根据需要调整此比例。例如,如果查询较多,那么可以预留更多 CPU 资源。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ GreptimeDB 的存储文件结构包括以下内容:
- `cache`: 内部的数据缓存目录,比如对象存储的本地缓存等。
- `logs`: GreptimeDB 日志文件目录。
- `wal`: 预写日志文件目录。
- `index_intermediate`: 索引构建和查询相关的的临时中间数据目录
- `index_intermediate`: 索引构建和查询相关的临时中间数据目录

## 云存储

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ backoff_deadline = "5mins"
| `data_home` | String | `./greptimedb_data/metasrv/` | 工作目录。 |
| `bind_addr` | String | `127.0.0.1:3002` | Metasrv 的绑定地址。 |
| `server_addr` | String | `127.0.0.1:3002` | 前端和 datanode 连接到 Metasrv 的通信服务器地址,默认为本地主机的 `127.0.0.1:3002`。 |
| `store_addrs` | Array | `["127.0.0.1:2379"]` | 元数据服务地址,默认值为 `["127.0.0.1:2379"]`。支持配置多个服务地址,格式为 `["ip1:port1","ip2:port2",...]`。默认使用 Etcd 做为元数据后端。<br/>根据你的存储服务器类型配置地址,例如:<br/>- 使用 `"127.0.0.1:2379"` 连接到 etcd<br/>- 使用 `"password=password dbname=postgres user=postgres host=localhost port=5432"` 连接到 postgres |
| `store_addrs` | Array | `["127.0.0.1:2379"]` | 元数据服务地址,默认值为 `["127.0.0.1:2379"]`。支持配置多个服务地址,格式为 `["ip1:port1","ip2:port2",...]`。默认使用 Etcd 作为元数据后端。<br/>根据你的存储服务器类型配置地址,例如:<br/>- 使用 `"127.0.0.1:2379"` 连接到 etcd<br/>- 使用 `"password=password dbname=postgres user=postgres host=localhost port=5432"` 连接到 postgres |
| `selector` | String | `lease_based` | 创建新表时选择 datanode 的负载均衡策略,详见 [选择器](/contributor-guide/metasrv/selector.md)。 |
| `use_memory_store` | Boolean | `false` | 仅用于在没有 etcd 集群时的测试,将数据存储在内存中,默认值为 `false`。 |
| enable_region_failover | Bool | false | 是否启用 region failover。<br/>该功能仅在以集群模式运行的 GreptimeDB 上可用,并且<br/>- 使用远程 WAL<br/>- 使用共享存储(如 s3)。 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ EOF

## 从局域网连接运行在安卓设备上的 GreptimeDB

> 您可以通过`ifconfig`来获取您所使用的的安卓设备的网络地址
> 您可以通过`ifconfig`来获取您所使用的安卓设备的网络地址

在启动 GreptimeDB 后,您可以从局域网内安装了 MySQL 客户端的设备上通过 MySQL 协议访问 GreptimeDB。

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ curl -i -XPOST "http://localhost:4000/v1/influxdb/write?db=public&precision=ms"
`/influxdb/write` 支持查询参数,包括:

* `db`:指定要写入的数据库。默认值为 `public`。
* `precision`:定义请求体中提供的时间戳的精度,可接受的值为 `ns`(纳秒)、`us`(微秒)、`ms`(毫秒)和 `s`(秒),默认值为 `ns`(纳秒)。该 API 写入的时间戳类型为 `TimestampNanosecond`,因此默认精度为 `ns`(纳秒)。如果你在请求体中使用了其他精度的的时间戳,需要使用此参数指定精度。该参数确保时间戳能够被准确解释并以纳秒精度存储。
* `precision`:定义请求体中提供的时间戳的精度,可接受的值为 `ns`(纳秒)、`us`(微秒)、`ms`(毫秒)和 `s`(秒),默认值为 `ns`(纳秒)。该 API 写入的时间戳类型为 `TimestampNanosecond`,因此默认精度为 `ns`(纳秒)。如果你在请求体中使用了其他精度的时间戳,需要使用此参数指定精度。该参数确保时间戳能够被准确解释并以纳秒精度存储。

你还可以在发送请求时省略 timestamp,GreptimeDB 将使用主机机器的当前系统时间(UTC 时间)作为 timestamp。例如:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ ALTER TABLE monitor DROP COLUMN load_15;
ALTER TABLE monitor MODIFY COLUMN load_15 STRING;
```

被修改的的列不能是 tag 列(primary key)或 time index 列,同时该列必须允许空值 `NULL` 存在来保证数据能够安全地进行转换(转换失败时返回 `NULL`)。
被修改的列不能是 tag 列(primary key)或 time index 列,同时该列必须允许空值 `NULL` 存在来保证数据能够安全地进行转换(转换失败时返回 `NULL`)。

### 修改表的参数

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ GreptimeDB 支持对数据表进行分区,以分散读写热点并实现水平

GreptimeDB 在每次主要版本更新时都会发布[benchmark report](https://github.com/GreptimeTeam/greptimedb/tree/VAR::greptimedbVersion/docs/benchmarks/tsbs),
里面提供了单个分区的写入吞吐量作为参考。
你可以在你的的目标场景根据该报告来估计写入量是否接近单个分区的限制
你可以在你的目标场景根据该报告来估计写入量是否接近单个分区的限制

估计分区总数时,可以考虑写入吞吐量并额外预留 50% 的 CPU 资源,以确保查询性能和稳定性。也可以根据需要调整此比例。例如,如果查询较多,那么可以预留更多 CPU 资源。

Expand Down
Loading