Skip to content

Commit

Permalink
[SPARK-21168] KafkaRDD should always set kafka clientId. apache#19887
Browse files Browse the repository at this point in the history
https://issues.apache.org/jira/browse/SPARK-21168
There are no a number of other places that a client ID should be set,and I think we should use consumer.clientId in the clientId method,because the fetch request will be used by the same consumer behind.
  • Loading branch information
zzcclp committed Dec 6, 2018
1 parent 96ee540 commit d0233d4
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ class KafkaRDD[

private def fetchBatch: Iterator[MessageAndOffset] = {
val req = new FetchRequestBuilder()
.clientId(consumer.clientId)
.addFetch(part.topic, part.partition, requestOffset, kc.config.fetchMessageMaxBytes)
.build()
val resp = consumer.fetch(req)
Expand Down

0 comments on commit d0233d4

Please sign in to comment.