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

    https://github.com/apache/flink/pull/747#discussion_r31420656
  
    --- Diff: 
flink-staging/flink-streaming/flink-streaming-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/api/persistent/PersistentKafkaSource.java
 ---
    @@ -140,11 +144,14 @@ public void open(Configuration parameters) throws 
Exception {
                // most likely the number of offsets we're going to store here 
will be lower than the number of partitions.
                int numPartitions = getNumberOfPartitions();
                LOG.debug("The topic {} has {} partitions", topicName, 
numPartitions);
    -           this.lastOffsets = new long[numPartitions];
    -           this.commitedOffsets = new long[numPartitions];
    -           Arrays.fill(this.lastOffsets, -1);
    -           Arrays.fill(this.commitedOffsets, 0); // just to make it clear
    -
    +           
    +           long[] defaultOffset = new long[numPartitions];
    +           Arrays.fill(defaultOffset, -1);
    +           
    +           this.lastOffsets = 
getRuntimeContext().getOperatorState("offset", defaultOffset);
    +           
    +           //TODO: commit fetched offset to ZK if not default
    --- End diff --
    
    We can not merge the PR with this TODO open.


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