xintongsong commented on a change in pull request #11615: URL: https://github.com/apache/flink/pull/11615#discussion_r411132347
########## File path: flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManagerConfiguration.java ########## @@ -64,7 +66,9 @@ public SlotManagerConfiguration( this.slotMatchingStrategy = Preconditions.checkNotNull(slotMatchingStrategy); this.defaultWorkerResourceSpec = Preconditions.checkNotNull(defaultWorkerResourceSpec); Preconditions.checkState(numSlotsPerWorker > 0); + Preconditions.checkState(maxSlotNum > 0); this.numSlotsPerWorker = numSlotsPerWorker; + this.maxSlotNum = maxSlotNum; Review comment: I think it's ok as long as we check the values before using them, and assigning to final fields is not really using them. If that troubles you, you can also move the two precondition checks to before all the field assignments. Anyway, this is not a big thing and I'm not stubborn on 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org