aljoscha closed pull request #5304: [FLINK-8290]Modify clientId to groupId in 
flink-connector-kafka-0.8
URL: https://github.com/apache/flink/pull/5304
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/SimpleConsumerThread.java
 
b/flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/SimpleConsumerThread.java
index 4c704c3b81c..1fdff9d9c8d 100644
--- 
a/flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/SimpleConsumerThread.java
+++ 
b/flink-connectors/flink-connector-kafka-0.8/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/SimpleConsumerThread.java
@@ -94,6 +94,7 @@
        private final int fetchSize;
        private final int bufferSize;
        private final int reconnectLimit;
+       private final String clientId;
 
        // exceptions are thrown locally
        public SimpleConsumerThread(
@@ -123,6 +124,8 @@ public SimpleConsumerThread(
                this.fetchSize = getInt(config, "fetch.message.max.bytes", 
1048576);
                this.bufferSize = getInt(config, "socket.receive.buffer.bytes", 
65536);
                this.reconnectLimit = getInt(config, 
"flink.simple-consumer-reconnectLimit", 3);
+               String groupId = config.getProperty("group.id", 
"flink-kafka-consumer-legacy-" + broker.id());
+               this.clientId = config.getProperty("client.id", groupId);
        }
 
        public 
ClosableBlockingQueue<KafkaTopicPartitionState<TopicAndPartition>> 
getNewPartitionsQueue() {
@@ -138,8 +141,6 @@ public void run() {
                LOG.info("Starting to fetch from {}", this.partitions);
 
                // set up the config values
-               final String clientId = "flink-kafka-consumer-legacy-" + 
broker.id();
-
                try {
                        // create the Kafka consumer that we actually use for 
fetching
                        consumer = new SimpleConsumer(broker.host(), 
broker.port(), soTimeout, bufferSize, clientId);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to