Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
22 changes: 22 additions & 0 deletions website/docs/engine-flink/ddl.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,28 @@ DROP TABLE my_table;

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

## Alter Table
### SET
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.

**Limits**
1. `bootstrap.servers`, `bucket.num` and `bucket.key` cannot be altered.
2. All the table options except `table.datalake.enabled` can be modified.
3. If lakehouse is already enabled for a table, options with lakehouse format prefixes (e.g., `paimon.*`) cannot be set again.
```sql title="Flink SQL"
ALTER TABLE my_table SET ('table.datalake.enabled' = 'paimon');
```


### RESET
Reset one or more [Storage Options](engine-flink/options.md#storage-options) to its default value.

The following example illustrates the usage of the RESET statements.
```sql title="Flink SQL"
ALTER TABLE my_table RESET ('table.datalake.enabled');
```


## Add Partition

Fluss supports manually adding partitions to an existing partitioned table through the Fluss Catalog. If the specified partition
Expand Down
6 changes: 6 additions & 0 deletions website/docs/engine-flink/options.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ ALTER TABLE log_table SET ('table.log.ttl' = '7d');
| 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. |
| 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. |

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


## Read Options

| Option | Type | Default | Description |
Expand Down
42 changes: 42 additions & 0 deletions website/docs/maintenance/operations/alter-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: Alter Configuration
sidebar_position: 4
---
# Alter Configuration
## Overview

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.

## Alter Cluster Configuration

Currently, you can only alter the configuration of a cluster with [Java client](apis/java-client.md).

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.

The AlterConfig class contains three key properties:
* key: The configuration key to be modified (e.g., `datalake.format`)
* value: The configuration value to be set (e.g., "paimon")
* opType: The operation type, either AlterConfigOpType.SET or AlterConfigOpType.DELETE

To disable a cluster, you can use the following code:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is disable correct here? because its a set operation and we have disable later

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My mistake, enable here.

```java
admin.alterClusterConfigs(
Collections.singletonList(
new AlterConfig(DATALAKE_FORMAT.key(), "paimon", AlterConfigOpType.SET)));
```

To disable a cluster, you can use the following code:
```java
admin.alterClusterConfigs(
Collections.singletonList(
new AlterConfig(DATALAKE_FORMAT.key(), "paimon", AlterConfigOpType.DELETE)));
```

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.

## Alter Table Configuration

Storage Options can be altered by [Alter Table](engine-flink/ddl.md#alter-table). The limitations are as follows:
1. `bootstrap.servers`, `bucket.num` and `bucket.key` cannot be altered.
2. All the table options except `table.datalake.enabled` can be modified.
3. If lakehouse is already enabled for a table, options with lakehouse format prefixes (e.g., `paimon.*`) cannot be set again.
5 changes: 5 additions & 0 deletions website/docs/maintenance/operations/graceful-shutdown.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
title: Graceful Shutdown
sidebar_position: 3
---

# Graceful Shutdown

Apache Fluss provides a **comprehensive graceful shutdown mechanism** to ensure data integrity and proper resource cleanup when stopping servers or services.
Expand Down