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

    https://github.com/apache/flink/pull/3915#discussion_r124964762
  
    --- Diff: 
flink-connectors/flink-connector-kafka-0.10/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumer010.java
 ---
    @@ -128,6 +135,53 @@ public FlinkKafkaConsumer010(List<String> topics, 
KeyedDeserializationSchema<T>
        }
     
        @Override
    +   public FlinkKafkaConsumerBase<T> setStartFromSpecificDate(Date date) {
    +           Preconditions.checkArgument(null != date && date.getTime() <= 
System.currentTimeMillis(), "Startup time must before curr time.");
    +           this.startupMode = StartupMode.SPECIFIC_TIMESTAMP;
    +           this.specificStartupDate = date;
    +           this.specificStartupOffsets = null;
    +           return this;
    +   }
    +
    +   /**
    +    * Convert flink topic partition to kafka topic partition.
    +    * @param flinkTopicPartitionMap
    +    * @return
    +    */
    +   private Map<TopicPartition, Long> 
convertFlinkToKafkaTopicPartition(Map<KafkaTopicPartition, Long> 
flinkTopicPartitionMap) {
    +           Map<TopicPartition, Long> topicPartitionMap = new 
HashMap<>(flinkTopicPartitionMap.size());
    +           for (Map.Entry<KafkaTopicPartition, Long> entry : 
flinkTopicPartitionMap.entrySet()) {
    +                   topicPartitionMap.put(new 
TopicPartition(entry.getKey().getTopic(), entry.getKey().getPartition()), 
entry.getValue());
    +           }
    +
    +           return topicPartitionMap;
    +
    --- End diff --
    
    unnecessary empty line


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