[
https://issues.apache.org/jira/browse/HIVE-20561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16619235#comment-16619235
]
slim bouguerra commented on HIVE-20561:
---------------------------------------
[~vgarg], as per the Jira Description, if the Kafka topic is Transactional,
therefore we might have commit markers that adds gaps between actual record.
This can be illustrated as
R1(offset=0) -> C1(offset=1) ->R2(offset=2).
As you can see the offset of R1 does not indicate what is the next one in the
stream.
> Use the position of the Kafka Consumer to track progress instead of Consumer
> Records offsets
> --------------------------------------------------------------------------------------------
>
> Key: HIVE-20561
> URL: https://issues.apache.org/jira/browse/HIVE-20561
> Project: Hive
> Issue Type: Bug
> Affects Versions: 4.0.0
> Reporter: slim bouguerra
> Assignee: slim bouguerra
> Priority: Major
> Fix For: 4.0.0
>
> Attachments: HIVE-20561.2.patch, HIVE-20561.3.patch, HIVE-20561.patch
>
>
> Kafka Partitions with transactional messages (post 0.11) will include commit
> or abort markers which indicate the result of a transaction. The markers are
> not returned to applications, yet have an offset in the log. Therefore the
> end of Stream position can be the offset of a control message.
> This Patch change the way how we keep track of the consumer position by using
> {code} consumer.position(topicP) {code} as oppose to using the offset of the
> consumed messages.
> Also I have done some refactoring to help code readability hopefully.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)