rohangarg commented on a change in pull request #11510:
URL: https://github.com/apache/druid/pull/11510#discussion_r678883157
##########
File path:
server/src/main/java/org/apache/druid/server/coordinator/duty/CompactSegments.java
##########
@@ -444,26 +431,35 @@ private CoordinatorStats makeStats(
// Statistics of all segments considered compacted after this run
Map<String, CompactionStatistics> allCompactedStatistics =
iterator.totalCompactedStatistics();
+ for (Map.Entry<String, CompactionStatistics> compactionStatisticsEntry :
allCompactedStatistics.entrySet()) {
+ final String dataSource = compactionStatisticsEntry.getKey();
+ final CompactionStatistics dataSourceCompactedStatistics =
compactionStatisticsEntry.getValue();
+ AutoCompactionSnapshot.Builder builder =
currentRunAutoCompactionSnapshotBuilders.computeIfAbsent(
+ dataSource,
+ k -> new AutoCompactionSnapshot.Builder(k,
AutoCompactionSnapshot.AutoCompactionScheduleStatus.RUNNING)
+ );
+
builder.incrementBytesCompacted(dataSourceCompactedStatistics.getByteSum());
+
builder.incrementSegmentCountCompacted(dataSourceCompactedStatistics.getSegmentNumberCountSum());
+
builder.incrementIntervalCountCompacted(dataSourceCompactedStatistics.getSegmentIntervalCountSum());
+ }
+
// Statistics of all segments considered skipped after this run
Map<String, CompactionStatistics> allSkippedStatistics =
iterator.totalSkippedStatistics();
+ for (Map.Entry<String, CompactionStatistics> compactionStatisticsEntry :
allSkippedStatistics.entrySet()) {
+ final String dataSource = compactionStatisticsEntry.getKey();
+ final CompactionStatistics dataSourceCompactedStatistics =
compactionStatisticsEntry.getValue();
Review comment:
this should probably be `dataSourceSkippedStatistics`
--
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]