J-HowHuang commented on code in PR #15368:
URL: https://github.com/apache/pinot/pull/15368#discussion_r2029167402
##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/rebalance/RebalanceSummaryResult.java:
##########
@@ -306,18 +297,133 @@ public Map<String, ServerSegmentChangeInfo>
getServerSegmentChangeInfo() {
}
}
+ public static class ConsumingSegmentToBeMovedSummary {
+ private final int _numConsumingSegmentsToBeMoved;
+ private final int _numServersGettingConsumingSegmentsAdded;
+ private final Map<String, Integer>
_consumingSegmentsToBeMovedWithMostOffsetsToCatchUp;
+ private final Map<String, Integer>
_consumingSegmentsToBeMovedWithOldestAgeInMinutes;
+ private final Map<String, ConsumingSegmentSummaryPerServer>
_serverConsumingSegmentSummary;
+
+ /**
+ * Constructor for ConsumingSegmentToBeMovedSummary
+ * @param numConsumingSegmentsToBeMoved total number of consuming segments
to be moved as part of this rebalance
+ * @param numServersGettingConsumingSegmentsAdded maximum bytes of
consuming segments to be moved to catch up
+ * @param consumingSegmentsToBeMovedWithMostOffsetsToCatchUp top consuming
segments to be moved to catch up.
+ * Map from
segment name to its number of offsets to
+ * catch up on
the new server. This is essentially the
+ * difference
between the latest offset of the stream
+ * and the
segment's start offset of the stream. The
+ * map is set to
null if the number of offsets to catch
+ * up could not
be determined for at least one
+ * consuming
segment
+ * @param consumingSegmentsToBeMovedWithOldestAgeInMinutes oldest
consuming segments to be moved to catch up. Map
+ * from segment
name to its age in minutes. The map is
+ * set to null if
ZK metadata is not available or the
+ * creation time
is not found for at least one consuming
+ * segment.
+ * The age of a
segment is determined by its creation
+ * time from ZK
metadata. Segment age is an approximation
+ * to data age for
a consuming segment. It may not reflect
+ * the actual
oldest age of data in the consuming segment.
+ * For reasons, a
segment could consume events which date
+ * before the
segment created. We collect segment age
+ * here as there
is no obvious way to get the age of the
+ * oldest data in
the stream for a specific consuming
+ * segment.
+ *
consumingSegmentsToBeMovedWithMostOffsetsToCatchUp
+ * is a better
indicator to the cost of moving a consuming
+ * segment if it
presents.
Review Comment:
There's no misunderstanding with the age part. It was just my bad wording
where I wanted to say the offset is an accurate stats in comparison to this.
I'll remove this.
--
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]