zhuzhurk commented on a change in pull request #12256:
URL: https://github.com/apache/flink/pull/12256#discussion_r438859134



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/scheduler/DefaultExecutionSlotAllocator.java
##########
@@ -36,41 +35,28 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.List;
-import java.util.Map;
-import java.util.Objects;
 import java.util.Set;
 import java.util.concurrent.CompletableFuture;
-import java.util.stream.Collectors;
 
 import static org.apache.flink.util.Preconditions.checkNotNull;
-import static org.apache.flink.util.Preconditions.checkState;
 
 /**
  * Default {@link ExecutionSlotAllocator} which will use {@link SlotProvider} 
to allocate slots and
  * keep the unfulfilled requests for further cancellation.
  */
-public class DefaultExecutionSlotAllocator implements ExecutionSlotAllocator {
+public class DefaultExecutionSlotAllocator extends 
AbstractExecutionSlotAllocator {
 
        private static final Logger LOG = 
LoggerFactory.getLogger(DefaultExecutionSlotAllocator.class);
 
-       /**
-        * Store the uncompleted slot assignments.
-        */
-       private final Map<ExecutionVertexID, SlotExecutionVertexAssignment> 
pendingSlotAssignments;
-
        private final SlotProviderStrategy slotProviderStrategy;
 
-       private final PreferredLocationsRetriever preferredLocationsRetriever;
-
        public DefaultExecutionSlotAllocator(
                        final SlotProviderStrategy slotProviderStrategy,
                        final PreferredLocationsRetriever 
preferredLocationsRetriever) {
-               this.slotProviderStrategy = checkNotNull(slotProviderStrategy);
-               this.preferredLocationsRetriever = 
checkNotNull(preferredLocationsRetriever);
 
-               pendingSlotAssignments = new HashMap<>();
+               super(preferredLocationsRetriever);

Review comment:
       Opened a separate hotfix to make `DefaultExecutionSlotAllocator` and its 
factory package private.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to