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/10/02 21:02:09 UTC

[GitHub] jerrypeng commented on a change in pull request #2698: Rework functions api with consumer

jerrypeng commented on a change in pull request #2698: Rework functions api with consumer
URL: https://github.com/apache/pulsar/pull/2698#discussion_r222110812
 
 

 ##########
 File path: pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/Utils.java
 ##########
 @@ -130,7 +131,12 @@ public static int findAvailablePort() {
             if (userClass instanceof Function) {
                 Function pulsarFunction = (Function) userClass;
                 typeArgs = TypeResolver.resolveRawArguments(Function.class, pulsarFunction.getClass());
-            } else {
+            }
+            else if (userClass instanceof Consumer){
 
 Review comment:
   Is this code tested?  I don't think this currently is even going to run.  Many places in the functions code we assume there are two types returned by the this function. 

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