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

    https://github.com/apache/spark/pull/13996#discussion_r69177803
  
    --- Diff: 
external/kafka-0-10/src/test/scala/org/apache/spark/streaming/kafka010/DirectKafkaStreamSuite.scala
 ---
    @@ -547,20 +559,20 @@ class DirectKafkaStreamSuite
         val ekp = new JHashMap[String, Object](kafkaParams)
         KafkaUtils.fixKafkaParams(ekp)
     
    -    val s = new DirectKafkaInputDStream[String, String](
    -      ssc,
    -      preferredHosts,
    -      new ConsumerStrategy[String, String] {
    -        def executorKafkaParams = ekp
    -        def onStart(currentOffsets: Map[TopicPartition, Long]): 
Consumer[String, String] = {
    -          val consumer = new KafkaConsumer[String, String](kafkaParams)
    -          val tps = List(new TopicPartition(topic, 0), new 
TopicPartition(topic, 1))
    -          consumer.assign(Arrays.asList(tps: _*))
    -          tps.foreach(tp => consumer.seek(tp, 0))
    -          consumer
    -        }
    +    val newStrategy = new ConsumerStrategy[String, String] {
    --- End diff --
    
    Yeah. this one was a style thing. the code looked too nested to be easily 
readable.


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