Github user tdas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/4511#discussion_r24467329
  
    --- Diff: 
external/kafka/src/test/scala/org/apache/spark/streaming/kafka/KafkaRDDSuite.scala
 ---
    @@ -92,8 +120,17 @@ class KafkaRDDSuite extends KafkaStreamSuiteBase with 
BeforeAndAfter {
           )
           until <- kc.getLatestLeaderOffsets(topicPartitions).right.toOption
         } yield {
    -      KafkaRDD[String, String, StringDecoder, StringDecoder, String](
    -        sc, kc.kafkaParams, from, until, mmd => s"${mmd.offset} 
${mmd.message}")
    +      val leaders = until.map { case (tp, lo) =>
    --- End diff --
    
    nit: Could you simplify this piece of code. It took me 5 mins to understand 
whats going on here. Its very Scala-esque and concise and elegant, I completely 
agree, but its still hard to read :)



---
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]

Reply via email to