sjwiesman commented on a change in pull request #47: [FLINK-16326] [core] 
Eagerly validate strictly required Flink configurations
URL: https://github.com/apache/flink-statefun/pull/47#discussion_r387338676
 
 

 ##########
 File path: 
statefun-flink/statefun-flink-core/src/main/java/org/apache/flink/statefun/flink/core/StatefulFunctionsConfig.java
 ##########
 @@ -243,4 +246,34 @@ public void addAllGlobalConfigurations(Map<String, 
String> globalConfigurations)
   public void setGlobalConfiguration(String key, String value) {
     this.globalConfigurations.put(key, value);
   }
+
+  private static void validateStrictlyRequiredConfigs(Configuration 
configuration) {
+    final Set<String> parentFirstClassloaderPatterns =
+        parentFirstClassloaderPatterns(configuration);
+    if (!parentFirstClassloaderPatterns.contains("org.apache.flink.statefun")
+        && !parentFirstClassloaderPatterns.contains("org.apache.kafka")
+        && !parentFirstClassloaderPatterns.contains("com.google.protobuf")) {
+      throw new StatefulFunctionsInvalidConfigException(
+          CoreOptions.ALWAYS_PARENT_FIRST_LOADER_PATTERNS_ADDITIONAL,
+          "Must contain org.apache.flink.statefun, org.apache.kafka, and 
com.google.protobuf");
+    }
+
+    final int maxConcurrentCheckpoints =
+        
configuration.get(ExecutionCheckpointingOptions.MAX_CONCURRENT_CHECKPOINTS);
+    if (maxConcurrentCheckpoints != 1) {
+      throw new StatefulFunctionsInvalidConfigException(
+          ExecutionCheckpointingOptions.MAX_CONCURRENT_CHECKPOINTS,
+          "Value must be 1, since Stateful Functions currently does not 
support concurrent checkpoints.");
 
 Review comment:
   nit
   ```suggestion
             "Value must be 1, Stateful Functions does not support concurrent 
checkpoints.");
   ```

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


With regards,
Apache Git Services

Reply via email to