Github user tzulitai commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4206#discussion_r124466523
  
    --- Diff: 
flink-connectors/flink-connector-kafka-0.10/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducer010.java
 ---
    @@ -411,6 +414,18 @@ public void processElement(StreamRecord<T> element) 
throws Exception {
                invokeInternal(element.getValue(), element.getTimestamp());
        }
     
    +   @Override
    +   public void snapshotState(FunctionSnapshotContext context) throws 
Exception {
    +           final FlinkKafkaProducerBase<T> internalProducer = 
(FlinkKafkaProducerBase<T>) userFunction;
    +           internalProducer.snapshotState(context);
    +   }
    +
    +   @Override
    +   public void initializeState(FunctionInitializationContext context) 
throws Exception {
    --- End diff --
    
    nit: I would declare `initializeState` before `snapshotState`, just for the 
sake of a better logic flow.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to