zentol commented on code in PR #22169:
URL: https://github.com/apache/flink/pull/22169#discussion_r1144756222
##########
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/adaptive/scalingpolicy/EnforceMinimalIncreaseRescalingController.java:
##########
@@ -25,16 +25,17 @@
* Simple scaling policy for a reactive mode. The user can configure a minimum
cumulative
* parallelism increase to allow a scale up.
*/
-public class ReactiveScaleUpController implements ScaleUpController {
+public class EnforceMinimalIncreaseRescalingController implements
RescalingController {
private final int minParallelismIncrease;
- public ReactiveScaleUpController(Configuration configuration) {
+ public EnforceMinimalIncreaseRescalingController(Configuration
configuration) {
minParallelismIncrease = configuration.get(MIN_PARALLELISM_INCREASE);
}
@Override
- public boolean canScaleUp(int currentCumulativeParallelism, int
newCumulativeParallelism) {
- return newCumulativeParallelism - currentCumulativeParallelism >=
minParallelismIncrease;
+ public boolean shouldRescale(int currentCumulativeParallelism, int
newCumulativeParallelism) {
+ return Math.abs(newCumulativeParallelism -
currentCumulativeParallelism)
+ >= minParallelismIncrease;
Review Comment:
We may need separate implementations of the controller for reactive mode,
because a minDecrease doesn't make sense for it.
--
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]