FANNG1 opened a new pull request, #10105:
URL: https://github.com/apache/gravitino/pull/10105
- Added JDBC metrics storage support for MySQL and PostgreSQL (H2 already
supported).
- Updated metrics schema creation/validation flow in JdbcMetricsRepository
and
GenericJdbcMetricsRepository.
- Added metrics DDL to schema-1.2.0-*.sql and upgrade-1.1.0-to-1.2.0-*.sql
for
H2/MySQL/PostgreSQL.
- Removed obsolete scripts/h2/optimizer-metrics-schema-1.1.0-h2.sql.
- Refactored tests:
- Introduced shared behavior base test.
- Added H2/MySQL/PostgreSQL integration tests under
integration.test.storage. - Kept Docker tag only on MySQL/PG tests. - Removed
redundant prefix-override tests.
## Why are the changes needed?
- Before this PR, JDBC metrics repository was effectively H2-centric.
- Metrics tables were required by runtime validation, but upgrade scripts did
not consistently guarantee table creation for upgraded deployments.
- Config behavior needed to be explicit (use
gravitino.optimizer.jdbcMetrics.*
directly, no EntityStore fallback).
- Cross-database behavior needed integration coverage.
Fix: #<issue-id>
## Does this PR introduce any user-facing change?
- Yes: JDBC metrics storage now supports MySQL and PostgreSQL in addition to
H2.
- No new public API.
- No new property keys added.
## How was this patch tested?
./
gradlew :maintenance:optimizer:spotlessApply
:maintenance:optimizer:compileTes
tJava
IT_SPARK_HOME=/Users/fanng/deploy/demo/spark-3.5.3-bin-hadoop3
IT_SPARK_ARGS='--conf
spark.jars=/Users/fanng/deploy/demo/jars/iceberg-spark-
runtime-3.5_2.12-1.9.2.jar,/Users/fanng/deploy/demo/jars/iceberg-aws-bundle-
1.9.2.jar --conf
spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionEx
tensions --conf
spark.sql.catalog.rest=org.apache.iceberg.spark.SparkCatalog
--conf spark.sql.catalog.rest.type=rest --conf
spark.sql.catalog.rest.uri=http://127.0.0.1:9001/iceberg/ --conf
spark.sql.catalog.rest.header.X-Iceberg-Access-Delegation=vended-credentials'
IT_TABLE_IDENTIFIER=rest.ab.a1 GRAVITINO_ENV_IT=true ./
gradlew :maintenance:optimizer:test --tests
'org.apache.gravitino.maintenance.optimizer.integration.test.storage.TestH2Gen
ericJdbcMetricsRepositoryIT' -PskipIT=false
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]