xintongsong commented on a change in pull request #11615: [FLINK-16605] Add max 
limitation to the total number of slots
URL: https://github.com/apache/flink/pull/11615#discussion_r407409298
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManagerConfiguration.java
 ##########
 @@ -63,8 +63,10 @@ public SlotManagerConfiguration(
                this.slotRequestTimeout = 
Preconditions.checkNotNull(slotRequestTimeout);
                this.taskManagerTimeout = 
Preconditions.checkNotNull(taskManagerTimeout);
                this.waitResultConsumedBeforeRelease = 
waitResultConsumedBeforeRelease;
-               this.slotMatchingStrategy = slotMatchingStrategy;
-               this.defaultWorkerResourceSpec = defaultWorkerResourceSpec;
+               this.slotMatchingStrategy = 
Preconditions.checkNotNull(slotMatchingStrategy);
+               this.defaultWorkerResourceSpec = 
Preconditions.checkNotNull(defaultWorkerResourceSpec);
+               Preconditions.checkState(numSlotsPerWorker > 0);
+               Preconditions.checkState(maxSlotNum > 0);
 
 Review comment:
   It would be better to move the hotfix commit before the main commits if 
possible.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to