Hms standalone rest server with Spring Boot#6327
Hms standalone rest server with Spring Boot#6327difin wants to merge 3 commits intoapache:masterfrom
Conversation
2e24788 to
196fd31
Compare
|
.../qtest-iceberg/src/test/java/org/apache/hadoop/hive/cli/TestStandaloneRESTCatalogServer.java
Outdated
Show resolved
Hide resolved
.../qtest-iceberg/src/test/java/org/apache/hadoop/hive/cli/TestStandaloneRESTCatalogServer.java
Outdated
Show resolved
Hide resolved
.../qtest-iceberg/src/test/java/org/apache/hadoop/hive/cli/TestStandaloneRESTCatalogServer.java
Outdated
Show resolved
Hide resolved
| LOG.info("=== Test: Health Check ==="); | ||
| String healthUrl = "http://localhost:" + restCatalogServer.getPort() + "/health"; | ||
| public void testPrometheusMetrics() throws Exception { |
There was a problem hiding this comment.
do we use spring actuator? nice :)
.../qtest-iceberg/src/test/java/org/apache/hadoop/hive/cli/TestStandaloneRESTCatalogServer.java
Outdated
Show resolved
Hide resolved
|
to support OAuth / JWT Authentication don't we need SecurityConfig? cc @okumin |
...log/src/main/java/org/apache/iceberg/rest/standalone/health/HMSReadinessHealthIndicator.java
Show resolved
Hide resolved
...st-catalog/src/main/java/org/apache/iceberg/rest/standalone/StandaloneRESTCatalogServer.java
Show resolved
Hide resolved
standalone-metastore/metastore-rest-catalog/src/main/resources/application.properties
Outdated
Show resolved
Hide resolved
DISCLAIMER: I might not be understanding Spring with Servlet correctly. |
.../qtest-iceberg/src/test/java/org/apache/hadoop/hive/cli/TestStandaloneRESTCatalogServer.java
Outdated
Show resolved
Hide resolved
...iceberg/src/test/java/org/apache/hadoop/hive/cli/TestStandaloneRESTCatalogServerJwtAuth.java
Outdated
Show resolved
Hide resolved
...iceberg/src/test/java/org/apache/hadoop/hive/cli/TestStandaloneRESTCatalogServerJwtAuth.java
Outdated
Show resolved
Hide resolved
...st-catalog/src/main/java/org/apache/iceberg/rest/standalone/IcebergCatalogConfiguration.java
Show resolved
Hide resolved
...st-catalog/src/main/java/org/apache/iceberg/rest/standalone/IcebergCatalogConfiguration.java
Outdated
Show resolved
Hide resolved
...st-catalog/src/main/java/org/apache/iceberg/rest/standalone/IcebergCatalogConfiguration.java
Outdated
Show resolved
Hide resolved
...st-catalog/src/main/java/org/apache/iceberg/rest/standalone/StandaloneRESTCatalogServer.java
Outdated
Show resolved
Hide resolved
...st-catalog/src/main/java/org/apache/iceberg/rest/standalone/StandaloneRESTCatalogServer.java
Outdated
Show resolved
Hide resolved
...st-catalog/src/main/java/org/apache/iceberg/rest/standalone/StandaloneRESTCatalogServer.java
Outdated
Show resolved
Hide resolved
| System.setProperty(ConfVars.CATALOG_SERVLET_PORT.getVarname(), String.valueOf(port)); | ||
| } | ||
|
|
||
| StandaloneRESTCatalogServer server = new StandaloneRESTCatalogServer(conf); |
There was a problem hiding this comment.
Spring Boot should manage the lifecycle of your application class. Typically you don't manually instantiate your @SpringBootApplication class. see above snippet
There was a problem hiding this comment.
added few comments, rest LGTM
adc0bc2 to
8c42e77
Compare
| servletPath = IcebergCatalogConfiguration.DEFAULT_SERVLET_PATH; | ||
| } | ||
|
|
||
| String scheme = isSslEnabled() ? "https" : "http"; |
8c42e77 to
8886bd2
Compare
|



What changes were proposed in this pull request?
The Standalone REST Catalog Server is reimplemented to use Spring Boot instead of plain Java:
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:
Does this PR introduce any user-facing change?
If the standalone REST Catalog server is deployed in Kubernetes:
-- Liveness: httpGet: /actuator/health/liveness
-- Readiness: httpGet: /actuator/health/readiness
How was this patch tested?
Integration tests in
TestStandaloneRESTCatalogServerandTestStandaloneRESTCatalogServerJwtAuthrun the Spring Boot standalone HMS REST catalog server and verify liveness/readiness probes, Prometheus metrics, REST catalog operations, and JWT auth with Keycloak (Testcontainers).