Github user koeninger commented on a diff in the pull request:
https://github.com/apache/spark/pull/4511#discussion_r24459792
--- Diff:
external/kafka/src/main/scala/org/apache/spark/streaming/kafka/KafkaUtils.scala
---
@@ -154,6 +154,19 @@ object KafkaUtils {
jssc.ssc, kafkaParams.toMap,
Map(topics.mapValues(_.intValue()).toSeq: _*), storageLevel)
}
+ /** get leaders for the given offset ranges, or throw an exception */
+ private def leadersForRanges(
+ kafkaParams: Map[String, String],
+ offsetRanges: Array[OffsetRange]): Map[TopicAndPartition, (String,
Int)] = {
+ val kc = new KafkaCluster(kafkaParams)
--- End diff --
That's right, it's basically just stateless config. Methods called on it
may be expensive, but i've tried to limit those to places where it's
unavoidable (looking up info that wasn't provided)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]