Github user tzulitai commented on a diff in the pull request:
https://github.com/apache/flink/pull/3915#discussion_r117175760
--- Diff:
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBase.java
---
@@ -311,12 +311,14 @@ public FlinkKafkaConsumerBase(List<String> topics,
KeyedDeserializationSchema<T>
* from a checkpoint or savepoint. When the consumer is restored from a
checkpoint or
* savepoint, only the offsets in the restored state will be used.
*
- * Note: The api is supported by kafka version >= 0.10 only.
- *
* @return The consumer object, to allow function chaining.
*/
public FlinkKafkaConsumerBase<T> setStartFromSpecificDate(Date date) {
- throw new RuntimeException("This method supports kafka version
>= 0.10 only.");
+ Preconditions.checkArgument(null != date && date.getTime() <=
System.currentTimeMillis(), "Startup time must before curr time.");
--- End diff --
must "be" before.
Could you also add the errorneous time to the error message?
---
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.
---