Carl-Zhou-CN commented on code in PR #9736:
URL: https://github.com/apache/seatunnel/pull/9736#discussion_r2300067583


##########
seatunnel-connectors-v2/connector-kafka/src/main/java/org/apache/seatunnel/connectors/seatunnel/kafka/source/KafkaPartitionSplitReader.java:
##########
@@ -308,22 +283,10 @@ private long getStoppingOffset(TopicPartition tp) {
     }
 
     private void parseStartingOffsets(
-            KafkaSourceSplit split,
-            List<TopicPartition> partitionsStartingFromEarliest,
-            List<TopicPartition> partitionsStartingFromLatest,
-            Map<TopicPartition, Long> partitionsStartingFromSpecifiedOffsets) {
+            KafkaSourceSplit split, Map<TopicPartition, Long> 
partitionsStartingOffsets) {
         TopicPartition tp = split.getTopicPartition();
-        // Parse starting offsets.
-        ConsumerMetadata metadata = 
kafkaSourceConfig.getMapMetadata().get(split.getTablePath());
-        if (metadata.getStartMode() == StartMode.EARLIEST) {
-            partitionsStartingFromEarliest.add(tp);
-        } else if (metadata.getStartMode() == StartMode.LATEST) {
-            partitionsStartingFromLatest.add(tp);
-        } else if (metadata.getStartMode() == StartMode.GROUP_OFFSETS) {
-            // Do nothing here, the consumer will first try to get the 
committed offsets of
-            // these partitions by default.
-        } else {
-            partitionsStartingFromSpecifiedOffsets.put(tp, 
split.getStartOffset());
+        if (split.getStartOffset() >= 0) {

Review Comment:
   Will there be any impact on the newly added partitions?



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