KarmaGYZ commented on code in PR #23230:
URL: https://github.com/apache/flink/pull/23230#discussion_r1297084113
##########
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/ResourceAllocationStrategy.java:
##########
@@ -48,15 +48,16 @@ ResourceAllocationResult tryFulfillRequirements(
BlockedTaskManagerChecker blockedTaskManagerChecker);
/**
- * Try to make a release decision to release unused PendingTaskManagers
and TaskManagers. This
- * is more light weighted than {@link #tryFulfillRequirements}, only
consider empty registered /
- * pending workers and assume all requirements are fulfilled by registered
/ pending workers.
+ * Try to make a reconcile decision between release unused
PendingTaskManagers/TaskManagers and
+ * add redundant PendingTaskManagers. This is more light weighted than
{@link
Review Comment:
Try to make a decision to reconcile the cluster resources.
##########
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/DefaultResourceAllocationStrategy.java:
##########
@@ -161,6 +162,7 @@ public ResourceReleaseResult tryReleaseUnusedResources(
List<PendingTaskManager> pendingTaskManagersNonUse = new ArrayList<>();
List<PendingTaskManager> pendingTaskManagersInuse = new ArrayList<>();
+
Review Comment:
```suggestion
```
##########
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/FineGrainedSlotManager.java:
##########
@@ -224,7 +224,7 @@ public void start(
if (resourceAllocator.isSupported()) {
taskManagerReleasableCheck =
Review Comment:
```suggestion
clusterReconciliationCheck =
```
##########
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/FineGrainedSlotManager.java:
##########
@@ -224,7 +224,7 @@ public void start(
if (resourceAllocator.isSupported()) {
taskManagerReleasableCheck =
scheduledExecutor.scheduleWithFixedDelay(
- () ->
mainThreadExecutor.execute(this::tryReleaseUnusedTaskManagers),
+ () ->
mainThreadExecutor.execute(this::checkClusterResource),
Review Comment:
```suggestion
() ->
mainThreadExecutor.execute(this::checkClusterReconciliation),
```
##########
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/FineGrainedSlotManager.java:
##########
@@ -812,29 +812,34 @@ public Collection<SlotInfo>
getAllocatedSlotsOf(InstanceID instanceID) {
// Internal periodic check methods
//
---------------------------------------------------------------------------------------------
- private void tryReleaseUnusedTaskManagers() {
- if (checkTaskManagerReleasable()) {
+ private void checkClusterResource() {
Review Comment:
```suggestion
private void checkClusterReconciliation() {
```
--
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]