{"action":"created","issue":{"url":"https://api.github.com/repos/apache/spark/issues/12612","repository_url":"https://api.github.com/repos/apache/spark","labels_url":"https://api.github.com/repos/apache/spark/issues/12612/labels{/name}","comments_url":"https://api.github.com/repos/apache/spark/issues/12612/comments","events_url":"https://api.github.com/repos/apache/spark/issues/12612/events","html_url":"https://github.com/apache/spark/pull/12612","id":150391874,"number":12612,"title":"[SPARK-14654][CORE][WIP] New accumulator API","user":{"login":"cloud-fan","id":3182036,"avatar_url":"https://avatars.githubusercontent.com/u/3182036?v=3","gravatar_id":"","url":"https://api.github.com/users/cloud-fan","html_url":"https://github.com/cloud-fan","followers_url":"https://api.github.com/users/cloud-fan/followers","following_url":"https://api.github.com/users/cloud-fan/following{/other_user}","gists_url":"https://api.github.com/users/cloud-fan/gists{/gist_id}","starred_url":"https://api.github.com/users/cloud-fan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloud-fan/subscriptions","organizations_url":"https://api.github.com/users/cloud-fan/orgs","repos_url":"https://api.github.com/users/cloud-fan/repos","events_url":"https://api.github.com/users/cloud-fan/events{/privacy}","received_events_url":"https://api.github.com/users/cloud-fan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-04-22T14:55:27Z","updated_at":"2016-04-24T21:13:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/12612","html_url":"https://github.com/apache/spark/pull/12612","diff_url":"https://github.com/apache/spark/pull/12612.diff","patch_url":"https://github.com/apache/spark/pull/12612.patch"},"body":"## What changes were proposed in this pull request?\r\n\r\nThis PR introduces a new accumulator API  which is much simpler than before:\r\n\r\n1. the type hierarchy is simplified, now we only have an `Accumulator` class\r\n2. there is no `initialValue`, but an `initialize` method, which is more flex.\r\n3. there in only one `register` method, the accumulator registration and cleanup registration are combined.\r\n4. the `id`,`name` and `countFailedValues` are combined into an `AccumulatorMetadata`, and is provided during registration.\r\n\r\nWhat we break:\r\n\r\n1. no `setValue` anymore. In the new API, the intermedia type can be different from the result type, it's very hard to implmenet a general `setValue`\r\n2. accumulator can't be serialized before registerred.\r\n\r\n## How was this patch tested?\r\n\r\nexisting tests"},"comment":{"url":"https://api.github.com/repos/apache/spark/issues/comments/214038271","html_url":"https://github.com/apache/spark/pull/12612#issuecomment-214038271","issue_url":"https://api.github.com/repos/apache/spark/issues/12612","id":214038271,"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-04-24T21:13:56Z","updated_at":"2016-04-24T21:13:56Z","body":"**[Test build #56863 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/56863/consoleFull)** for PR 12612 at commit [`22d4cc6`](https://github.com/apache/spark/commit/22d4cc68bfc66c6ae41e9102da96e73b9c5f652b).\n * This patch **fails Scala style tests**.\n * This patch merges cleanly.\n * This patch adds no public classes."}}