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

Yun Tang commented on FLINK-20480:
----------------------------------

I think setting {{CheckpointedFunction}} interfaces as final in 
{{FlinkKafkaConsumerBase}} is to ensure the snapshot & restore logic is not 
open for users within Kafka connector. Maybe kafka connector guys could help 
answer more.


You could implement a {{DataStreamSource}} wrapping {{FlinkKafkaConsumerBase}} 
which extends {{AbstractUdfStreamOperator}} and you could add some logic in 
{{AbstractUdfStreamOperator#snapshotState}} which is still open for users.

> Methods from CheckpointedFunction interface in FlinkKafkaConsumerBase are set 
> to final
> --------------------------------------------------------------------------------------
>
>                 Key: FLINK-20480
>                 URL: https://issues.apache.org/jira/browse/FLINK-20480
>             Project: Flink
>          Issue Type: Wish
>          Components: Connectors / Kafka
>         Environment: Flink 1.11
>            Reporter: lidesheng
>            Priority: Major
>
>  I created a subclass from FlinkKafkaConsumerBase and wanna add some logic in 
> checkpoint snapshot. I failed to do it because methods from 
> CheckpointedFunction interface in FlinkKafkaConsumerBase are set to final. 
> understand that these methods are set to final because offsets are required 
> to hold and commit, so they do not want to be overridden by subclasses. Can 
> we provide an additional abstract method to provide subclasses for their own 
> state related operations? Call it in then end of final method default logic 
> is emtpy. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to