flink1.12正常程序中,有如下告警:
19:38:37,557 WARN org.apache.kafka.clients.consumer.ConsumerConfig [] - The configuration 'flink.partition-discovery.interval-millis' was supplied but isn't a known config. 我有一行如下配置: properties.setProperty(FlinkKafkaConsumerBase.KEY_PARTITION_DISCOVERY_INTERVAL_MILLIS,10); 根据官网https://ci.apache.org/projects/flink/flink-docs-stable/dev/connectors/kafka.html#topic-discovery介绍: By default, partition discovery is disabled. To enable it, set a non-negative value for flink.partition-discovery.interval-millis in the provided properties config, representing the discovery interval in milliseconds. 上述配置应该是合法的,但是为何会报如此警告呢? -- Sent from: http://apache-flink.147419.n8.nabble.com/ |
这个是 Kafka client 的警告。这个配置项是 Flink 加进去的,Kafka 不认识。
Best, Paul Lam > 2021年4月18日 19:45,lp <[hidden email]> 写道: > > flink1.12正常程序中,有如下告警: > > 19:38:37,557 WARN org.apache.kafka.clients.consumer.ConsumerConfig > [] - The configuration 'flink.partition-discovery.interval-millis' was > supplied but isn't a known config. > > 我有一行如下配置: > properties.setProperty(FlinkKafkaConsumerBase.KEY_PARTITION_DISCOVERY_INTERVAL_MILLIS,10); > > > 根据官网https://ci.apache.org/projects/flink/flink-docs-stable/dev/connectors/kafka.html#topic-discovery介绍: > By default, partition discovery is disabled. To enable it, set a > non-negative value for flink.partition-discovery.interval-millis in the > provided properties config, representing the discovery interval in > milliseconds. > > > 上述配置应该是合法的,但是为何会报如此警告呢? > > > > -- > Sent from: http://apache-flink.147419.n8.nabble.com/ |
你可以看下源码: 这个props只是作为FlinkKafkaConsumer初始化配置变量,只是这个props 不仅仅是用来初始化kafka的,只不过这个props最后整个扔进kafka消费客户端的初始化里面而已,不会有任何影响。 就想你自己初始化一个kafka 消费端,你往props塞进其他参数,也会警告,但没有任何影响。 ------------------ 原始邮件 ------------------ 发件人: "user-zh" <[hidden email]>; 发送时间: 2021年4月19日(星期一) 下午4:39 收件人: "user-zh"<[hidden email]>; 主题: Re: Flink-kafka-connector Consumer配置警告 Best, Paul Lam > 2021年4月18日 19:45,lp <[hidden email]> 写道: > > flink1.12正常程序中,有如下告警: > > 19:38:37,557 WARN org.apache.kafka.clients.consumer.ConsumerConfig > [] - The configuration 'flink.partition-discovery.interval-millis' was > supplied but isn't a known config. > > 我有一行如下配置: > properties.setProperty(FlinkKafkaConsumerBase.KEY_PARTITION_DISCOVERY_INTERVAL_MILLIS,10); > > > 根据官网https://ci.apache.org/projects/flink/flink-docs-stable/dev/connectors/kafka.html#topic-discovery介绍: > By default, partition discovery is disabled. To enable it, set a > non-negative value for flink.partition-discovery.interval-millis in the > provided properties config, representing the discovery interval in > milliseconds. > > > 上述配置应该是合法的,但是为何会报如此警告呢? > > > > -- > Sent from: http://apache-flink.147419.n8.nabble.com/ |
In reply to this post by lp
flink.partition-discovery.interval-millis这个配置在Flink中是生效的,flink kafka connectors 会根据配置的时间去获取kafka topic的分区信息,代码实现见: FlinkKafkaConsumerBase 中的createAndStartDiscoveryLoop方法。
19:38:37,557 WARN org.apache.kafka.clients.consumer.ConsumerConfig [] - The configuration 'flink.partition-discovery.interval-millis' was supplied but isn't a known config. 这个WARN是kafka报出来的,意思是说kafka收到了提供这个参数,但是kafka并不认识。 这个参数并不是给kafka用的,只不过在获取kafka分区的时候需要创建一个KafkaConsumer实例,把设置的参数也一并传给了Kafka。 对应的Warn位置为KafkaConsumer构造函数里面调用的config.logUnused()方法。 在 2021/4/18 下午7:45,“lp”<[hidden email]> 写入: flink1.12正常程序中,有如下告警: 19:38:37,557 WARN org.apache.kafka.clients.consumer.ConsumerConfig [] - The configuration 'flink.partition-discovery.interval-millis' was supplied but isn't a known config. 我有一行如下配置: properties.setProperty(FlinkKafkaConsumerBase.KEY_PARTITION_DISCOVERY_INTERVAL_MILLIS,10); 根据官网https://ci.apache.org/projects/flink/flink-docs-stable/dev/connectors/kafka.html#topic-discovery介绍: By default, partition discovery is disabled. To enable it, set a non-negative value for flink.partition-discovery.interval-millis in the provided properties config, representing the discovery interval in milliseconds. 上述配置应该是合法的,但是为何会报如此警告呢? -- Sent from: http://apache-flink.147419.n8.nabble.com/ |
Free forum by Nabble | Edit this page |