-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add stream topic label to realtime ingestion delay metrics #18175
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 52 commits
52421b9
dcf4bd9
6ef8ada
b7e6a3e
4526485
36237ef
8aad969
2ca726c
9922d54
b6fa133
4597452
ab8ced7
ff5bd09
fc7a92d
2112cf6
fb55606
dfeadfa
8e239e9
264cbbb
aaf74b1
5e0819c
7a87040
5f89f3e
e32e45d
23630e0
128854d
7bc3550
71abbd0
41eca2b
0c11831
1a31661
a29fa6a
647554d
fe0d33c
bb45a22
7fc4a19
1d6b8a5
71ea605
5a5e392
09fffac
5d24d7e
ef97f39
4498c4e
d0b3415
819f60b
239b2e5
fcb21a6
bd3cb8e
278d959
0fa2e7f
622e6fd
12c911b
90d7941
9066315
8f12b14
0743774
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 |
|---|---|---|
|
|
@@ -339,6 +339,23 @@ public static String getTableTopicUniqueClientId(String className, StreamConfig | |
| className + "-" + streamConfig.getTableNameWithType() + "-" + streamConfig.getTopicName()); | ||
| } | ||
|
|
||
| /** | ||
| * Returns the table-key string for realtime stream server metrics: {@code table-topic-partition} and optional | ||
| * {@code consumerClientIdSuffix} when non-blank. | ||
| * | ||
| * @param tableNameWithType table name with type (e.g. {@code myTable_REALTIME}) | ||
| * @param topicName stream topic name | ||
| * @param streamPartitionId stream partition id | ||
| * @param consumerClientIdSuffix optional suffix; ignored if null or blank | ||
| */ | ||
| public static String getStreamIngestionMetricTableKey(String tableNameWithType, String topicName, | ||
| int streamPartitionId, String consumerClientIdSuffix) { | ||
|
rsrkpatwari1234 marked this conversation as resolved.
Outdated
|
||
| if (StringUtils.isNotBlank(consumerClientIdSuffix)) { | ||
| return tableNameWithType + "-" + topicName + "-" + streamPartitionId + "-" + consumerClientIdSuffix; | ||
|
Contributor
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. (MAJOR) Is this a behavior change? This is not the same way how
Contributor
Author
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. There is no behavior change. Realtime consumption works in same manner.
|
||
| } | ||
| return tableNameWithType + "-" + topicName + "-" + streamPartitionId; | ||
| } | ||
|
|
||
| /** | ||
| * Returns a Map of stream config index to Set of stream partition Ids. | ||
| * @param pinotPartitionIds Set of pinot partition ids. | ||
|
|
||
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.
(MAJOR) Is this behavior change? What happens to single-topic stream?
Uh oh!
There was an error while loading. Please reload this page.
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.
For single-topic tables,
IngestionConfigUtils.getStreamPartitionIdFromPinotPartitionId(tableConfig, pinotPartitionId)returnspinotPartitionIdas-is (no % 10000 remap). That matchesRealtimeSegmentDataManager, which uses_streamPartitionId = _partitionGroupIdwhen there is only one stream. So which physical partition the delay refers to, is unchanged for single-topic.We only change the metric identity from “table + Pinot partition only” to the same tableNameWithType-topic-streamPartition shape as stream consumer metrics, so a topic label (and consistent partition labeling) appears. Hence users would have to update the dashboards and alerts which rely on these metrices.