You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2018/08/29 15:54:36 UTC

[GitHub] azagrebin commented on a change in pull request #6632: [FLINK-10254][backend]Fix inappropriate checkNotNull in stateBackend

azagrebin commented on a change in pull request #6632: [FLINK-10254][backend]Fix inappropriate checkNotNull in stateBackend
URL: https://github.com/apache/flink/pull/6632#discussion_r213735414
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/state/AbstractKeyedStateBackend.java
 ##########
 @@ -100,9 +100,11 @@ public AbstractKeyedStateBackend(
 		ExecutionConfig executionConfig,
 		TtlTimeProvider ttlTimeProvider) {
 
+		Preconditions.checkArgument(numberOfKeyGroups >= 1, "NumberOfKeyGroups must be a positive number");
 
 Review comment:
   We can also add this:
   ```
   Preconditions.checkArgument(numberOfKeyGroups >= keyGroupRange.getNumberOfKeyGroups(), "The total number of key groups must be at least the number in the key group range assigned to this backend");
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services