Github user arzt commented on the issue:

    https://github.com/apache/spark/pull/17774
  
    @koeninger I agree that assuming a long batch size is wrong, not sure 
whether it even matters. 
    But what if for one partition there is no lack in the current batch? Then 
fetching 1 message for this partition from kafka, is you suggest, would fail. 
So here zero makes sense in my eyes. This is also the old behaviour if `rate > 
1` and `lag == 0` 
[here](https://github.com/apache/spark/blob/master/external/kafka-0-8/src/main/scala/org/apache/spark/streaming/kafka/DirectKafkaInputDStream.scala#L107).
 
    Further, I think that truncating 0.99 to 0 messages per partition is also 
the right thing to do, as one cannot be sure that there is one message 
available if `(secsPerBatch * limit) < 1.0`. And as you say, in a future batch 
it is very like to become greater than 1.0.
    Do you agree?


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

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

Reply via email to