zentol commented on code in PR #24012:
URL: https://github.com/apache/flink/pull/24012#discussion_r1474310073
##########
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/allocator/SlotSharingSlotAllocator.java:
##########
@@ -301,27 +301,24 @@ public Collection<ExecutionVertexID>
getContainedExecutionVertices() {
private static class SlotSharingGroupMetaInfo {
- private final int minLowerBound;
private final int maxUpperBound;
- private final int maxLowerUpperBoundRange;
+ private final int minResourceRequirement;
- private SlotSharingGroupMetaInfo(
- int minLowerBound, int maxUpperBound, int
maxLowerUpperBoundRange) {
- this.minLowerBound = minLowerBound;
+ private SlotSharingGroupMetaInfo(int maxUpperBound, int
minResourceRequirement) {
this.maxUpperBound = maxUpperBound;
- this.maxLowerUpperBoundRange = maxLowerUpperBoundRange;
- }
-
- public int getMinLowerBound() {
- return minLowerBound;
+ this.minResourceRequirement = minResourceRequirement;
}
public int getMaxUpperBound() {
return maxUpperBound;
}
- public int getMaxLowerUpperBoundRange() {
- return maxLowerUpperBoundRange;
+ public int getMaxUpperMinRequirementBoundRange() {
+ return maxUpperBound - minResourceRequirement;
+ }
+
+ public int getMinResourceRequirement() {
Review Comment:
I'd prefer if we'd name this `getMaxLowerBound` because that's exactly what
it is. In this area of the code it is always good to use a consistent
terminology and be as explicit as possible.
##########
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/allocator/SlotSharingSlotAllocator.java:
##########
@@ -301,27 +301,24 @@ public Collection<ExecutionVertexID>
getContainedExecutionVertices() {
private static class SlotSharingGroupMetaInfo {
- private final int minLowerBound;
private final int maxUpperBound;
- private final int maxLowerUpperBoundRange;
+ private final int minResourceRequirement;
- private SlotSharingGroupMetaInfo(
- int minLowerBound, int maxUpperBound, int
maxLowerUpperBoundRange) {
- this.minLowerBound = minLowerBound;
+ private SlotSharingGroupMetaInfo(int maxUpperBound, int
minResourceRequirement) {
Review Comment:
reorder so min is first argument
--
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]