You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jingsong Lee (Jira)" <ji...@apache.org> on 2021/06/03 08:44:00 UTC

[jira] [Updated] (FLINK-20318) Fix cast question for properies() method in kafka ConnectorDescriptor

     [ https://issues.apache.org/jira/browse/FLINK-20318?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jingsong Lee updated FLINK-20318:
---------------------------------
    Fix Version/s: 1.14.0

> Fix cast question for properies() method in kafka ConnectorDescriptor
> ---------------------------------------------------------------------
>
>                 Key: FLINK-20318
>                 URL: https://issues.apache.org/jira/browse/FLINK-20318
>             Project: Flink
>          Issue Type: Bug
>          Components: Connectors / Kafka, Table SQL / Ecosystem
>            Reporter: hehuiyuan
>            Assignee: hehuiyuan
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.14.0
>
>
>  
> This Jira fixes Kafka connector. There is a cast problem when use properties method.
> {code:java}
> Properties props = new Properties();
>  props.put( "enable.auto.commit", "false");
>  props.put( "fetch.max.wait.ms", "3000");
>  props.put("flink.poll-timeout", 5000);
>  props.put( "flink.partition-discovery.interval-millis", false);
> kafka = new Kafka()
>  .version("0.11")
>  .topic(topic)
>  .properties(props);
> {code}
> {code:java}
> Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
> Exception in thread "main" java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
> {code}
> change :
> - *change (String) v ----> String.valueOf() in Kafka.java*
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)