Github user koeninger commented on the issue:
https://github.com/apache/spark/pull/15387
I'm not going to say anything is impossible, which is the point of the
assert. If it does somehow happen, it will be at start, so should be
obvious.
The whole poll 0 / pause thing is a gross hack, but it's what was suggested
by the kafka project dev list.
On Oct 7, 2016 6:16 AM, "Tathagata Das" <[email protected]> wrote:
> *@tdas* commented on this pull request.
> ------------------------------
>
> In external/kafka-0-10/src/main/scala/org/apache/spark/streaming/kafka010/
> DirectKafkaInputDStream.scala
> <https://github.com/apache/spark/pull/15387#pullrequestreview-3283352>:
>
> > @@ -223,7 +223,7 @@ private[spark] class DirectKafkaInputDStream[K, V](
>
> override def start(): Unit = {
> val c = consumer
> - c.poll(0)
> + assert(c.poll(0).isEmpty, "Driver shouldn't consume messages; pause
if you poll during setup")
>
> Is this poll(0) guaranteed to not return any record if the previous
> poll(0) is paused immediately? Is there a race condition possible where
the
> first poll(0) (inside consumer strategy) manages to actually fetch records
> internally before it is paused, which is then returned by this poll(0)
> (inside DStream)?
>
> â
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/spark/pull/15387#pullrequestreview-3283352>,
> or mute the thread
>
<https://github.com/notifications/unsubscribe-auth/AAGAB00e-NfFyaeSVoGw3SAplTC3m6xAks5qxin8gaJpZM4KQlB3>
> .
>
---
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]