rsrkpatwari1234 commented on code in PR #18175:
URL: https://github.com/apache/pinot/pull/18175#discussion_r3269127056
##########
pinot-spi/src/main/java/org/apache/pinot/spi/utils/IngestionConfigUtils.java:
##########
@@ -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) {
+ if (StringUtils.isNotBlank(consumerClientIdSuffix)) {
+ return tableNameWithType + "-" + topicName + "-" + streamPartitionId +
"-" + consumerClientIdSuffix;
Review Comment:
There is no behavior change. Realtime consumption works in same manner.
`_clientId` in `RealtimeSegmentDataManager` is already built with the same
rule: append `consumer.client.id.suffix` only when
`StringUtils.isNotBlank(...)`. `getStreamIngestionMetricTableKey` mirrors that
so ingestion-delay metric keys stay consistent with the consumer’s metric table
key.
`AbstractMetrics` does not define how topic, partition, or suffix are
encoded. It only receives a fully formed first segment and composes names like
gaugeName + "." + getTableName(thatString). That is why we added the function
here
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]