You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/05/30 05:13:09 UTC

[GitHub] jerrypeng commented on a change in pull request #1859: improving config validation

jerrypeng commented on a change in pull request #1859: improving config validation
URL: https://github.com/apache/incubator-pulsar/pull/1859#discussion_r191643940
 
 

 ##########
 File path: pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdFunctions.java
 ##########
 @@ -320,37 +310,12 @@ void processArguments() throws Exception {
                 functionConfig.setUserConfig(new HashMap<>());
             }
 
-            if (functionConfig.getInputs().isEmpty() && functionConfig.getCustomSerdeInputs().isEmpty()) {
-                throw new RuntimeException("No input topic(s) specified for the function");
-            }
-
-            // Ensure that topics aren't being used as both input and output
-            verifyNoTopicClash(functionConfig.getInputs(), functionConfig.getOutput());
-
-            if (parallelism == null) {
-                if (functionConfig.getParallelism() == 0) {
-                    functionConfig.setParallelism(1);
-                }
-            } else {
-                int num = Integer.parseInt(parallelism);
-                if (num <= 0) {
-                    throw new IllegalArgumentException("The parallelism factor (the number of instances) for the function must be positive");
-                }
-                functionConfig.setParallelism(num);
+            if (parallelism != null) {
 
 Review comment:
   This all done via annotations.  Please seeing FunctionConfig

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