loserwang1024 commented on code in PR #29:
URL: 
https://github.com/apache/flink-connector-kafka/pull/29#discussion_r1201490891


##########
flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/source/enumerator/initializer/SpecifiedOffsetsInitializer.java:
##########
@@ -38,6 +38,10 @@
  * An implementation of {@link OffsetsInitializer} which initializes the 
offsets of the partition
  * according to the user specified offsets.
  *
+ * <p>Use specified offsets for specified partitions while use commit offsets 
or earliest for

Review Comment:
   @RamanVerma 
   > These unspecified partitions are initialized to be consumed according to 
offsetResetStrategy
   > 
   
   yes, howerver, OffsetResetStrategy is set to earliest in 
OffsetsInitializer#offsets and `KafkaDynamicSource` .
   
   Maybe I shoud give more desciptions like “use offsetResetStrategy which is 
default earliest”.
   
   Yes, however, the OffsetResetStrategy is set to earliest in both 
OffsetsInitializer#offsets and KafkaDynamicSource. **Maybe I should add more 
details such as "use the default earliest offsetResetStrategy"**  .
   
   > Specified partition's offset should be less than its latest offset, 
otherwise it will start from the earliest(maybe offsetResetStrategy).
   > 
   
   this code is in 
org.apache.kafka.clients.consumer.internals.Fetcher#handleOffsetOutOfRange, 
which use offsetResetStrategy for offsetOutOfRange.
   
   You can see the last section of FLIP-288, where I provide a detailed 
explanation.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to