Skip to content

Commit

Permalink
fix: TTL option doc
Browse files Browse the repository at this point in the history
  • Loading branch information
killme2008 committed Nov 25, 2024
1 parent 51c51d9 commit fd8a755
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 4 deletions.
17 changes: 16 additions & 1 deletion docs/reference/sql/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,22 @@ Users can add table options by using `WITH`. The valid options contain the follo

| Option | Description | Value |
| ------------------- | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ttl` | The storage time of the table data | String value, such as `'60m'`, `'1h'` for one hour, `'14d'` for 14 days etc. Supported time units are: `s` / `m` / `h` / `d` |
| `ttl` | The storage time of the table data |
A time duration string supports the following suffixes:

- `nsec`, `ns` - nanoseconds
- `usec`, `us` - microseconds
- `msec`, `ms` - milliseconds
- `seconds`, `second`, `sec`, `s` - seconds
- `minutes`, `minute`, `min`, `m` - minutes
- `hours`, `hour`, `hr`, `h` - hours
- `days`, `day`, `d` - days
- `weeks`, `week`, `w` - weeks
- `months`, `month`, `M` - months
- `years`, `year`, `y` - years

Multiple units can be combined, e.g., `1hour 12min 5s`.
|
| `storage` | The name of the table storage engine provider | String value, such as `S3`, `Gcs`, etc. It must be configured in `[[storage.providers]]`, see [configuration](/user-guide/deployments/configuration.md#storage-engine-provider). |
| `compaction.type` | Compaction strategy of the table | String value. Only `twcs` is allowed. |
| `compaction.twcs.max_active_window_files` | Max num of files that can be kept in active writing time window | String value, such as '8'. Only available when `compaction.type` is `twcs`. You can refer to this [document](https://cassandra.apache.org/doc/latest/cassandra/managing/operating/compaction/twcs.html) to learn more about the `twcs` compaction strategy. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,22 @@ CREATE TABLE [IF NOT EXISTS] [db.]table_name

| 选项 | 描述 ||
| ------------------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ttl` | 表数据的存储时间 | 字符串值,例如 `'60m'`, `'1h'` 代表 1 小时, `'14d'` 代表 14 天等。支持的时间单位有:`s` / `m` / `h` / `d` |
| `ttl` | 表数据的存储时间 |
时间范围字符串支持以下后缀:

- `nsec`, `ns` - 纳秒
- `usec`, `us` - 微秒
- `msec`, `ms` - 毫秒
- `seconds`, `second`, `sec`, `s` - 秒
- `minutes`, `minute`, `min`, `m` - 分钟
- `hours`, `hour`, `hr`, `h` - 小时
- `days`, `day`, `d` - 天
- `weeks`, `week`, `w` - 周
- `months`, `month`, `M` - 月
- `years`, `year`, `y` - 年

可以组合多个单位,例如:`1hour 12min 5s`
|
| `storage` | 自定义表的存储引擎,存储引擎提供商的名字 | 字符串,类似 `S3``Gcs` 等。 必须在 `[[storage.providers]]` 列表里配置, 参考 [configuration](/user-guide/deployments/configuration.md#存储引擎提供商)|
| `compaction.type` | Compaction 策略 | 字符串值. 只支持 `twcs`。你可以阅读这篇[文章](https://cassandra.apache.org/doc/latest/cassandra/managing/operating/compaction/twcs.html)来了解 `twcs` compaction 策略 |
| `compaction.twcs.max_active_window_files` | 当前活跃时间窗口内的最大文件数 | 字符串值,如 '8'。只在 `compaction.type``twcs` 时可用 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,22 @@ CREATE TABLE [IF NOT EXISTS] [db.]table_name

| 选项 | 描述 ||
| ------------------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ttl` | 表数据的存储时间 | 字符串值,例如 `'60m'`, `'1h'` 代表 1 小时, `'14d'` 代表 14 天等。支持的时间单位有:`s` / `m` / `h` / `d` |
| `ttl` | 表数据的存储时间 |
时间范围字符串支持以下后缀:

- `nsec`, `ns` - 纳秒
- `usec`, `us` - 微秒
- `msec`, `ms` - 毫秒
- `seconds`, `second`, `sec`, `s` - 秒
- `minutes`, `minute`, `min`, `m` - 分钟
- `hours`, `hour`, `hr`, `h` - 小时
- `days`, `day`, `d` - 天
- `weeks`, `week`, `w` - 周
- `months`, `month`, `M` - 月
- `years`, `year`, `y` - 年

可以组合多个单位,例如:`1hour 12min 5s`
|
| `storage` | 自定义表的存储引擎,存储引擎提供商的名字 | 字符串,类似 `S3``Gcs` 等。 必须在 `[[storage.providers]]` 列表里配置, 参考 [configuration](/user-guide/deployments/configuration.md#存储引擎提供商)|
| `compaction.type` | Compaction 策略 | 字符串值. 只支持 `twcs`。你可以阅读这篇[文章](https://cassandra.apache.org/doc/latest/cassandra/managing/operating/compaction/twcs.html)来了解 `twcs` compaction 策略 |
| `compaction.twcs.max_active_window_files` | 当前活跃时间窗口内的最大文件数 | 字符串值,如 '8'。只在 `compaction.type``twcs` 时可用 |
Expand Down
17 changes: 16 additions & 1 deletion versioned_docs/version-0.10/reference/sql/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,22 @@ Users can add table options by using `WITH`. The valid options contain the follo

| Option | Description | Value |
| ------------------- | --------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ttl` | The storage time of the table data | String value, such as `'60m'`, `'1h'` for one hour, `'14d'` for 14 days etc. Supported time units are: `s` / `m` / `h` / `d` |
| `ttl` | The storage time of the table data |
A time duration string supports the following suffixes:

- `nsec`, `ns` - nanoseconds
- `usec`, `us` - microseconds
- `msec`, `ms` - milliseconds
- `seconds`, `second`, `sec`, `s` - seconds
- `minutes`, `minute`, `min`, `m` - minutes
- `hours`, `hour`, `hr`, `h` - hours
- `days`, `day`, `d` - days
- `weeks`, `week`, `w` - weeks
- `months`, `month`, `M` - months
- `years`, `year`, `y` - years

Multiple units can be combined, e.g., `1hour 12min 5s`.
|
| `storage` | The name of the table storage engine provider | String value, such as `S3`, `Gcs`, etc. It must be configured in `[[storage.providers]]`, see [configuration](/user-guide/deployments/configuration.md#storage-engine-provider). |
| `compaction.type` | Compaction strategy of the table | String value. Only `twcs` is allowed. |
| `compaction.twcs.max_active_window_files` | Max num of files that can be kept in active writing time window | String value, such as '8'. Only available when `compaction.type` is `twcs`. You can refer to this [document](https://cassandra.apache.org/doc/latest/cassandra/managing/operating/compaction/twcs.html) to learn more about the `twcs` compaction strategy. |
Expand Down

0 comments on commit fd8a755

Please sign in to comment.