|
| 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. |
0 commit comments