StefanRRichter commented on code in PR #22046:
URL: https://github.com/apache/flink/pull/22046#discussion_r1580677818
##########
flink-runtime/src/main/java/org/apache/flink/runtime/checkpoint/CompletedCheckpointStore.java:
##########
@@ -64,7 +64,7 @@ CompletedCheckpoint addCheckpointAndSubsumeOldestOne(
* Returns the latest {@link CompletedCheckpoint} instance or
<code>null</code> if none was
* added.
*/
- default CompletedCheckpoint getLatestCheckpoint() throws Exception {
+ default CompletedCheckpoint getLatestCheckpoint() {
Review Comment:
I don't understand how the linked comment relates to removing the throw
clause here. What's the reason for removing exceptions from the signature?
##########
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/allocator/StateLocalitySlotAssigner.java:
##########
@@ -198,4 +195,18 @@ public Collection<AllocationScore> calculateScore(
.map(e -> new AllocationScore(group.getId(), e.getKey(),
e.getValue()))
.collect(Collectors.toList());
}
+
+ private static long estimateSize(
+ KeyGroupRange newRange, VertexAllocationInformation allocation) {
+ KeyGroupRange oldRange = allocation.getKeyGroupRange();
+ if (allocation.stateSizeInBytes * oldRange.getNumberOfKeyGroups() ==
0) {
+ return 0L;
+ }
+ // round up to 1
+ long keyGroupSize =
Review Comment:
So basically this assumes all local key groups have the same state size. Do
you think this is a significant improvement over just looking at the number of
key groups? I know it is at least a bit more precise...
--
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]