GitHub user zsxwing opened a pull request:
https://github.com/apache/spark/pull/15820
[SPARK-18373][SS][Kafka]Make failOnDataLoss=false work with Spark jobs
## What changes were proposed in this pull request?
This PR adds `CachedKafkaConsumer.getAndIgnoreLostData` to handle corner
cases of `failOnDataLoss=false`. I listed all kinds of cases we should support
in the code comment.
## How was this patch tested?
Because I cannot find any way to manually control the Kafka server to clean
up logs, it's impossible to write unit tests for each corner cases. Therefore,
I just created `test("stress test for failOnDataLoss=false")` which should
cover most of corner cases.
I also modified some existing tests to test for both `failOnDataLoss=false`
and `failOnDataLoss=true` to make sure it doesn't break existing logic.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zsxwing/spark failOnDataLoss
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/15820.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #15820
----
commit e8eff9ff3b32320ab8d969089cded97e9ec29a52
Author: Shixiong Zhu <[email protected]>
Date: 2016-10-28T17:46:54Z
Make failOnDataLoss=false stable for Spark jobs
----
---
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]