{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/34973017","id":34973017,"diff_hunk":"@@ -906,12 +908,16 @@ abstract class DStream[T: ClassTag] (\n   /**\n    * Save each RDD in this DStream as at text file, using string representation\n    * of elements. The file name at each batch interval is generated based on\n-   * `prefix` and `suffix`: \"prefix-TIME_IN_MS.suffix\".\n+   * `prefix` and `suffix`: \"prefix-TIME_IN_MS.suffix\". If the `CompressionCodec`\n+   * is defined, it will use specific `CompressionCodec` to compress the text.\n    */\n-  def saveAsTextFiles(prefix: String, suffix: String = \"\"): Unit = ssc.withScope {","path":"streaming/src/main/scala/org/apache/spark/streaming/dstream/DStream.scala","position":17,"original_position":17,"commit_id":"5bbf66c0abd4a26500b1e591d606f1e438935eb7","original_commit_id":"5bbf66c0abd4a26500b1e591d606f1e438935eb7","user":{"login":"SaintBacchus","id":7404824,"avatar_url":"https://avatars.githubusercontent.com/u/7404824?v=3","gravatar_id":"","url":"https://api.github.com/users/SaintBacchus","html_url":"https://github.com/SaintBacchus","followers_url":"https://api.github.com/users/SaintBacchus/followers","following_url":"https://api.github.com/users/SaintBacchus/following{/other_user}","gists_url":"https://api.github.com/users/SaintBacchus/gists{/gist_id}","starred_url":"https://api.github.com/users/SaintBacchus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaintBacchus/subscriptions","organizations_url":"https://api.github.com/users/SaintBacchus/orgs","repos_url":"https://api.github.com/users/SaintBacchus/repos","events_url":"https://api.github.com/users/SaintBacchus/events{/privacy}","received_events_url":"https://api.github.com/users/SaintBacchus/received_events","type":"User","site_admin":false},"body":"Do you mean it's no need to change this API and leave this to user by themselves?","created_at":"2015-07-20T07:42:10Z","updated_at":"2015-07-20T07:42:10Z","html_url":"https://github.com/apache/spark/pull/7442#discussion_r34973017","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/7442","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/34973017"},"html":{"href":"https://github.com/apache/spark/pull/7442#discussion_r34973017"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/7442"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/7442","id":40121925,"html_url":"https://github.com/apache/spark/pull/7442","diff_url":"https://github.com/apache/spark/pull/7442.diff","patch_url":"https://github.com/apache/spark/pull/7442.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/7442","number":7442,"state":"open","locked":false,"title":"[SPARK-9091][STREAMING]Add the CompressionCodec to the saveAsTextFiles interface in DStream.","user":{"login":"SaintBacchus","id":7404824,"avatar_url":"https://avatars.githubusercontent.com/u/7404824?v=3","gravatar_id":"","url":"https://api.github.com/users/SaintBacchus","html_url":"https://github.com/SaintBacchus","followers_url":"https://api.github.com/users/SaintBacchus/followers","following_url":"https://api.github.com/users/SaintBacchus/following{/other_user}","gists_url":"https://api.github.com/users/SaintBacchus/gists{/gist_id}","starred_url":"https://api.github.com/users/SaintBacchus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaintBacchus/subscriptions","organizations_url":"https://api.github.com/users/SaintBacchus/orgs","repos_url":"https://api.github.com/users/SaintBacchus/repos","events_url":"https://api.github.com/users/SaintBacchus/events{/privacy}","received_events_url":"https://api.github.com/users/SaintBacchus/received_events","type":"User","site_admin":false},"body":"Add the `CompressionCodec` to the `saveAsTextFiles` interface. \r\nTo be compatible with old interface, use the `Option` to adapt the code.\r\n\r\n[Jira Address](https://issues.apache.org/jira/browse/SPARK-9091)","created_at":"2015-07-16T12:06:03Z","updated_at":"2015-07-20T07:42:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d7e95b6e51330657ab75d80cd848c662e167ea42","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/7442/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/7442/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/7442/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/5bbf66c0abd4a26500b1e591d606f1e438935eb7","head":{"label":"SaintBacchus:SPARK-9091","ref":"SPARK-9091","sha":"5bbf66c0abd4a26500b1e591d606f1e438935eb7","user":{"login":"SaintBacchus","id":7404824,"avatar_url":"https://avatars.githubusercontent.com/u/7404824?v=3","gravatar_id":"","url":"https://api.github.com/users/SaintBacchus","html_url":"https://github.com/SaintBacchus","followers_url":"https://api.github.com/users/SaintBacchus/followers","following_url":"https://api.github.com/users/SaintBacchus/following{/other_user}","gists_url":"https://api.github.com/users/SaintBacchus/gists{/gist_id}","starred_url":"https://api.github.com/users/SaintBacchus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaintBacchus/subscriptions","organizations_url":"https://api.github.com/users/SaintBacchus/orgs","repos_url":"https://api.github.com/users/SaintBacchus/repos","events_url":"https://api.github.com/users/SaintBacchus/events{/privacy}","received_events_url":"https://api.github.com/users/SaintBacchus/received_events","type":"User","site_admin":false},"repo":{"id":23314424,"name":"spark","full_name":"SaintBacchus/spark","owner":{"login":"SaintBacchus","id":7404824,"avatar_url":"https://avatars.githubusercontent.com/u/7404824?v=3","gravatar_id":"","url":"https://api.github.com/users/SaintBacchus","html_url":"https://github.com/SaintBacchus","followers_url":"https://api.github.com/users/SaintBacchus/followers","following_url":"https://api.github.com/users/SaintBacchus/following{/other_user}","gists_url":"https://api.github.com/users/SaintBacchus/gists{/gist_id}","starred_url":"https://api.github.com/users/SaintBacchus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SaintBacchus/subscriptions","organizations_url":"https://api.github.com/users/SaintBacchus/orgs","repos_url":"https://api.github.com/users/SaintBacchus/repos","events_url":"https://api.github.com/users/SaintBacchus/events{/privacy}","received_events_url":"https://api.github.com/users/SaintBacchus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SaintBacchus/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/SaintBacchus/spark","forks_url":"https://api.github.com/repos/SaintBacchus/spark/forks","keys_url":"https://api.github.com/repos/SaintBacchus/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SaintBacchus/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SaintBacchus/spark/teams","hooks_url":"https://api.github.com/repos/SaintBacchus/spark/hooks","issue_events_url":"https://api.github.com/repos/SaintBacchus/spark/issues/events{/number}","events_url":"https://api.github.com/repos/SaintBacchus/spark/events","assignees_url":"https://api.github.com/repos/SaintBacchus/spark/assignees{/user}","branches_url":"https://api.github.com/repos/SaintBacchus/spark/branches{/branch}","tags_url":"https://api.github.com/repos/SaintBacchus/spark/tags","blobs_url":"https://api.github.com/repos/SaintBacchus/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SaintBacchus/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SaintBacchus/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/SaintBacchus/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SaintBacchus/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/SaintBacchus/spark/languages","stargazers_url":"https://api.github.com/repos/SaintBacchus/spark/stargazers","contributors_url":"https://api.github.com/repos/SaintBacchus/spark/contributors","subscribers_url":"https://api.github.com/repos/SaintBacchus/spark/subscribers","subscription_url":"https://api.github.com/repos/SaintBacchus/spark/subscription","commits_url":"https://api.github.com/repos/SaintBacchus/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/SaintBacchus/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/SaintBacchus/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/SaintBacchus/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/SaintBacchus/spark/contents/{+path}","compare_url":"https://api.github.com/repos/SaintBacchus/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SaintBacchus/spark/merges","archive_url":"https://api.github.com/repos/SaintBacchus/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SaintBacchus/spark/downloads","issues_url":"https://api.github.com/repos/SaintBacchus/spark/issues{/number}","pulls_url":"https://api.github.com/repos/SaintBacchus/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/SaintBacchus/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/SaintBacchus/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SaintBacchus/spark/labels{/name}","releases_url":"https://api.github.com/repos/SaintBacchus/spark/releases{/id}","created_at":"2014-08-25T13:22:42Z","updated_at":"2015-05-05T08:45:42Z","pushed_at":"2015-07-20T06:44:10Z","git_url":"git://github.com/SaintBacchus/spark.git","ssh_url":"git@github.com:SaintBacchus/spark.git","clone_url":"https://github.com/SaintBacchus/spark.git","svn_url":"https://github.com/SaintBacchus/spark","homepage":null,"size":107519,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"011551620faa87107a787530f074af3d9be7e695","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":17165658,"name":"spark","full_name":"apache/spark","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/spark","description":"Mirror of Apache Spark","fork":false,"url":"https://api.github.com/repos/apache/spark","forks_url":"https://api.github.com/repos/apache/spark/forks","keys_url":"https://api.github.com/repos/apache/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/spark/teams","hooks_url":"https://api.github.com/repos/apache/spark/hooks","issue_events_url":"https://api.github.com/repos/apache/spark/issues/events{/number}","events_url":"https://api.github.com/repos/apache/spark/events","assignees_url":"https://api.github.com/repos/apache/spark/assignees{/user}","branches_url":"https://api.github.com/repos/apache/spark/branches{/branch}","tags_url":"https://api.github.com/repos/apache/spark/tags","blobs_url":"https://api.github.com/repos/apache/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/spark/languages","stargazers_url":"https://api.github.com/repos/apache/spark/stargazers","contributors_url":"https://api.github.com/repos/apache/spark/contributors","subscribers_url":"https://api.github.com/repos/apache/spark/subscribers","subscription_url":"https://api.github.com/repos/apache/spark/subscription","commits_url":"https://api.github.com/repos/apache/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/spark/contents/{+path}","compare_url":"https://api.github.com/repos/apache/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/spark/merges","archive_url":"https://api.github.com/repos/apache/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/spark/downloads","issues_url":"https://api.github.com/repos/apache/spark/issues{/number}","pulls_url":"https://api.github.com/repos/apache/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/spark/labels{/name}","releases_url":"https://api.github.com/repos/apache/spark/releases{/id}","created_at":"2014-02-25T08:00:08Z","updated_at":"2015-07-20T06:44:43Z","pushed_at":"2015-07-20T07:31:48Z","git_url":"git://github.com/apache/spark.git","ssh_url":"git@github.com:apache/spark.git","clone_url":"https://github.com/apache/spark.git","svn_url":"https://github.com/apache/spark","homepage":null,"size":1560849,"stargazers_count":4797,"watchers_count":4797,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4294,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":341,"forks":4294,"open_issues":341,"watchers":4797,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/7442"},"html":{"href":"https://github.com/apache/spark/pull/7442"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/7442"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/7442/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/7442/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/7442/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/5bbf66c0abd4a26500b1e591d606f1e438935eb7"}}}}