-
Notifications
You must be signed in to change notification settings - Fork 458
[lake] LakeCatalog supports multi-tenancy #1901
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
34bc5f7 to
84c1e4c
Compare
luoyuxia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LiebingYu Only one minor comment.
fluss-common/src/main/java/org/apache/fluss/lake/lakestorage/LakeCatalog.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds a Context interface to the LakeCatalog API to provide contextual information (specifically the FlussPrincipal) to lake catalog operations. This enables lake catalog implementations to access user identity information during table creation and modification.
- Added a new
Contextinterface toLakeCatalogwith a method to retrieve theFlussPrincipal - Updated
createTableandalterTablemethod signatures across allLakeCatalogimplementations to accept the newContextparameter - Created
DefaultLakeCatalogContextinCoordinatorServiceto supply the principal from the current session
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| fluss-common/src/main/java/org/apache/fluss/lake/lakestorage/LakeCatalog.java | Adds Context interface and updates createTable/alterTable signatures to include Context parameter |
| fluss-common/src/main/java/org/apache/fluss/lake/lakestorage/PluginLakeStorageWrapper.java | Updates ClassLoaderFixingLakeCatalog wrapper to pass Context parameter through |
| fluss-common/src/test/java/org/apache/fluss/lake/lakestorage/LakeStorageTest.java | Updates test implementation to include Context parameter in method signatures |
| fluss-common/src/test/java/org/apache/fluss/lake/lakestorage/TestingLakeCatalogContext.java | Adds testing implementation of Context interface |
| fluss-lake/fluss-lake-iceberg/src/main/java/org/apache/fluss/lake/iceberg/IcebergLakeCatalog.java | Updates Iceberg implementation to accept Context parameter |
| fluss-lake/fluss-lake-iceberg/src/test/java/org/apache/fluss/lake/iceberg/IcebergLakeCatalogTest.java | Updates test calls to pass TestingLakeCatalogContext |
| fluss-lake/fluss-lake-lance/src/main/java/org/apache/fluss/lake/lance/LanceLakeCatalog.java | Updates Lance implementation to accept Context parameter |
| fluss-lake/fluss-lake-paimon/src/main/java/org/apache/fluss/lake/paimon/PaimonLakeCatalog.java | Updates Paimon implementation to accept Context parameter |
| fluss-lake/fluss-lake-paimon/src/test/java/org/apache/fluss/lake/paimon/PaimonLakeCatalogTest.java | Updates test calls to pass TestingLakeCatalogContext |
| fluss-server/src/main/java/org/apache/fluss/server/coordinator/CoordinatorService.java | Adds DefaultLakeCatalogContext implementation and passes it to lake catalog operations |
| fluss-server/src/main/java/org/apache/fluss/server/coordinator/MetadataManager.java | Updates method signatures to accept and pass through lakeCatalogContext |
| fluss-server/src/test/java/org/apache/fluss/server/lakehouse/TestingPaimonStoragePlugin.java | Updates test implementation to include Context parameter |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Purpose
Linked issue: close #1890
Brief change log
Tests
API and Format
Documentation