-
Notifications
You must be signed in to change notification settings - Fork 3.8k
feat: Add new tier/used/capacity metric to coordinator that reports actual loaded bytes across a tier
#20199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
eacfa27
bb2dd26
3f5823c
5428617
6779d85
884d7d3
0b7af6f
a93d930
608c8ac
c686511
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -106,12 +106,34 @@ public static class SegmentQueue | |
|
|
||
| public static class Tier | ||
| { | ||
| /** | ||
| * The demand the rules place on the tier to full load all segments. | ||
| */ | ||
| public static final CoordinatorStat REQUIRED_CAPACITY | ||
| = CoordinatorStat.toDebugAndEmit("reqdCap", "tier/required/capacity"); | ||
| /** | ||
| * The total assignable capacity of the tier defined by summing the configured max size of all servers in the tier. | ||
| */ | ||
| public static final CoordinatorStat ASSIGNABLE_CAPACITY | ||
| = CoordinatorStat.toDebugAndEmit("assignableCap", "tier/assignable/capacity"); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P2] Register new tier metrics in default emitter maps The new |
||
| /** | ||
| * Superseded by ASSIGNABLE_CAPACITY, which carries the same value under a name that says it is an assignment | ||
| * budget rather than physical disk. Still emitted so existing dashboards keep working; remove after deprecation. | ||
| */ | ||
| @Deprecated | ||
| public static final CoordinatorStat TOTAL_CAPACITY | ||
| = CoordinatorStat.toDebugAndEmit("totalCap", "tier/total/capacity"); | ||
| /** | ||
| * Aggregate physical disk capacity of the tier. | ||
| */ | ||
| public static final CoordinatorStat STORAGE_CAPACITY | ||
| = CoordinatorStat.toDebugAndEmit("storageCap", "tier/storage/capacity"); | ||
| /** | ||
| * Actual physical disk consumed by the tier. Only reports realized bytes on disk, so partial loads when using | ||
| * virtual storage report their true loaded size, which can be less than the full segment size. | ||
| */ | ||
| public static final CoordinatorStat USED_STORAGE | ||
| = CoordinatorStat.toDebugAndEmit("usedStorage", "tier/storage/used"); | ||
| public static final CoordinatorStat REPLICATION_FACTOR | ||
| = CoordinatorStat.toDebugAndEmit("maxRepFactor", "tier/replication/factor"); | ||
| public static final CoordinatorStat HISTORICAL_COUNT | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] Register tier state metrics as gauges
The new tier/assignable/capacity, tier/storage/capacity, and tier/storage/used metrics are configured as Prometheus counters. PrometheusEmitter increments counters for every coordinator event, so these current-state values accumulate across cycles, never decrease when capacity or usage falls, and are exposed with counter semantics. Configure all three as gauge metrics.