[ https://issues.apache.org/jira/browse/FLINK-7764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16198285#comment-16198285 ]
Xingcan Cui commented on FLINK-7764: ------------------------------------ This problem may be caused by the recent refactoring of Kafka producers. The {{FlinkKafkaProducer010Configuration}} returned by {{writeToKafkaWithTimestamps()}} (the {{producer}} in description) is a {{DataStreamSink}} itself. However, another {{DataStreamSink}} has already been generated when adding the {{KafkaProducer}} as the sink in {{writeToKafkaWithTimestamps()}}. Thus manipulating the returned configuration object (e.g., {{producer.name("foo")}}) will not affect the worked {{Transformation}} in the existing {{DataStreamSink}} (i.e., {{originalSink.getTransformation()}}). Since it's hard to change the internal construction logic of a job, to solve this, maybe we can only override all the {{DataStreamSink}} public methods in {{FlinkKafkaProducer010Configuration}} to work on the existing {{Transformation}}. What do you think [~fhueske]? > FlinkKafkaProducer010 does not accept name, uid, or parallelism > --------------------------------------------------------------- > > Key: FLINK-7764 > URL: https://issues.apache.org/jira/browse/FLINK-7764 > Project: Flink > Issue Type: Bug > Components: Kafka Connector > Affects Versions: 1.4.0, 1.3.2 > Reporter: Fabian Hueske > Assignee: Xingcan Cui > > As [reported on the user > list|https://lists.apache.org/thread.html/1e97b79cb5611a942beb609a61b5fba6d62a49c9c86336718a9a0004@%3Cuser.flink.apache.org%3E]: > When I try to use KafkaProducer with timestamps it fails to set name, uid or > parallelism. It uses default values. > {code} > FlinkKafkaProducer010.FlinkKafkaProducer010Configuration<T> producer = > FlinkKafkaProducer010 > .writeToKafkaWithTimestamps(stream, topicName, schema, props, > partitioner); > producer.setFlushOnCheckpoint(flushOnCheckpoint); > producer.name("foo") > .uid("bar") > .setParallelism(5); > return producer; > {code} > As operator name it shows "FlinKafkaProducer 0.10.x” with the typo. -- This message was sent by Atlassian JIRA (v6.4.14#64029)