Skip to content

Commit

Permalink
[EXT][SPARK-21168] KafkaRDD should always set kafka clientId. apache#…
Browse files Browse the repository at this point in the history
…19887

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 Aug 31, 2019
1 parent 667abf1 commit d8e6360
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 d8e6360

Please sign in to comment.