spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tdas <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-4964] [Streaming] refactor createRDD to...
Date Tue, 10 Feb 2015 21:56:02 GMT
Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4511#discussion_r24454653
  
    --- 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 --
    
    We keep creating a KafkaCluster object everywhere... what is the cost of creating a KafkaCluster
object? Is there any? I guess not because it is just creating a config object and nothing
else... isnt it?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message