{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/15820","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/15820/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/15820/comments","events_url":"https://api.github.com/repos/apache/spark/issues/15820/events","html_url":"https://github.com/apache/spark/pull/15820","id":188146235,"number":15820,"title":"[SPARK-18373][SS][Kafka]Make failOnDataLoss=false work with Spark jobs","user":{"login":"zsxwing","id":1000778,"avatar_url":"https://avatars.githubusercontent.com/u/1000778?v=3","gravatar_id":"","url":"https://api.github.com/users/zsxwing","html_url":"https://github.com/zsxwing","followers_url":"https://api.github.com/users/zsxwing/followers","following_url":"https://api.github.com/users/zsxwing/following{/other_user}","gists_url":"https://api.github.com/users/zsxwing/gists{/gist_id}","starred_url":"https://api.github.com/users/zsxwing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zsxwing/subscriptions","organizations_url":"https://api.github.com/users/zsxwing/orgs","repos_url":"https://api.github.com/users/zsxwing/repos","events_url":"https://api.github.com/users/zsxwing/events{/privacy}","received_events_url":"https://api.github.com/users/zsxwing/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-11-09T01:10:56Z","updated_at":"2016-11-09T21:35:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/15820","html_url":"https://github.com/apache/spark/pull/15820","diff_url":"https://github.com/apache/spark/pull/15820.diff","patch_url":"https://github.com/apache/spark/pull/15820.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nThis PR adds `CachedKafkaConsumer.getAndIgnoreLostData` to handle corner cases of `failOnDataLoss=false`. I listed all kinds of cases we should support in the code comment.\r\n\r\n## How was this patch tested?\r\n\r\nBecause 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 case. Therefore, I just created `test(\"stress test for failOnDataLoss=false\")` which should cover most of corner cases.\r\n\r\nI also modified some existing tests to test for both `failOnDataLoss=false` and `failOnDataLoss=true` to make sure it doesn't break existing logic.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/259533293","html_url":"https://github.com/apache/spark/pull/15820#issuecomment-259533293","issue_url":"https://api.github.com/repos/apache/spark/issues/15820","id":259533293,"user":{"login":"zsxwing","id":1000778,"avatar_url":"https://avatars.githubusercontent.com/u/1000778?v=3","gravatar_id":"","url":"https://api.github.com/users/zsxwing","html_url":"https://github.com/zsxwing","followers_url":"https://api.github.com/users/zsxwing/followers","following_url":"https://api.github.com/users/zsxwing/following{/other_user}","gists_url":"https://api.github.com/users/zsxwing/gists{/gist_id}","starred_url":"https://api.github.com/users/zsxwing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zsxwing/subscriptions","organizations_url":"https://api.github.com/users/zsxwing/orgs","repos_url":"https://api.github.com/users/zsxwing/repos","events_url":"https://api.github.com/users/zsxwing/events{/privacy}","received_events_url":"https://api.github.com/users/zsxwing/received_events","type":"User","site_admin":false},"created_at":"2016-11-09T21:35:39Z","updated_at":"2016-11-09T21:35:39Z","body":"@koeninger Thanks for reviewing. Refactored the codes to avoid using early returns and addressed your comments."}}
{"actor":{"display_login":"zsxwing"}}