mas-chen commented on code in PR #76:
URL: 
https://github.com/apache/flink-connector-kafka/pull/76#discussion_r1466939581


##########
flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/source/KafkaSourceBuilder.java:
##########
@@ -350,6 +352,26 @@ public KafkaSourceBuilder<OUT> setValueOnlyDeserializer(
         return this;
     }
 
+    /**
+     * Sets the optional {@link RecordEvaluator eofRecordEvaluator} for 
KafkaSource.
+     *
+     * <p>When the evaluator is specified, it is invoked for each 
de-serialized record to determine
+     * whether the corresponding split has reached end of stream. If a record 
is matched by the
+     * evaluator, the source would not emit this record as well as the 
following records in the same
+     * split.
+     *
+     * <p>Note that the evaluator works jointly with the stopping offsets 
specified by the {@link
+     * #setBounded(OffsetsInitializer)} or the {@link 
#setUnbounded(OffsetsInitializer)}. The source
+     * stops consuming from a split when any of these conditions is met.
+     *
+     * @param eofRecordEvaluator a {@link RecordEvaluator recordEvaluator}
+     * @return this KafkaSourceBuilder.
+     */
+    public KafkaSourceBuilder<OUT> setEofRecordEvaluator(RecordEvaluator<OUT> 
eofRecordEvaluator) {

Review Comment:
   When this condition is met, do we expect the Flink job to go into FINISHED 
state? If so, I think we need to only support this in bounded mode, as 
unbounded mode can't reach FINISHED state. This is because the KafkaSource and 
DynamicKafkaSource only send "notifyNoMoreSplits" for the bounded case.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to