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

    https://github.com/apache/flink/pull/2509#discussion_r89276937
  
    --- Diff: 
flink-streaming-connectors/flink-connector-kafka-0.10/src/main/java/org/apache/flink/streaming/connectors/kafka/internal/Kafka010Fetcher.java
 ---
    @@ -83,30 +90,17 @@ protected void 
assignPartitionsToConsumer(KafkaConsumer<byte[], byte[]> consumer
        @Override
        protected void emitRecord(T record, 
KafkaTopicPartitionState<TopicPartition> partition, long offset, ConsumerRecord 
consumerRecord) throws Exception {
                // get timestamp from provided ConsumerRecord (only possible 
with kafka 0.10.x)
    -           super.emitRecord(record, partition, offset, 
consumerRecord.timestamp());
    +           emitRecord(record, partition, offset, 
consumerRecord.timestamp());
        }
     
    -   /**
    -    * Emit record Kafka-timestamp aware.
    -    */
        @Override
    -   protected void emitRecord(T record, 
KafkaTopicPartitionState<TopicPartition> partitionState, long offset, long 
timestamp) throws Exception {
    -           if (timestampWatermarkMode == NO_TIMESTAMPS_WATERMARKS) {
    -                   // fast path logic, in case there are no watermarks
    +   protected void seekPartitionsToBeginning(KafkaConsumer consumer, 
List<TopicPartition> partitions) {
    +           consumer.seekToBeginning(partitions);
    +   }
     
    -                   // emit the record, using the checkpoint lock to 
guarantee
    -                   // atomicity of record emission and offset state update
    -                   synchronized (checkpointLock) {
    -                           sourceContext.collectWithTimestamp(record, 
timestamp);
    -                           partitionState.setOffset(offset);
    -                   }
    --- End diff --
    
    This has been refactored recently. I think you need to rebase the pull 
request and update the code here.
    Sorry for that.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to