[ 
https://issues.apache.org/jira/browse/BEAM-13171?focusedWorklogId=686795&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-686795
 ]

ASF GitHub Bot logged work on BEAM-13171:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/Nov/21 10:20
            Start Date: 26/Nov/21 10:20
    Worklog Time Spent: 10m 
      Work Description: aghajani commented on a change in pull request #15951:
URL: https://github.com/apache/beam/pull/15951#discussion_r757384603



##########
File path: 
sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/ReadFromKafkaDoFn.java
##########
@@ -338,6 +355,9 @@ public ProcessContinuation processElement(
         // When there are no records available for the current TopicPartition, 
self-checkpoint
         // and move to process the next element.
         if (rawRecords.isEmpty()) {
+          if (expectedOffset > endOffset) {

Review comment:
       Thanks for the comment, after putting more thought to this, I think it 
does not make sense to check for the scenario at all since we are getting the 
endOffset from Kafka Client itself using stopReadTime (will throw exception if 
no such offset be found). So the waiting scenario would never happen. Just 
removed the checking section.




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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 686795)
    Time Spent: 1.5h  (was: 1h 20m)

> Support for stopReadTime on KafkaIO SDF 
> ----------------------------------------
>
>                 Key: BEAM-13171
>                 URL: https://issues.apache.org/jira/browse/BEAM-13171
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-kafka
>            Reporter: Mostafa Aghajani
>            Assignee: Mostafa Aghajani
>            Priority: P2
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> There is already the support for startReadTime using SDF when the Kafka 
> version is supported.
> I want to add the support for stopReadTIme so we can extract messages from 
> Kafka only up to a point in time and then the task will be finished.
> One use case: when you want to only re-process (re-read) a period of time for 
> a Kafka topic in your pipeline.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to