[core] Introduce file resource management#8179
Open
gavin9402 wants to merge 3 commits into
Open
Conversation
Member
|
It's a very surprising pr. Is there any relevant pip to provide more background information? |
Contributor
Author
Thank you for your suggestion. I will submit the PIP as soon as possible. |
Contributor
|
First PR, I think you can focus on Resource introducing. |
57a260d to
81f5235
Compare
Contributor
Author
Sure, let me revise it. |
added 2 commits
June 10, 2026 10:44
81f5235 to
25c4603
Compare
JingsongLi
reviewed
Jun 10, 2026
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.
Purpose
Introduce resource management capabilities to the REST Catalog, providing a unified way to manage file resources (FILE, JAR, PY, ARCHIVE) associated with databases. This lays the foundation for upcoming ML model and function features, where users will need to reference and manage external file resources such as model artifacts, UDF JARs, and Python scripts.
Changes
Resource Model (
paimon-api)Resourceinterface andAbstractResourcebase class — define the resource abstraction with properties like name, type, description, URI, and custom propertiesFileResource,JarResource,PyResource,ArchiveResource— concrete resource types for FILE/JAR/PY/ARCHIVEResourceTypeenum — four supported resource typesResourceChange— change operations for altering resources (setProperty, removeProperty, setDescription, setUri)ResourceDeserializer— Jackson deserializer for polymorphic resource deserializationREST API (
paimon-api)ResourcePaths— URL path builders for resource endpoints (/resources,/resource-details,/resources/{name})RESTApi— 8 new resource management API methods:listResources,listResourcesPaged,listResourceDetailsPaged,getResource,createResource,dropResource,alterResource,listResourcesPagedGloballyCreateResourceRequest,AlterResourceRequest,GetResourceResponse,ListResourcesResponse,ListResourceDetailsResponse,ListResourcesGloballyResponseCatalog Interface (
paimon-core)Catalog— 8 new interface methods for resource CRUD +ResourceAlreadyExistExceptionandResourceNotExistExceptioninner exception classesAbstractCatalog— defaultUnsupportedOperationExceptionimplementationsDelegateCatalog— delegation implementationsRESTCatalog— full REST-backed implementationsTests (
paimon-core)RESTApiJsonTest— JSON serialization/deserialization tests for resource request/response classesRESTCatalogTest— integration tests for resource CRUD operationsRESTCatalogServer— mock REST server with resource management route handlersMockRESTMessage— test helper methods for constructing resource test dataAPI Summary
/v1/{prefix}/databases/{db}/resources/v1/{prefix}/databases/{db}/resource-details/v1/{prefix}/databases/{db}/resources/{name}/v1/{prefix}/databases/{db}/resources/v1/{prefix}/databases/{db}/resources/{name}/v1/{prefix}/databases/{db}/resources/{name}/v1/{prefix}/resourcesTests