Skip to content

HIVE-29468: Standalone HMS REST Catalog Server: Migrate to Spring Boot#6324

Closed
difin wants to merge 2 commits intoapache:masterfrom
difin:standalone-rest-server-with-spring-boot
Closed

HIVE-29468: Standalone HMS REST Catalog Server: Migrate to Spring Boot#6324
difin wants to merge 2 commits intoapache:masterfrom
difin:standalone-rest-server-with-spring-boot

Conversation

@difin
Copy link
Contributor

@difin difin commented Feb 17, 2026

What changes were proposed in this pull request?

The Standalone REST Catalog Server is reimplemented to use Spring Boot instead of plain Java:

  • Server framework – Uses Spring Boot with an embedded Jetty server instead of raw servlet wiring.
  • Health checks – Adds Actuator liveness and readiness probes; readiness verifies HMS connectivity via Thrift.
  • Observability – Exposes Prometheus metrics for Kubernetes HPA and monitoring.
  • Configuration – Keeps port and other settings in MetastoreConf but bridges them into Spring (e.g., via system properties) so Spring Boot uses the configured port.
  • Graceful shutdown – Uses Spring Boot’s shutdown handling with a configurable timeout.
    Standalone packaging – Adds a spring-boot-maven-plugin “exec” JAR for running the server as a standalone process.

Why are the changes needed?

Spring Boot improves how the Standalone REST Catalog Server is run and operated:

  • Kubernetes support – Liveness and readiness probes (/actuator/health/*) let Kubernetes reliably route traffic and restart unhealthy pods. Readiness includes an actual HMS connectivity check instead of a simple config check.
  • Observability – Prometheus metrics enable HPA, dashboards, and alerting, which is standard for production deployments.
  • Operational behavior – Graceful shutdown and a well-defined lifecycle reduce the chance of dropped requests during restarts.
  • Maintainability – Spring Boot replaces custom servlet wiring and configuration, and aligns with common patterns for cloud-native Java services.

Does this PR introduce any user-facing change?

If the standalone REST Catalog server is deployed in Kubernetes:

  • Liveness/readiness probes – Configure HTTP probes to use the new actuator endpoints:
    -- Liveness: httpGet: /actuator/health/liveness
    -- Readiness: httpGet: /actuator/health/readiness
  • Metrics/HPA – Prometheus scraping or custom metrics use /actuator/prometheus.

How was this patch tested?

Integration tests in TestStandaloneRESTCatalogServer where updated to run the Spring Boot standalone HMS rest catalog server, verify liveness and readiness probes, Prometheus metrics.

@difin difin force-pushed the standalone-rest-server-with-spring-boot branch from 278cf9b to 2e24788 Compare February 18, 2026 15:28
@difin difin marked this pull request as ready for review February 18, 2026 16:08
@difin difin requested a review from deniskuzZ February 18, 2026 16:55
@difin difin closed this Feb 19, 2026
@difin difin deleted the standalone-rest-server-with-spring-boot branch February 19, 2026 15:52
@difin
Copy link
Contributor Author

difin commented Feb 19, 2026

This PR was stuck for >24 hours in waiting to run pre-commit pipeline.
Created a new PR #6327

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments