[lake/paimon] Support custom Paimon lake table path#3476
Open
wzx140 wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds support for mapping Fluss lake-enabled tables to a custom Paimon lake table database/table name, and routes lake reads/writes/alter operations through the resolved lake table path while validating/guarding unsupported connectors.
Changes:
- Introduce
table.datalake.database-name/table.datalake.table-nameandLakeTableUtilto resolve the effective lakeTablePath. - Route Flink
$lakereads, coordinator lake-catalog operations, and Paimon tiering writer/committer to the mapped lake table path. - Clear persisted tiering progress when lake table path mapping changes; add Hive-catalog IT coverage and Spark connector restriction for custom mapping.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| pom.xml | Adds Hive/Derby/Datanucleus version properties used by new Hive-catalog IT. |
| fluss-spark/fluss-spark-common/src/main/scala/org/apache/fluss/spark/SparkTable.scala | Rejects custom lake path usage in Spark connector (currently). |
| fluss-server/src/test/java/org/apache/fluss/server/zk/data/lake/LakeTableHelperTest.java | Adds test for clearing lake progress snapshot + offset files. |
| fluss-server/src/test/java/org/apache/fluss/server/coordinator/CoordinatorEventProcessorTest.java | Adds test to ensure altering lake path clears committed progress when datalake disabled. |
| fluss-server/src/main/java/org/apache/fluss/server/zk/data/lake/LakeTableHelper.java | Adds clearLakeTableProgress API to delete ZK entry + discard snapshot metadata. |
| fluss-server/src/main/java/org/apache/fluss/server/zk/ZooKeeperClient.java | Adds deleteLakeTable helper to remove lake progress node. |
| fluss-server/src/main/java/org/apache/fluss/server/utils/TableDescriptorValidation.java | Validates custom lake path support + alter-property restrictions (including paimon.path rules). |
| fluss-server/src/main/java/org/apache/fluss/server/coordinator/MetadataManager.java | Routes lake catalog create/alter/schema ops via resolved lake table path. |
| fluss-server/src/main/java/org/apache/fluss/server/coordinator/CoordinatorService.java | Routes lake table creation via resolved lake table path. |
| fluss-server/src/main/java/org/apache/fluss/server/coordinator/CoordinatorEventProcessor.java | Clears lake table progress when resolved lake path changes. |
| fluss-lake/fluss-lake-paimon/src/test/java/org/apache/fluss/lake/paimon/tiering/PaimonTieringITCase.java | Adds tiering IT verifying custom mapped lake table path. |
| fluss-lake/fluss-lake-paimon/src/test/java/org/apache/fluss/lake/paimon/flink/FlinkUnionReadPrimaryKeyTableITCase.java | Adds union-read IT validating $lake reads with custom mapping. |
| fluss-lake/fluss-lake-paimon/src/test/java/org/apache/fluss/lake/paimon/LakeEnabledTableCreateWithHiveCatalogITCase.java | Adds Hive metastore IT verifying paimon.path alteration rules with mapping options. |
| fluss-lake/fluss-lake-paimon/src/test/java/org/apache/fluss/lake/paimon/LakeEnabledTableCreateITCase.java | Adds IT validating alter behavior of lake path options when enabled/disabled. |
| fluss-lake/fluss-lake-paimon/src/main/java/org/apache/fluss/lake/paimon/utils/PaimonConversions.java | Allows path option to be set (removes CoreOptions.PATH from unsettable). |
| fluss-lake/fluss-lake-paimon/src/main/java/org/apache/fluss/lake/paimon/tiering/PaimonLakeWriter.java | Uses resolved lake table path when opening the Paimon table for writing. |
| fluss-lake/fluss-lake-paimon/src/main/java/org/apache/fluss/lake/paimon/tiering/PaimonLakeCommitter.java | Uses resolved lake table path for table access and stats computation. |
| fluss-lake/fluss-lake-paimon/pom.xml | Adds Hive/Derby/Datanucleus test dependencies for Hive-catalog IT. |
| fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/flink/catalog/FlinkCatalogTest.java | Adds Flink catalog test for $lake resolution with custom mapping. |
| fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/utils/LakeSourceUtils.java | Creates lake sources using resolved lake table path. |
| fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/lake/LakeTableFactory.java | Resolves Flink lake ObjectIdentifier using mapped database/table + metadata suffix. |
| fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/catalog/FlinkCatalog.java | Routes lake table lookup to mapped lake path and correct metadata-table naming. |
| fluss-common/src/main/java/org/apache/fluss/metadata/TableInfo.java | Exposes getLakeTablePath() / hasCustomLakePath() helpers. |
| fluss-common/src/main/java/org/apache/fluss/metadata/LakeTableUtil.java | New utility to resolve lake TablePath and metadata table names with mapping. |
| fluss-common/src/main/java/org/apache/fluss/config/FlussConfigUtils.java | Allows lake mapping options to be altered (when permitted). |
| fluss-common/src/main/java/org/apache/fluss/config/ConfigOptions.java | Adds new config options for lake database/table mapping. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
Author
|
@luoyuxia Could you please help review this one? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
table.datalake.database-nameandtable.datalake.table-name.$lakereads and Paimon tiering creation/writes to the mapping lake table path.paimon.pathto be changed only together with lake table path mapping parameters; reject standalonepaimon.pathalteration.UT Coverage
FlinkCatalogTest#testGetLakeTableWithCustomLakePath: verifies Flink catalog resolves$lakeand metadata-table reads to the custom lake database/table.FlinkUnionReadPrimaryKeyTableITCase#testUnionReadWithCustomLakeTablePath: verifies Flink union read can read from the mapped Paimon lake table and merge lake data with the Fluss tail.PaimonTieringITCase#testTieringWithCustomLakeTablePath: verifies Paimon tiering creates/writes the lake table at the custom mapped path and records the expected snapshot progress.LakeEnabledTableCreateITCase#testAlterLakePathOptionsValidation: verifies lake path mapping options can be altered while datalake is disabled, and cannot be altered after datalake is enabled.LakeEnabledTableCreateWithHiveCatalogITCase#testAlterPaimonPathRequiresLakePathOptions: verifies standalonepaimon.pathalteration is rejected, whilepaimon.pathaltered together with mapping options is accepted and used when enabling datalake with HiveCatalog.CoordinatorEventProcessorTest#testAlterLakePathClearsProgressWhenDatalakeDisabled: verifies changing lake path mapping while datalake is disabled clears existing tiering progress.