FANNG1 opened a new pull request, #10078:
URL: https://github.com/apache/gravitino/pull/10078

   …c updater and local statistic calculator (#142)
   
   • ### Does this PR introduce any user-facing change?
   
     #### User-facing API changes
     - No new public REST/API endpoint is introduced.
   - This PR focuses on optimizer internal behavior for statistics importing and
     metrics persistence.
   
     #### Property key additions/changes
   - The metrics repository configuration is now standardized under **generic
     JDBC** scope (v1.2.0), using:
       - `optimizer.jdbcMetrics.jdbcUrl`
       - `optimizer.jdbcMetrics.jdbcUser`
       - `optimizer.jdbcMetrics.jdbcPassword`
       - `optimizer.jdbcMetrics.jdbcDriver`
       - `optimizer.jdbcMetrics.poolMaxSize`
       - `optimizer.jdbcMetrics.poolMinIdle`
       - `optimizer.jdbcMetrics.connectionTimeoutMs`
       - `optimizer.jdbcMetrics.testOnBorrow`
     - Previous H2-specific key set (`h2Metrics*`) is no longer the active 
configuration path in this implementation.
   - If `optimizer.jdbcMetrics.jdbcUrl` is not provided, optimizer falls back to
     default embedded H2 JDBC URL.
   
     #### Other user-visible behavior
     - Statistics importer behavior is improved:
       - malformed JSON lines are skipped safely;
       - non-numeric textual statistics are skipped with warning logs;
       - partition-path field order is preserved (covered by test).
   - Metrics updater now validates initialization state before writes, returning
     meaningful state errors instead of NPE.
   
     ---
   
     ### How was this patch tested?
   
     Executed locally with successful results:
   
     ```bash ./gradlew :maintenance:optimizer:test --tests
   
   
"org.apache.gravitino.maintenance.optimizer.updater.calculator.local.TestLocal
     StatisticsCalculator"
     ./gradlew :maintenance:optimizer:test --tests
   
   
"org.apache.gravitino.maintenance.optimizer.updater.metrics.storage.TestGeneri
     cJdbcMetricsRepository"
     ./gradlew :maintenance:optimizer:test --tests
   
   
"org.apache.gravitino.maintenance.optimizer.updater.metrics.TestGravitinoMetri
     csUpdater"
     ./gradlew :maintenance:optimizer:test
     ./gradlew :common:javadoc
   


-- 
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]

Reply via email to