Skip to content

Commit

Permalink
fix: format
Browse files Browse the repository at this point in the history
  • Loading branch information
killme2008 committed Nov 25, 2024
1 parent fd8a755 commit 48548a6
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 64 deletions.
32 changes: 16 additions & 16 deletions docs/reference/sql/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,22 +99,7 @@ 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 |
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`.
|
| `ttl` | The storage time of the table data | A time duration string such as `'60m'`, `'1h'` for one hour, `'14d'` for 14 days etc. Supported time units are: `s` / `m` / `h` / `d`. |
| `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 All @@ -135,6 +120,21 @@ CREATE TABLE IF NOT EXISTS temperatures(
) with(ttl='7d');
```

The `ttl` value is a time duration string that 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`.

#### Create a table with custom storage
Create a table that stores the data in Google Cloud Storage:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,22 +101,7 @@ CREATE TABLE [IF NOT EXISTS] [db.]table_name

| 选项 | 描述 ||
| ------------------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `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`
|
| `ttl` | 表数据的存储时间 | 一个时间范围字符串,例如 `'60m'`, `'1h'` 代表 1 小时, `'14d'` 代表 14 天等。支持的时间单位有:`s` / `m` / `h` / `d`|
| `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 All @@ -137,6 +122,21 @@ CREATE TABLE IF NOT EXISTS temperatures(
) with(ttl='7d');
```

`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`

#### 创建自定义存储的表
或者创建一个表单独将数据存储在 Google Cloud Storage 服务上:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,22 +101,7 @@ CREATE TABLE [IF NOT EXISTS] [db.]table_name

| 选项 | 描述 ||
| ------------------- | ---------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| `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`
|
| `ttl` | 表数据的存储时间 | 一个时间范围字符串,例如 `'60m'`, `'1h'` 代表 1 小时, `'14d'` 代表 14 天等。支持的时间单位有:`s` / `m` / `h` / `d`|
| `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 All @@ -137,6 +122,21 @@ CREATE TABLE IF NOT EXISTS temperatures(
) with(ttl='7d');
```

`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`

#### 创建自定义存储的表
或者创建一个表单独将数据存储在 Google Cloud Storage 服务上:

Expand Down
32 changes: 16 additions & 16 deletions versioned_docs/version-0.10/reference/sql/create.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,22 +99,7 @@ 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 |
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`.
|
| `ttl` | The storage time of the table data | A time duration string such as `'60m'`, `'1h'` for one hour, `'14d'` for 14 days etc. Supported time units are: `s` / `m` / `h` / `d` |
| `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 All @@ -135,6 +120,21 @@ CREATE TABLE IF NOT EXISTS temperatures(
) with(ttl='7d');
```

The `ttl` value is a time duration string that 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`.

#### Create a table with custom storage
Create a table that stores the data in Google Cloud Storage:

Expand Down

0 comments on commit 48548a6

Please sign in to comment.