We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 548d529 commit c1bd6d9Copy full SHA for c1bd6d9
external/kafka/src/main/scala/org/apache/spark/rdd/kafka/KafkaRDD.scala
@@ -88,11 +88,10 @@ class KafkaRDD[
88
var requestOffset = part.fromOffset
89
var iter: Iterator[MessageAndOffset] = null
90
91
- // TODO broken until SPARK-4014 is resolved and attemptId / attemptNumber is meaningful.
92
// The idea is to use the provided preferred host, except on task retry atttempts,
93
// to minimize number of kafka metadata requests
94
private def connectLeader: SimpleConsumer = {
95
- if (context.attemptId > 0) {
+ if (context.attemptNumber > 0) {
96
kc.connectLeader(part.topic, part.partition).fold(
97
errs => throw new Exception(
98
s"Couldn't connect to leader for topic ${part.topic} ${part.partition}: " +
0 commit comments