[ 
https://issues.apache.org/jira/browse/KAFKA-3821?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16483856#comment-16483856
 ] 

Gunnar Morling commented on KAFKA-3821:
---------------------------------------

Hey [~rhauch], thanks for getting back to this one. I don't think anything in 
particular speaks against the sub-type idea apart from your very first comment: 
"Neither is clean or elegant". IMO, such {{OffsetSourceRecord}} shouldn't 
extend {{SourceRecord}} from an OO modelling perspective, as it doesn't have 
key, value, schemas nor a topic. It kinda would have made sense to model it the 
other way around ({{SourceRecord extends OffsetRecord}}), but it's too late to 
change it that way.

That's why I'd have preferred the suggested new version of {{poll()}} with a 
receiver parameter, it seemed more logical in terms of proper modelling. But 
I'm not hung up on this one, if you think the sub-class approach is the way to 
go and it's something you'd find acceptable in the Kafka API, why not. I can 
try and start writing up a KIP along these lines, but I'm afraid that'll miss 
the next release's deadline (this week?).

> Allow Kafka Connect source tasks to produce offset without writing to topics
> ----------------------------------------------------------------------------
>
>                 Key: KAFKA-3821
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3821
>             Project: Kafka
>          Issue Type: Improvement
>          Components: KafkaConnect
>    Affects Versions: 0.9.0.1
>            Reporter: Randall Hauch
>            Priority: Major
>              Labels: needs-kip
>             Fix For: 2.0.0
>
>
> Provide a way for a {{SourceTask}} implementation to record a new offset for 
> a given partition without necessarily writing a source record to a topic.
> Consider a connector task that uses the same offset when producing an unknown 
> number of {{SourceRecord}} objects (e.g., it is taking a snapshot of a 
> database). Once the task completes those records, the connector wants to 
> update the offsets (e.g., the snapshot is complete) but has no more records 
> to be written to a topic. With this change, the task could simply supply an 
> updated offset.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to