|
| 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 | +``` |
0 commit comments