{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/14553","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/14553/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/14553/comments","events_url":"https://api.github.com/repos/apache/spark/issues/14553/events","html_url":"https://github.com/apache/spark/pull/14553","id":170069175,"number":14553,"title":"[SPARK-16963] [STREAMING] [SQL] Changes to Source trait and related implementation classes","user":{"login":"frreiss","id":12436991,"avatar_url":"https://avatars.githubusercontent.com/u/12436991?v=3","gravatar_id":"","url":"https://api.github.com/users/frreiss","html_url":"https://github.com/frreiss","followers_url":"https://api.github.com/users/frreiss/followers","following_url":"https://api.github.com/users/frreiss/following{/other_user}","gists_url":"https://api.github.com/users/frreiss/gists{/gist_id}","starred_url":"https://api.github.com/users/frreiss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frreiss/subscriptions","organizations_url":"https://api.github.com/users/frreiss/orgs","repos_url":"https://api.github.com/users/frreiss/repos","events_url":"https://api.github.com/users/frreiss/events{/privacy}","received_events_url":"https://api.github.com/users/frreiss/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2016-08-09T02:39:01Z","updated_at":"2016-09-28T18:52:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/14553","html_url":"https://github.com/apache/spark/pull/14553","diff_url":"https://github.com/apache/spark/pull/14553.diff","patch_url":"https://github.com/apache/spark/pull/14553.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nThis PR contains changes to the Source trait such that the scheduler can notify data sources when it is safe to discard buffered data. Summary of changes:\r\n* Added a method `commit(end: Offset)` that tells the Source that is OK to discard all offsets up `end`, inclusive.\r\n* Changed the semantics of a `None` value for the `getBatch` method to mean \"from the very beginning of the stream\"; as opposed to \"all data present in the Source's buffer\".\r\n* Added notes that the upper layers of the system will never call `getBatch` with a start value less than the last value passed to `commit`.\r\n* Added a `lastCommittedOffset` method to allow the scheduler to query the status of each Source on restart. This addition is not strictly necessary, but it seemed like a good idea -- Sources will be maintaining their own persistent state, and there may be bugs in the checkpointing code.\r\n* The scheduler in `StreamExecution.scala` now calls `commit` on its stream sources after marking each batch as complete in its checkpoint.\r\n* `MemoryStream` now cleans committed batches out of its internal buffer.\r\n* `TextSocketSource` now cleans committed batches from its internal buffer.\r\n\r\n## How was this patch tested?\r\nExisting regression tests already exercise the new code."},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/250263650","html_url":"https://github.com/apache/spark/pull/14553#issuecomment-250263650","issue_url":"https://api.github.com/repos/apache/spark/issues/14553","id":250263650,"user":{"login":"SparkQA","id":8108735,"avatar_url":"https://avatars.githubusercontent.com/u/8108735?v=3","gravatar_id":"","url":"https://api.github.com/users/SparkQA","html_url":"https://github.com/SparkQA","followers_url":"https://api.github.com/users/SparkQA/followers","following_url":"https://api.github.com/users/SparkQA/following{/other_user}","gists_url":"https://api.github.com/users/SparkQA/gists{/gist_id}","starred_url":"https://api.github.com/users/SparkQA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SparkQA/subscriptions","organizations_url":"https://api.github.com/users/SparkQA/orgs","repos_url":"https://api.github.com/users/SparkQA/repos","events_url":"https://api.github.com/users/SparkQA/events{/privacy}","received_events_url":"https://api.github.com/users/SparkQA/received_events","type":"User","site_admin":false},"created_at":"2016-09-28T18:52:35Z","updated_at":"2016-09-28T18:52:35Z","body":"**[Test build #66046 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/66046/consoleFull)** for PR 14553 at commit [`128f7fe`](https://github.com/apache/spark/commit/128f7fe8f792453200ee239170882fb494c80be3)."}}
{"actor":{"display_login":"SparkQA"}}