StefanRRichter commented on a change in pull request #6961: [FLINK-9635] Fix 
scheduling for local recovery
URL: https://github.com/apache/flink/pull/6961#discussion_r229298268
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/PreviousAllocationSchedulingStrategy.java
 ##########
 @@ -48,35 +50,68 @@ private PreviousAllocationSchedulingStrategy() {}
        @Override
        public <IN, OUT> OUT findMatchWithLocality(
                        @Nonnull SlotProfile slotProfile,
-                       @Nonnull Stream<IN> candidates,
-                       @Nonnull Function<IN, SlotContext> contextExtractor,
+                       @Nonnull Supplier<Stream<IN>> candidates,
 
 Review comment:
   I think both ways have their pros and cons, if we use a supplier for stream, 
we can benefit from the lazy evaluation of streaming. In one case for 
scheduling where we need to iterate the stream twice, havign a collection would 
be better. I feel ok with both variants if you think `Collection` is preferable.

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