Skip to content

[native]Add option to register catalogs in Prestissimo without restart #25209

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

Closed
wants to merge 1 commit into from

Conversation

mohsaka
Copy link
Contributor

@mohsaka mohsaka commented May 27, 2025

Description

Currently, if we want to add a new catalog in the Prestissimo server we have to bring it down. With the addition of this change, we can add existing catalogs into the etc/catalog directory and load them without a restart.

Motivation and Context

Modifying and deleting catalogs require a much larger change. So we are allowing for additional catalogs for now.

Impact

Users may call the /v1/catalog/register endpoint via a http request such as,

curl -X POST http://127.0.0.1:7777/v1/catalog/hive2 \
     -H "Content-Type: application/json" \
     -d '{"connector.name": "hive"}'

Test Plan

Added new test case to add workers without the catalog. Afterwards adding the catalog to the workers' working directory and calling the API to register it.

Then checking to make sure the query is working properly.

Contributor checklist

  • Please make sure your submission complies with our contributing guide, in particular code style and commit standards.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

Please follow release notes guidelines and fill in the release notes below.

== RELEASE NOTES ==

General Changes
* ... 
* ... 

Hive Connector Changes
* ... 
* ... 

If release note is NOT required, use:

== NO RELEASE NOTE ==

@prestodb-ci prestodb-ci added the from:IBM PR from IBM label May 27, 2025
@mohsaka mohsaka changed the title Add option to register catalogs in Prestissimo without restart [native]Add option to register catalogs in Prestissimo without restart May 27, 2025
@mohsaka mohsaka force-pushed the late_registration branch from 51d7a57 to 8dc51f3 Compare May 29, 2025 19:46
@tdcmeehan
Copy link
Contributor

tdcmeehan commented May 29, 2025

Why not PUT -> /v1/catalog? i.e. the PUT is an act of registration or update? register is a verb, and RESTful convention is the endpoint represents a "thing" (a noun). Seems like our noun here is catalog.

@tdcmeehan
Copy link
Contributor

Why not use properties syntax as the MIME type (i.e. text/x-java-properties)? That way the format for on-disk and off-disk is the same?

@mohsaka
Copy link
Contributor Author

mohsaka commented Jun 3, 2025

Closed for further discussion.

@mohsaka mohsaka closed this Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
from:IBM PR from IBM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants