jerrypeng commented on a change in pull request #2613: Avoid scheduling 
heartbeat function if owner-worker not available
URL: https://github.com/apache/pulsar/pull/2613#discussion_r220266898
 
 

 ##########
 File path: 
pulsar-functions/worker/src/main/java/org/apache/pulsar/functions/worker/scheduler/IScheduler.java
 ##########
 @@ -22,9 +22,22 @@
 import org.apache.pulsar.functions.proto.Function.Instance;
 
 import java.util.List;
+import java.util.Set;
 
 public interface IScheduler {
 
-    List<Assignment> schedule(List<Instance> unassignedFunctionInstances,
-                              List<Assignment> currentAssignments, 
List<String> workers);
+    /**
+     * Scheduler schedules assignments to appropriate workers and adds into 
#resultAssignments
+     * 
+     * @param resultAssignments
 
 Review comment:
   why would there be gc issues? All that needs to be done:
   
   resultAssignments.addAll(assignments)
   
   Since we are in java, only pointers are added to the list.  Yes there might 
be some extra "metadata" related to the list created in the scheduled that 
would need to gc ed but that would be negligible.  We are not going to be 
allocating much more memory
   
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to