kfaraz commented on code in PR #14453:
URL: https://github.com/apache/druid/pull/14453#discussion_r1238245731
##########
sql/src/main/java/org/apache/druid/sql/calcite/schema/SegmentMetadataCache.java:
##########
@@ -707,14 +709,20 @@ private long
recomputeIsRealtime(ImmutableSet<DruidServerMetadata> servers)
private Set<SegmentId> refreshSegmentsForDataSource(final String dataSource,
final Set<SegmentId> segments)
throws IOException
{
+ final long startTimeNanos = System.nanoTime();
+
if (!segments.stream().allMatch(segmentId ->
segmentId.getDataSource().equals(dataSource))) {
// Sanity check. We definitely expect this to pass.
throw new ISE("'segments' must all match 'dataSource'!");
}
log.debug("Refreshing metadata for dataSource[%s].", dataSource);
- final long startTime = System.currentTimeMillis();
+ final ServiceMetricEvent.Builder builder =
+ new ServiceMetricEvent.Builder().setDimension(DruidMetrics.DATASOURCE,
dataSource);
+
+ emitter.emit(builder.build("segment/metadatacache/refresh/count",
segments.size()));
+
Review Comment:
Nit: Extra line.
--
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]