Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-20318

Fix cast question for properies() method in kafka ConnectorDescriptor

    XMLWordPrintableJSON

    Details

      Description

       

      This Jira fixes Kafka connector. There is a cast problem when use properties method.

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

      change :

      • change (String) v ----> String.valueOf() in Kafka.java

       

       

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                hehuiyuan hehuiyuan
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: