Skip to content

Commit 88e60cf

Browse files
committed
[docs] Add documentation for alter configuration.
1 parent e69e4f4 commit 88e60cf

File tree

4 files changed

+75
-0
lines changed

4 files changed

+75
-0
lines changed

website/docs/engine-flink/ddl.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,28 @@ 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
225+
The SET statement allows you to configure one or more [Storage Options](engine-flink/options.md#storage-options) for a specified table. If a particular storage-option is already configured, it will be overridden with the new value.
226+
227+
**Limits**
228+
1. `bootstrap.servers`,`bucket.num` and `bucket.key` cannot be altered.
229+
2. All the table options except `table.datalake.enabled` can be modified.
230+
3. If lakehouse is already enabled for a table, options with lakehouse format prefixes (e.g., `paimon.*`) cannot be set again.
231+
```sql title="Flink SQL"
232+
ALTER TABLE my_table SET ('table.datalake.enabled' = 'paimon');
233+
```
234+
235+
236+
### RESET
237+
Reset one or more [Storage Options](engine-flink/options.md#storage-options) to its default value.
238+
239+
The following examples illustrate the usage of the RESET statements.
240+
```sql title="Flink SQL"
241+
ALTER TABLE my_table RESET ('table.datalake.enabled');
242+
```
243+
244+
223245
## Add Partition
224246

225247
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 & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ ALTER TABLE log_table SET ('table.log.ttl' = '7d');
8585
| 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. |
8686
| 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. |
8787

88+
Storage Options can be altered by [Alter Table](engine-flink/ddl.md#alter-table). The limitations are as follows:
89+
1. `bootstrap.servers`,`bucket.num` and `bucket.key` cannot be altered.
90+
2. All the table options except `table.datalake.enabled` can be modified.
91+
3. If lakehouse is already enabled for a table, options with lakehouse format prefixes (e.g., `paimon.*`) cannot be set again.
92+
93+
8894
## Read Options
8995

9096
| Option | Type | Default | Description |
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: Alter Configuration
3+
sidebar_position: 4
4+
---
5+
# Alter Configuration
6+
## Overview
7+
8+
Fluss provides ways to alter the configuration of a cluster or a table. You can change and apply the configuration without restarting Fluss server. In this section, we will show how to alter the configuration of a cluster or a table.
9+
10+
## Alter Cluster Configuration
11+
12+
Currently, you can only alter the configuration of a cluster with [Java client](apis/java-client.md).
13+
14+
Currently, only `datalake.format` and options with prefix `datalake.${datalake.format}` can be altered. These options will also be served as table options when getting the table info.
15+
16+
The AlterConfig class contains three key properties:
17+
* key: The configuration key to be modified (e.g., `datalake.format`)
18+
* value: The configuration value to be set (e.g., "paimon")
19+
* opType: The operation type, either AlterConfigOpType.SET or AlterConfigOpType.DELETE
20+
21+
To disable a cluster, you can use the following code:
22+
```java
23+
admin.alterClusterConfigs(
24+
Collections.singletonList(
25+
new AlterConfig(DATALAKE_FORMAT.key(), "paimon", AlterConfigOpType.SET)));
26+
```
27+
28+
To disable a cluster, you can use the following code:
29+
```java
30+
admin.alterClusterConfigs(
31+
Collections.singletonList(
32+
new AlterConfig(DATALAKE_FORMAT.key(), "paimon", AlterConfigOpType.DELETE)));
33+
```
34+
35+
Currently, only `datalake.format` and option with prefix `datalake.${datalake.format}` can be altered. And this options will also be served as table options when getting the table info.
36+
37+
## Alter Table Configuration
38+
39+
Storage Options can be altered by [Alter Table](engine-flink/ddl.md#alter-table). The limitations are as follows:
40+
1. `bootstrap.servers`,`bucket.num` and `bucket.key` cannot be altered.
41+
2. All the table options except `table.datalake.enabled` can be modified.
42+
3. If lakehouse is already enabled for a table, options with lakehouse format prefixes (e.g., `paimon.*`) cannot be set again.

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

Lines changed: 5 additions & 0 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.

0 commit comments

Comments
 (0)