wzhero1 opened a new pull request, #7117:
URL: https://github.com/apache/paimon/pull/7117

   ### Purpose
   
   This PR adds a new metric `sourceScalingMaxParallelism` to the Flink Source 
Enumerator. This metric provides a recommended upper bound of parallelism for 
auto-scaling systems to optimize resource allocation.
   
   ### Motivation
   
   Auto-scaling systems need to understand the optimal parallelism for Paimon 
sources to:
   1. Avoid over-provisioning resources for fixed-bucket tables (where 
parallelism shouldn't exceed bucket count)
   2. Make informed scaling decisions for dynamic-bucket tables
   
   The metric value:
   - For **fixed bucket tables**: equals the bucket number
   - For **dynamic bucket tables** (bucket = -1): equals the current parallelism
   
   **Note**: This is a recommendation, not a hard limit - users can still 
configure higher parallelism manually if needed.
   
   ### Tests
   
   Added unit tests in `FileStoreSourceMetricsTest.java`:
   - `continuousFileStoreFixBucketEnumeratorMetricsTest()` - Verifies metric 
equals bucket number for fixed bucket tables
   - `continuousFileStoreDynBucketEnumeratorMetricsTest()` - Verifies metric 
equals current parallelism for dynamic bucket tables
   
   Also added `TestingMetricUtils.getGauge()` helper method for testing Gauge 
metrics.
   
   ### API and Format
   
   No API or storage format changes. This only adds a new metric.
   
   ### Documentation
   
   Updated `docs/content/maintenance/metrics.md` with the new metric 
description.


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