Skip to content

Commit 029a39d

Browse files
loserwang1024wuchong
authored andcommitted
[docs] Add documentation for updating cluster configs and table configs (#1870)
1 parent 151a49f commit 029a39d

File tree

7 files changed

+92
-12
lines changed

7 files changed

+92
-12
lines changed

website/docs/engine-flink/ddl.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,35 @@ DROP TABLE my_table;
220220

221221
This will entirely remove all the data of the table in the Fluss cluster.
222222

223+
## Alter Table
224+
### SET properties
225+
The SET statement allows users to configure one or more connector options including the [Storage Options](engine-flink/options.md#storage-options) for a specified table. If a particular option is already configured on the table, it will be overridden with the new value.
226+
227+
When using SET to modify [Storage Options](engine-flink/options.md#storage-options), the Fluss cluster will dynamically apply the changes to the table. This can be useful for modifying table behavior without needing to recreate the table.
228+
229+
**Supported Options to modify**
230+
- All [Read Options](engine-flink/options.md#read-options), [Write Options](engine-flink/options.md#write-options), [Lookup Options](engine-flink/options.md#lookup-options) and [Other Options](engine-flink/options.md#other-options) except `bootstrap.servers`.
231+
- The following [Storage Options](engine-flink/options.md#storage-options):
232+
- `table.datalake.enabled`: Enable or disable lakehouse storage for the table.
233+
234+
```sql title="Flink SQL"
235+
ALTER TABLE my_table SET ('table.datalake.enabled' = 'true');
236+
```
237+
238+
**Limits**
239+
- If lakehouse storage (`table.datalake.enabled`) is already enabled for a table, options with lakehouse format prefixes (e.g., `paimon.*`) cannot be modified again.
240+
241+
242+
### RESET properties
243+
Reset one or more connector option including the [Storage Options](engine-flink/options.md#storage-options) to its default value.
244+
245+
The following example illustrates reset the `table.datalake.enabled` option to its default value `false` on the table.
246+
247+
```sql title="Flink SQL"
248+
ALTER TABLE my_table RESET ('table.datalake.enabled');
249+
```
250+
251+
223252
## Add Partition
224253

225254
Fluss supports manually adding partitions to an existing partitioned table through the Fluss Catalog. If the specified partition

website/docs/engine-flink/options.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,16 @@ INSERT INTO pk_table2 /*+ OPTIONS('sink.ignore-delete'='true') */ select * from
4949
```
5050

5151

52-
### Configure options by altering table
52+
### Reconfigure options by altering table
5353

54-
This is not supported yet, but is planned in the near future.
55-
For example, the following SQL statement alters the Fluss table with the `table.log.ttl` set to 7 days:
54+
Using `ALTER TABLE ... SET` statement to modify the table options. For example, to enable lakehouse storage for an existing table, you can run the following SQL command:
5655

5756
```sql
58-
ALTER TABLE log_table SET ('table.log.ttl' = '7d');
57+
ALTER TABLE log_table SET ('table.datalake.enable' = 'true');
5958
```
6059

60+
See more details about [ALTER TABLE ... SET](engine-flink/ddl.md#set-properties) and [ALTER TABLE ... RESET](engine-flink/ddl.md#reset-properties) documentation.
61+
6162
## Storage Options
6263

6364
| Option | Type | Default | Description |
@@ -85,6 +86,7 @@ ALTER TABLE log_table SET ('table.log.ttl' = '7d');
8586
| table.merge-engine.versioned.ver-column | String | (None) | The column name of the version column for the `versioned` merge engine. If the merge engine is set to `versioned`, the version column must be set. |
8687
| table.delete.behavior | Enum | ALLOW | Controls the behavior of delete operations on primary key tables. Three modes are supported: `ALLOW` (default) - allows normal delete operations; `IGNORE` - silently ignores delete requests without errors; `DISABLE` - rejects delete requests and throws explicit errors. This configuration provides system-level guarantees for some downstream pipelines (e.g., Flink Delta Join) that must not receive any delete events in the changelog of the table. For tables with `first_row` or `versioned` merge engines, this option is automatically set to `IGNORE` and cannot be overridden. Only applicable to primary key tables. |
8788

89+
8890
## Read Options
8991

9092
| Option | Type | Default | Description |

website/docs/maintenance/operations/graceful-shutdown.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
---
2+
title: Graceful Shutdown
3+
sidebar_position: 3
4+
---
5+
16
# Graceful Shutdown
27

38
Apache Fluss provides a **comprehensive graceful shutdown mechanism** to ensure data integrity and proper resource cleanup when stopping servers or services.
@@ -78,10 +83,8 @@ The controlled shutdown process can be configured using the following options:
7883

7984
```yaml
8085
# server.yaml
81-
tablet-server:
82-
controlled-shutdown:
83-
max-retries: 5
84-
retry-interval: 2000ms
86+
tablet-server.controlled-shutdown.max-retries: 5
87+
tablet-server.controlled-shutdown.retry-interval: 2000ms
8588
```
8689
8790
## Monitoring Shutdown
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
title: Updating Configs
3+
sidebar_position: 1
4+
---
5+
# Updating Configs
6+
7+
## Overview
8+
9+
Fluss allows you to update cluster or table configurations dynamically without requiring a cluster restart or table recreation. This section demonstrates how to modify and apply such configurations.
10+
11+
## Updating Cluster Configs
12+
13+
From Fluss version 0.8 onwards, some of the server configs can be updated without restarting the server.
14+
15+
Currently, the supported dynamically updatable server configurations include:
16+
- `datalake.format`: Enable lakehouse storage by specifying the lakehouse format, e.g., `paimon`, `iceberg`.
17+
- Options with prefix `datalake.${datalake.format}`
18+
19+
20+
You can update the configuration of a cluster with [Java client](apis/java-client.md).
21+
Here is a code snippet to demonstrate how to update the cluster configurations using the Java Client:
22+
23+
```java
24+
// Enable lakehouse storage with Paimon format
25+
admin.alterClusterConfigs(
26+
Collections.singletonList(
27+
new AlterConfig(DATALAKE_FORMAT.key(), "paimon", AlterConfigOpType.SET)));
28+
29+
// Disable lakehouse storage
30+
admin.alterClusterConfigs(
31+
Collections.singletonList(
32+
new AlterConfig(DATALAKE_FORMAT.key(), "paimon", AlterConfigOpType.DELETE)));
33+
```
34+
35+
The `AlterConfig` class contains three properties:
36+
* `key`: The configuration key to be modified (e.g., `datalake.format`)
37+
* `value`: The configuration value to be set (e.g., `paimon`)
38+
* `opType`: The operation type, either `AlterConfigOpType.SET` or `AlterConfigOpType.DELETE`
39+
40+
41+
## Updating Table Configs
42+
43+
The connector options on a table including [Storage Options](engine-flink/options.md#storage-options) can be updated dynamically by [ALTER TABLE ... SET](engine-flink/ddl.md#alter-table) statement. See the example below:
44+
45+
```sql
46+
-- Enable lakehouse storage for the given table
47+
ALTER TABLE my_table SET ('table.datalake.enabled' = 'true');
48+
```

website/docs/maintenance/operations/upgrade-notes-0.8.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Upgrade Notes
3-
sidebar_position: 3
3+
sidebar_position: 4
44
---
55

66
# Upgrade Notes from v0.7 to v0.8

website/docs/maintenance/operations/upgrading.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Upgrading and Compatibility
3-
sidebar_position: 1
3+
sidebar_position: 3
44
---
55

66
As an online storage service, Fluss is typically designed to operate over extended periods, often spanning several years.

website/src/css/custom.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@
190190
color: var(--ifm-color-primary);
191191
}
192192
ul {
193-
margin: 16px 0;
194193
padding-left: 20px;
195194
li {
196195
margin-top: 4px;
@@ -208,7 +207,6 @@
208207
}*/
209208
}
210209
ol {
211-
margin: 16px 0;
212210
padding-left: 20px;
213211
li {
214212
list-style: decimal;

0 commit comments

Comments
 (0)