{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/89771582","pull_request_review_id":10306171,"id":89771582,"diff_hunk":"@@ -1378,29 +1378,36 @@ res2: Long = 10\n \n While this code used the built-in support for accumulators of type Long, programmers can also\n create their own types by subclassing [AccumulatorV2](api/scala/index.html#org.apache.spark.util.AccumulatorV2).\n-The AccumulatorV2 abstract class has several methods which need to override: \n-`reset` for resetting the accumulator to zero, and `add` for add anothor value into the accumulator, `merge` for merging another same-type accumulator into this one. Other methods need to override can refer to scala API document. For example, supposing we had a `MyVector` class\n-representing mathematical vectors, we could write:\n+The AccumulatorV2 abstract class has several methods which one has to override:\n+`reset` for resetting the accumulator to zero, `add` for adding another value into the accumulator,\n+and `merge` for merging another same-type accumulator into this one. Other methods that must be overridden\n+are contained in the [API documentation](api/scala/index.html#org.apache.spark.util.AccumulatorV2).\n+For example, supposing we had a `MathVector` class representing mathematical vectors, we could write:","path":"docs/programming-guide.md","position":11,"original_position":11,"commit_id":"f4388a84181e7c40003db0b1574602350160721a","original_commit_id":"f4388a84181e7c40003db0b1574602350160721a","user":{"login":"srowen","id":822522,"avatar_url":"https://avatars.githubusercontent.com/u/822522?v=3","gravatar_id":"","url":"https://api.github.com/users/srowen","html_url":"https://github.com/srowen","followers_url":"https://api.github.com/users/srowen/followers","following_url":"https://api.github.com/users/srowen/following{/other_user}","gists_url":"https://api.github.com/users/srowen/gists{/gist_id}","starred_url":"https://api.github.com/users/srowen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srowen/subscriptions","organizations_url":"https://api.github.com/users/srowen/orgs","repos_url":"https://api.github.com/users/srowen/repos","events_url":"https://api.github.com/users/srowen/events{/privacy}","received_events_url":"https://api.github.com/users/srowen/received_events","type":"User","site_admin":false},"body":"Why MyVector -> MathVector? to limit the scope and make it clearer, probably best to not change elements of the example that were OK.","created_at":"2016-11-28T12:29:41Z","updated_at":"2016-11-28T12:32:20Z","html_url":"https://github.com/apache/spark/pull/16024#discussion_r89771582","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/16024","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/89771582"},"html":{"href":"https://github.com/apache/spark/pull/16024#discussion_r89771582"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/16024"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/16024","id":95418434,"html_url":"https://github.com/apache/spark/pull/16024","diff_url":"https://github.com/apache/spark/pull/16024.diff","patch_url":"https://github.com/apache/spark/pull/16024.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/16024","number":16024,"state":"open","locked":false,"title":"[MINOR][DOCS] Updates to the Accumulator example in the programming guide. Fixed typos, AccumulatorV2 in Java","user":{"login":"aokolnychyi","id":6235869,"avatar_url":"https://avatars.githubusercontent.com/u/6235869?v=3","gravatar_id":"","url":"https://api.github.com/users/aokolnychyi","html_url":"https://github.com/aokolnychyi","followers_url":"https://api.github.com/users/aokolnychyi/followers","following_url":"https://api.github.com/users/aokolnychyi/following{/other_user}","gists_url":"https://api.github.com/users/aokolnychyi/gists{/gist_id}","starred_url":"https://api.github.com/users/aokolnychyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aokolnychyi/subscriptions","organizations_url":"https://api.github.com/users/aokolnychyi/orgs","repos_url":"https://api.github.com/users/aokolnychyi/repos","events_url":"https://api.github.com/users/aokolnychyi/events{/privacy}","received_events_url":"https://api.github.com/users/aokolnychyi/received_events","type":"User","site_admin":false},"body":"## What changes were proposed in this pull request?\r\n\r\nThis pull request contains updates to Scala and Java Accumulator code snippets in the programming guide. \r\n\r\n- For Scala, the pull request fixes the signature of the 'add()' method in the custom Accumulator, which contained two params (as the old AccumulatorParam) instead of one (as in AccumulatorV2). \r\n\r\n- The Java example was updated to use the AccumulatorV2 class since AccumulatorParam is marked as deprecated.  \r\n\r\n- Scala and Java examples are more consistent now.\r\n\r\n## How was this patch tested?\r\n\r\nThis patch was tested manually by building the docs locally.\r\n\r\n![image](https://cloud.githubusercontent.com/assets/6235869/20652099/77d98d18-b4f3-11e6-8565-a995fe8cf8e5.png)\r\n\r\n","created_at":"2016-11-27T22:00:17Z","updated_at":"2016-11-28T12:32:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"05239f2f0fa7d3fbb36cd21be4e5d9ad7aa97120","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/16024/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/16024/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/16024/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/f4388a84181e7c40003db0b1574602350160721a","head":{"label":"aokolnychyi:fixed_accumulator_example","ref":"fixed_accumulator_example","sha":"f4388a84181e7c40003db0b1574602350160721a","user":{"login":"aokolnychyi","id":6235869,"avatar_url":"https://avatars.githubusercontent.com/u/6235869?v=3","gravatar_id":"","url":"https://api.github.com/users/aokolnychyi","html_url":"https://github.com/aokolnychyi","followers_url":"https://api.github.com/users/aokolnychyi/followers","following_url":"https://api.github.com/users/aokolnychyi/following{/other_user}","gists_url":"https://api.github.com/users/aokolnychyi/gists{/gist_id}","starred_url":"https://api.github.com/users/aokolnychyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aokolnychyi/subscriptions","organizations_url":"https://api.github.com/users/aokolnychyi/orgs","repos_url":"https://api.github.com/users/aokolnychyi/repos","events_url":"https://api.github.com/users/aokolnychyi/events{/privacy}","received_events_url":"https://api.github.com/users/aokolnychyi/received_events","type":"User","site_admin":false},"repo":{"id":61945043,"name":"spark","full_name":"aokolnychyi/spark","owner":{"login":"aokolnychyi","id":6235869,"avatar_url":"https://avatars.githubusercontent.com/u/6235869?v=3","gravatar_id":"","url":"https://api.github.com/users/aokolnychyi","html_url":"https://github.com/aokolnychyi","followers_url":"https://api.github.com/users/aokolnychyi/followers","following_url":"https://api.github.com/users/aokolnychyi/following{/other_user}","gists_url":"https://api.github.com/users/aokolnychyi/gists{/gist_id}","starred_url":"https://api.github.com/users/aokolnychyi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aokolnychyi/subscriptions","organizations_url":"https://api.github.com/users/aokolnychyi/orgs","repos_url":"https://api.github.com/users/aokolnychyi/repos","events_url":"https://api.github.com/users/aokolnychyi/events{/privacy}","received_events_url":"https://api.github.com/users/aokolnychyi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/aokolnychyi/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/aokolnychyi/spark","forks_url":"https://api.github.com/repos/aokolnychyi/spark/forks","keys_url":"https://api.github.com/repos/aokolnychyi/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aokolnychyi/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aokolnychyi/spark/teams","hooks_url":"https://api.github.com/repos/aokolnychyi/spark/hooks","issue_events_url":"https://api.github.com/repos/aokolnychyi/spark/issues/events{/number}","events_url":"https://api.github.com/repos/aokolnychyi/spark/events","assignees_url":"https://api.github.com/repos/aokolnychyi/spark/assignees{/user}","branches_url":"https://api.github.com/repos/aokolnychyi/spark/branches{/branch}","tags_url":"https://api.github.com/repos/aokolnychyi/spark/tags","blobs_url":"https://api.github.com/repos/aokolnychyi/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aokolnychyi/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aokolnychyi/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/aokolnychyi/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aokolnychyi/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/aokolnychyi/spark/languages","stargazers_url":"https://api.github.com/repos/aokolnychyi/spark/stargazers","contributors_url":"https://api.github.com/repos/aokolnychyi/spark/contributors","subscribers_url":"https://api.github.com/repos/aokolnychyi/spark/subscribers","subscription_url":"https://api.github.com/repos/aokolnychyi/spark/subscription","commits_url":"https://api.github.com/repos/aokolnychyi/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/aokolnychyi/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/aokolnychyi/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/aokolnychyi/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/aokolnychyi/spark/contents/{+path}","compare_url":"https://api.github.com/repos/aokolnychyi/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aokolnychyi/spark/merges","archive_url":"https://api.github.com/repos/aokolnychyi/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aokolnychyi/spark/downloads","issues_url":"https://api.github.com/repos/aokolnychyi/spark/issues{/number}","pulls_url":"https://api.github.com/repos/aokolnychyi/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/aokolnychyi/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/aokolnychyi/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aokolnychyi/spark/labels{/name}","releases_url":"https://api.github.com/repos/aokolnychyi/spark/releases{/id}","deployments_url":"https://api.github.com/repos/aokolnychyi/spark/deployments","created_at":"2016-06-25T13:46:06Z","updated_at":"2016-06-25T13:46:28Z","pushed_at":"2016-11-27T21:31:49Z","git_url":"git://github.com/aokolnychyi/spark.git","ssh_url":"git@github.com:aokolnychyi/spark.git","clone_url":"https://github.com/aokolnychyi/spark.git","svn_url":"https://github.com/aokolnychyi/spark","homepage":null,"size":247618,"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":"9c03c564605783d8e94f6795432bb59c33933e52","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}","deployments_url":"https://api.github.com/repos/apache/spark/deployments","created_at":"2014-02-25T08:00:08Z","updated_at":"2016-11-28T06:44:21Z","pushed_at":"2016-11-28T12:19:21Z","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":615554,"stargazers_count":10876,"watchers_count":10876,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10145,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":458,"forks":10145,"open_issues":458,"watchers":10876,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/16024"},"html":{"href":"https://github.com/apache/spark/pull/16024"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/16024"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/16024/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/16024/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/16024/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/f4388a84181e7c40003db0b1574602350160721a"}}}}
{"actor":{"display_login":"srowen"}}