Skip to content

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

Draft
difin wants to merge 1 commit intoapache:masterfrom
difin:standalone-rest-server-with-spring-boot
Draft

HIVE-29468: Standalone HMS REST Catalog Server: Migrate to Spring Boot#6324
difin wants to merge 1 commit 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.

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