pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] sijie commented on a change in pull request #2411: [functions] change instance id from string to int and expose number of instances in context
Date Tue, 21 Aug 2018 21:55:49 GMT
sijie commented on a change in pull request #2411: [functions] change instance id from string
to int and expose number of instances in context
URL: https://github.com/apache/incubator-pulsar/pull/2411#discussion_r211772934
 
 

 ##########
 File path: pulsar-functions/api-java/src/main/java/org/apache/pulsar/functions/api/Context.java
 ##########
 @@ -86,7 +86,14 @@
      *
      * @return the instance id
      */
-    String getInstanceId();
+    int getInstanceId();
+
+    /**
+     * Get the number of instances that invoke this function.
+     *
+     * @return the number of instances that invoke this function.
+     */
+    int getNumInstances();
 
 Review comment:
   how about adding a comment there, saying `getNumInstances` will return -1 if the function
is invoked from localrun?

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

Mime
View raw message