You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "loserwang1024 (via GitHub)" <gi...@apache.org> on 2025/10/27 04:04:01 UTC
[PR] Add documentation for alter table configuration [fluss]
loserwang1024 opened a new pull request, #1870:
URL: https://github.com/apache/fluss/pull/1870
# Conflicts:
# website/docs/maintenance/operations/upgrade-notes-0.8.md
<!--
*Thank you very much for contributing to Fluss - we are happy that you want to help us improve Fluss. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
## Contribution Checklist
- Make sure that the pull request corresponds to a [GitHub issue](https://github.com/apache/fluss/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no issue.
- Name the pull request in the format "[component] Title of the pull request", where *[component]* should be replaced by the name of the component being changed. Typically, this corresponds to the component label assigned to the issue (e.g., [kv], [log], [client], [flink]). Skip *[component]* if you are unsure about which is the best component.
- Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
- Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes.
- Each pull request should address only one issue, not mix up code from multiple issues.
**(The sections below can be removed for hotfixes or typos)**
-->
### Purpose
<!-- Linking this pull request to the issue -->
Linked issue: close #1793 and #1792
<!-- What is the purpose of the change -->
### Brief change log
<!-- Please describe the changes made in this pull request and explain how they address the issue -->
### Tests
<!-- List UT and IT cases to verify this change -->
### API and Format
<!-- Does this change affect API or storage format -->
### Documentation
<!-- Does this change introduce a new feature -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add documentation for alter table configuration [fluss]
Posted by "polyzos (via GitHub)" <gi...@apache.org>.
polyzos commented on PR #1870:
URL: https://github.com/apache/fluss/pull/1870#issuecomment-3466610252
pushed one small change to fix the sidebar ordering.. LGTM
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add documentation for alter table configuration [fluss]
Posted by "loserwang1024 (via GitHub)" <gi...@apache.org>.
loserwang1024 commented on code in PR #1870:
URL: https://github.com/apache/fluss/pull/1870#discussion_r2479997250
##########
website/docs/maintenance/operations/alter-config.md:
##########
@@ -0,0 +1,42 @@
+---
+title: Alter Configurations
+sidebar_position: 1
+---
+# Alter Configurations
+## 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:
Review Comment:
My mistake, enable here.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add documentation for alter table configuration [fluss]
Posted by "loserwang1024 (via GitHub)" <gi...@apache.org>.
loserwang1024 commented on PR #1870:
URL: https://github.com/apache/fluss/pull/1870#issuecomment-3449417705
@wuchong , CC
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add documentation for alter table configuration [fluss]
Posted by "wuchong (via GitHub)" <gi...@apache.org>.
wuchong merged PR #1870:
URL: https://github.com/apache/fluss/pull/1870
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add documentation for alter table configuration [fluss]
Posted by "snuyanzin (via GitHub)" <gi...@apache.org>.
snuyanzin commented on code in PR #1870:
URL: https://github.com/apache/fluss/pull/1870#discussion_r2469845315
##########
website/docs/engine-flink/options.md:
##########
@@ -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.
Review Comment:
```suggestion
1. `bootstrap.servers`, `bucket.num` and `bucket.key` cannot be altered.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add documentation for alter table configuration [fluss]
Posted by "polyzos (via GitHub)" <gi...@apache.org>.
polyzos commented on code in PR #1870:
URL: https://github.com/apache/fluss/pull/1870#discussion_r2476816461
##########
website/docs/maintenance/operations/alter-config.md:
##########
@@ -0,0 +1,42 @@
+---
+title: Alter Configurations
+sidebar_position: 1
+---
+# Alter Configurations
+## 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
Review Comment:
maybe `AlterConfigOpType.SET` or `AlterConfigOpType.DELETE`
##########
website/docs/maintenance/operations/alter-config.md:
##########
@@ -0,0 +1,42 @@
+---
+title: Alter Configurations
+sidebar_position: 1
+---
+# Alter Configurations
+## 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:
Review Comment:
is disable correct here? because its a set operation and we have disable later
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add documentation for alter table configuration [fluss]
Posted by "snuyanzin (via GitHub)" <gi...@apache.org>.
snuyanzin commented on code in PR #1870:
URL: https://github.com/apache/fluss/pull/1870#discussion_r2469847633
##########
website/docs/maintenance/operations/alter-config.md:
##########
@@ -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:
+```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.
Review Comment:
```suggestion
1. `bootstrap.servers`, `bucket.num` and `bucket.key` cannot be altered.
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add documentation for alter table configuration [fluss]
Posted by "snuyanzin (via GitHub)" <gi...@apache.org>.
snuyanzin commented on code in PR #1870:
URL: https://github.com/apache/fluss/pull/1870#discussion_r2469842873
##########
website/docs/engine-flink/ddl.md:
##########
@@ -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 examples illustrate the usage of the RESET statements.
+```sql title="Flink SQL"
+ALTER TABLE my_table RESET ('table.datalake.enabled');
+```
Review Comment:
```suggestion
The following example illustrates the usage of the RESET statements.
```sql title="Flink SQL"
ALTER TABLE my_table RESET ('table.datalake.enabled');
```
```
since so far there is only one example
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add documentation for alter table configuration [fluss]
Posted by "loserwang1024 (via GitHub)" <gi...@apache.org>.
loserwang1024 commented on PR #1870:
URL: https://github.com/apache/fluss/pull/1870#issuecomment-3466430994
@snuyanzin Thanks for your review. Just modified it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org