Github user jerryshao commented on the pull request:

    https://github.com/apache/spark/pull/4805#issuecomment-77787450
  
    Hi @koeninger , thanks a lot for your review. I will the fix the all the 
comments you addressed.
    
    The reason why I put updating ZK in `StreamingListener` rather than 
`compute()` is that `onBatchCompleted` will only be called when batch is 
completed, whereas `compute()` will be called in each batch duration, so if the 
job is delayed, lot's of actually not computed but already submitted job will 
be pending on the queue, but as `compute()` function is already called, so 
these unprocessed offset will be committed into ZK, so that's why I put ZK 
updating in `StreamingListener`.
    



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