shauryachats commented on code in PR #18641:
URL: https://github.com/apache/pinot/pull/18641#discussion_r3522783422
##########
pinot-server/src/main/java/org/apache/pinot/server/predownload/PredownloadMetrics.java:
##########
@@ -47,6 +47,20 @@ public void segmentDownloaded(boolean succeed, String
segmentName, long segmentS
}
}
+ public void peerSegmentDownloaded(boolean succeed, String segmentName, long
segmentSizeBytes, long downloadTimeMs) {
+ if (succeed) {
+
_serverMetrics.addMeteredGlobalValue(ServerMeter.PREDOWNLOAD_PEER_SEGMENT_DOWNLOAD_COUNT,
1);
+ _serverMetrics.setValueOfGlobalGauge(ServerGauge.PEER_DOWNLOAD_SPEED,
+ (segmentSizeBytes / BYTES_TO_MB) / (downloadTimeMs / 1000 + 1));
+ } else {
+
_serverMetrics.addMeteredValue(ServerMeter.PREDOWNLOAD_PEER_SEGMENT_DOWNLOAD_FAILURE_COUNT,
1, segmentName);
Review Comment:
Might be very high cardinality if all segments fail to peer download due to
a systemic issue. Could we consider sampling this or possibly not having the
segmentName in the metric?
--
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]