{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/16219","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/16219/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/16219/comments","events_url":"https://api.github.com/repos/apache/spark/issues/16219/events","html_url":"https://github.com/apache/spark/pull/16219","id":194442768,"number":16219,"title":"[SPARK-18790][SS] Keep a general offset history of stream batches","user":{"login":"tcondie","id":1696558,"avatar_url":"https://avatars.githubusercontent.com/u/1696558?v=3","gravatar_id":"","url":"https://api.github.com/users/tcondie","html_url":"https://github.com/tcondie","followers_url":"https://api.github.com/users/tcondie/followers","following_url":"https://api.github.com/users/tcondie/following{/other_user}","gists_url":"https://api.github.com/users/tcondie/gists{/gist_id}","starred_url":"https://api.github.com/users/tcondie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcondie/subscriptions","organizations_url":"https://api.github.com/users/tcondie/orgs","repos_url":"https://api.github.com/users/tcondie/repos","events_url":"https://api.github.com/users/tcondie/events{/privacy}","received_events_url":"https://api.github.com/users/tcondie/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-08T20:59:00Z","updated_at":"2016-12-08T22:50:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/16219","html_url":"https://github.com/apache/spark/pull/16219","diff_url":"https://github.com/apache/spark/pull/16219.diff","patch_url":"https://github.com/apache/spark/pull/16219.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nInstead of only keeping the minimum number of offsets around, we should keep enough information to allow us to roll back n batches and reexecute the stream starting from a given point. In particular, we should create a config in SQLConf, spark.sql.streaming.retainedBatches that defaults to 100 and ensure that we keep enough log files in the following places to roll back the specified number of batches:\r\nthe offsets that are present in each batch\r\nversions of the state store\r\nthe files lists stored for the FileStreamSource\r\nthe metadata log stored by the FileStreamSink\r\n\r\n@marmbrus @zsxwing \r\n\r\n## How was this patch tested?\r\n\r\nThe following tests were added.\r\n\r\n### StreamExecution offset metadata\r\nTest added to StreamingQuerySuite that ensures offset metadata is garbage collected according to minBatchesRetain\r\n\r\n### CompactibleFileStreamLog\r\nTests added in CompactibleFileStreamLogSuite to ensure that logs are purged starting before the first compaction file that proceeds the current batch id - minBatchesToRetain.  \r\n\r\n\r\nPlease review http://spark.apache.org/contributing.html before opening a pull request.\r\n"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/265879570","html_url":"https://github.com/apache/spark/pull/16219#issuecomment-265879570","issue_url":"https://api.github.com/repos/apache/spark/issues/16219","id":265879570,"user":{"login":"AmplabJenkins","id":4031291,"avatar_url":"https://avatars.githubusercontent.com/u/4031291?v=3","gravatar_id":"","url":"https://api.github.com/users/AmplabJenkins","html_url":"https://github.com/AmplabJenkins","followers_url":"https://api.github.com/users/AmplabJenkins/followers","following_url":"https://api.github.com/users/AmplabJenkins/following{/other_user}","gists_url":"https://api.github.com/users/AmplabJenkins/gists{/gist_id}","starred_url":"https://api.github.com/users/AmplabJenkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmplabJenkins/subscriptions","organizations_url":"https://api.github.com/users/AmplabJenkins/orgs","repos_url":"https://api.github.com/users/AmplabJenkins/repos","events_url":"https://api.github.com/users/AmplabJenkins/events{/privacy}","received_events_url":"https://api.github.com/users/AmplabJenkins/received_events","type":"User","site_admin":false},"created_at":"2016-12-08T22:50:22Z","updated_at":"2016-12-08T22:50:22Z","body":"Test FAILed.\nRefer to this link for build results (access rights to CI server needed): \nhttps://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/69879/\nTest FAILed."}}
{"actor":{"display_login":"AmplabJenkins"}}