Skip to content

Commit

Permalink
[SPARK-21168] KafkaRDD should always set kafka clientId.
Browse files Browse the repository at this point in the history
[https://issues.apache.org/jira/browse/SPARK-21168](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.

Author: liuzhaokun <[email protected]>

Closes #19887 from liu-zhaokun/master1205.
  • Loading branch information
liu-zhaokun authored and koeninger committed Apr 23, 2018
1 parent 293a0f2 commit 448d248
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 448d248

Please sign in to comment.