{"action":"created","comment":{"url":"https://api.github.com/repos/stripe/brushfire/pulls/comments/25835627","id":25835627,"diff_hunk":"@@ -0,0 +1,83 @@\n+package com.stripe.brushfire\n+package spark\n+\n+import com.twitter.algebird.{ AveragedValue, MapMonoid, Monoid }\n+\n+import org.apache.spark.rdd.RDD\n+import org.apache.spark.{ SparkContext, SparkConf }\n+\n+class TrainCSV(\n+    val argv: List[String])(\n+        val cols: String*)(implicit val stopper: Stopper[Map[String, Long]] = FrequencyStopper[String](10, 3)) extends Defaults with Serializable {\n+  import JsonInjections._\n+\n+  implicit val targetMonoid: Monoid[Map[String, Long]] = new MapMonoid[String, Long] {\n+    override def sumOption(items: TraversableOnce[Map[String, Long]]): Option[Map[String, Long]] =\n+      super.sumOption(items).map(m => Map.empty[String, Long] ++ m)","path":"brushfire-spark/src/main/scala/com/stripe/brushfire/spark/Example.scala","position":16,"original_position":16,"commit_id":"33585c7f0de7a8b136c711cde9fbd3c4ab4498e4","original_commit_id":"33585c7f0de7a8b136c711cde9fbd3c4ab4498e4","user":{"login":"tixxit","id":120314,"avatar_url":"https://avatars.githubusercontent.com/u/120314?v=3","gravatar_id":"","url":"https://api.github.com/users/tixxit","html_url":"https://github.com/tixxit","followers_url":"https://api.github.com/users/tixxit/followers","following_url":"https://api.github.com/users/tixxit/following{/other_user}","gists_url":"https://api.github.com/users/tixxit/gists{/gist_id}","starred_url":"https://api.github.com/users/tixxit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tixxit/subscriptions","organizations_url":"https://api.github.com/users/tixxit/orgs","repos_url":"https://api.github.com/users/tixxit/repos","events_url":"https://api.github.com/users/tixxit/events{/privacy}","received_events_url":"https://api.github.com/users/tixxit/received_events","type":"User","site_admin":false},"body":"We have to do this because Algebrid's `MutableBackedMap` isn't `Serializable`!","created_at":"2015-03-05T02:38:55Z","updated_at":"2015-03-05T02:38:55Z","html_url":"https://github.com/stripe/brushfire/pull/38#discussion_r25835627","pull_request_url":"https://api.github.com/repos/stripe/brushfire/pulls/38","_links":{"self":{"href":"https://api.github.com/repos/stripe/brushfire/pulls/comments/25835627"},"html":{"href":"https://github.com/stripe/brushfire/pull/38#discussion_r25835627"},"pull_request":{"href":"https://api.github.com/repos/stripe/brushfire/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/stripe/brushfire/pulls/38","id":30525364,"html_url":"https://github.com/stripe/brushfire/pull/38","diff_url":"https://github.com/stripe/brushfire/pull/38.diff","patch_url":"https://github.com/stripe/brushfire/pull/38.patch","issue_url":"https://api.github.com/repos/stripe/brushfire/issues/38","number":38,"state":"open","locked":false,"title":"Initial Spark Support (Port of Scalding)","user":{"login":"tixxit","id":120314,"avatar_url":"https://avatars.githubusercontent.com/u/120314?v=3","gravatar_id":"","url":"https://api.github.com/users/tixxit","html_url":"https://github.com/tixxit","followers_url":"https://api.github.com/users/tixxit/followers","following_url":"https://api.github.com/users/tixxit/following{/other_user}","gists_url":"https://api.github.com/users/tixxit/gists{/gist_id}","starred_url":"https://api.github.com/users/tixxit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tixxit/subscriptions","organizations_url":"https://api.github.com/users/tixxit/orgs","repos_url":"https://api.github.com/users/tixxit/repos","events_url":"https://api.github.com/users/tixxit/events{/privacy}","received_events_url":"https://api.github.com/users/tixxit/received_events","type":"User","site_admin":false},"body":"This isn't merge ready yet, but since I know a few other people are interested (eg @non), I figured I'd make the PR now so I can get some more eyes on it.\r\n\r\nA few thing worth mentioning:\r\n\r\n  * Spark doesn't really have support for something like `Execution`, so we just use its strict `Unit`-happy API everywhere.\r\n  * We only write to files when explicitly asked and use `.cache()` for memoizing the trees in-between steps.\r\n  * Basically just implements `expandTimes` and `expandInMemory`, but not `prune` or `validate` (not hard, just haven't done it).","created_at":"2015-03-05T02:34:49Z","updated_at":"2015-03-05T02:38:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"301ffcc391bf4213762efbbe07b7208ad36925dd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/stripe/brushfire/pulls/38/commits","review_comments_url":"https://api.github.com/repos/stripe/brushfire/pulls/38/comments","review_comment_url":"https://api.github.com/repos/stripe/brushfire/pulls/comments{/number}","comments_url":"https://api.github.com/repos/stripe/brushfire/issues/38/comments","statuses_url":"https://api.github.com/repos/stripe/brushfire/statuses/33585c7f0de7a8b136c711cde9fbd3c4ab4498e4","head":{"label":"tixxit:topic/initial-spark-support","ref":"topic/initial-spark-support","sha":"33585c7f0de7a8b136c711cde9fbd3c4ab4498e4","user":{"login":"tixxit","id":120314,"avatar_url":"https://avatars.githubusercontent.com/u/120314?v=3","gravatar_id":"","url":"https://api.github.com/users/tixxit","html_url":"https://github.com/tixxit","followers_url":"https://api.github.com/users/tixxit/followers","following_url":"https://api.github.com/users/tixxit/following{/other_user}","gists_url":"https://api.github.com/users/tixxit/gists{/gist_id}","starred_url":"https://api.github.com/users/tixxit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tixxit/subscriptions","organizations_url":"https://api.github.com/users/tixxit/orgs","repos_url":"https://api.github.com/users/tixxit/repos","events_url":"https://api.github.com/users/tixxit/events{/privacy}","received_events_url":"https://api.github.com/users/tixxit/received_events","type":"User","site_admin":false},"repo":{"id":31567150,"name":"brushfire","full_name":"tixxit/brushfire","owner":{"login":"tixxit","id":120314,"avatar_url":"https://avatars.githubusercontent.com/u/120314?v=3","gravatar_id":"","url":"https://api.github.com/users/tixxit","html_url":"https://github.com/tixxit","followers_url":"https://api.github.com/users/tixxit/followers","following_url":"https://api.github.com/users/tixxit/following{/other_user}","gists_url":"https://api.github.com/users/tixxit/gists{/gist_id}","starred_url":"https://api.github.com/users/tixxit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tixxit/subscriptions","organizations_url":"https://api.github.com/users/tixxit/orgs","repos_url":"https://api.github.com/users/tixxit/repos","events_url":"https://api.github.com/users/tixxit/events{/privacy}","received_events_url":"https://api.github.com/users/tixxit/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tixxit/brushfire","description":"Distributed decision tree ensemble learning in Scala","fork":true,"url":"https://api.github.com/repos/tixxit/brushfire","forks_url":"https://api.github.com/repos/tixxit/brushfire/forks","keys_url":"https://api.github.com/repos/tixxit/brushfire/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tixxit/brushfire/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tixxit/brushfire/teams","hooks_url":"https://api.github.com/repos/tixxit/brushfire/hooks","issue_events_url":"https://api.github.com/repos/tixxit/brushfire/issues/events{/number}","events_url":"https://api.github.com/repos/tixxit/brushfire/events","assignees_url":"https://api.github.com/repos/tixxit/brushfire/assignees{/user}","branches_url":"https://api.github.com/repos/tixxit/brushfire/branches{/branch}","tags_url":"https://api.github.com/repos/tixxit/brushfire/tags","blobs_url":"https://api.github.com/repos/tixxit/brushfire/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tixxit/brushfire/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tixxit/brushfire/git/refs{/sha}","trees_url":"https://api.github.com/repos/tixxit/brushfire/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tixxit/brushfire/statuses/{sha}","languages_url":"https://api.github.com/repos/tixxit/brushfire/languages","stargazers_url":"https://api.github.com/repos/tixxit/brushfire/stargazers","contributors_url":"https://api.github.com/repos/tixxit/brushfire/contributors","subscribers_url":"https://api.github.com/repos/tixxit/brushfire/subscribers","subscription_url":"https://api.github.com/repos/tixxit/brushfire/subscription","commits_url":"https://api.github.com/repos/tixxit/brushfire/commits{/sha}","git_commits_url":"https://api.github.com/repos/tixxit/brushfire/git/commits{/sha}","comments_url":"https://api.github.com/repos/tixxit/brushfire/comments{/number}","issue_comment_url":"https://api.github.com/repos/tixxit/brushfire/issues/comments{/number}","contents_url":"https://api.github.com/repos/tixxit/brushfire/contents/{+path}","compare_url":"https://api.github.com/repos/tixxit/brushfire/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tixxit/brushfire/merges","archive_url":"https://api.github.com/repos/tixxit/brushfire/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tixxit/brushfire/downloads","issues_url":"https://api.github.com/repos/tixxit/brushfire/issues{/number}","pulls_url":"https://api.github.com/repos/tixxit/brushfire/pulls{/number}","milestones_url":"https://api.github.com/repos/tixxit/brushfire/milestones{/number}","notifications_url":"https://api.github.com/repos/tixxit/brushfire/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tixxit/brushfire/labels{/name}","releases_url":"https://api.github.com/repos/tixxit/brushfire/releases{/id}","created_at":"2015-03-02T22:36:37Z","updated_at":"2015-03-02T22:36:38Z","pushed_at":"2015-03-05T02:30:46Z","git_url":"git://github.com/tixxit/brushfire.git","ssh_url":"git@github.com:tixxit/brushfire.git","clone_url":"https://github.com/tixxit/brushfire.git","svn_url":"https://github.com/tixxit/brushfire","homepage":null,"size":2227,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"stripe:master","ref":"master","sha":"7a0dea9808f3f876cfa4dce7f8d45282522cc21d","user":{"login":"stripe","id":856813,"avatar_url":"https://avatars.githubusercontent.com/u/856813?v=3","gravatar_id":"","url":"https://api.github.com/users/stripe","html_url":"https://github.com/stripe","followers_url":"https://api.github.com/users/stripe/followers","following_url":"https://api.github.com/users/stripe/following{/other_user}","gists_url":"https://api.github.com/users/stripe/gists{/gist_id}","starred_url":"https://api.github.com/users/stripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stripe/subscriptions","organizations_url":"https://api.github.com/users/stripe/orgs","repos_url":"https://api.github.com/users/stripe/repos","events_url":"https://api.github.com/users/stripe/events{/privacy}","received_events_url":"https://api.github.com/users/stripe/received_events","type":"Organization","site_admin":false},"repo":{"id":26926567,"name":"brushfire","full_name":"stripe/brushfire","owner":{"login":"stripe","id":856813,"avatar_url":"https://avatars.githubusercontent.com/u/856813?v=3","gravatar_id":"","url":"https://api.github.com/users/stripe","html_url":"https://github.com/stripe","followers_url":"https://api.github.com/users/stripe/followers","following_url":"https://api.github.com/users/stripe/following{/other_user}","gists_url":"https://api.github.com/users/stripe/gists{/gist_id}","starred_url":"https://api.github.com/users/stripe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stripe/subscriptions","organizations_url":"https://api.github.com/users/stripe/orgs","repos_url":"https://api.github.com/users/stripe/repos","events_url":"https://api.github.com/users/stripe/events{/privacy}","received_events_url":"https://api.github.com/users/stripe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/stripe/brushfire","description":"Distributed decision tree ensemble learning in Scala","fork":false,"url":"https://api.github.com/repos/stripe/brushfire","forks_url":"https://api.github.com/repos/stripe/brushfire/forks","keys_url":"https://api.github.com/repos/stripe/brushfire/keys{/key_id}","collaborators_url":"https://api.github.com/repos/stripe/brushfire/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/stripe/brushfire/teams","hooks_url":"https://api.github.com/repos/stripe/brushfire/hooks","issue_events_url":"https://api.github.com/repos/stripe/brushfire/issues/events{/number}","events_url":"https://api.github.com/repos/stripe/brushfire/events","assignees_url":"https://api.github.com/repos/stripe/brushfire/assignees{/user}","branches_url":"https://api.github.com/repos/stripe/brushfire/branches{/branch}","tags_url":"https://api.github.com/repos/stripe/brushfire/tags","blobs_url":"https://api.github.com/repos/stripe/brushfire/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/stripe/brushfire/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/stripe/brushfire/git/refs{/sha}","trees_url":"https://api.github.com/repos/stripe/brushfire/git/trees{/sha}","statuses_url":"https://api.github.com/repos/stripe/brushfire/statuses/{sha}","languages_url":"https://api.github.com/repos/stripe/brushfire/languages","stargazers_url":"https://api.github.com/repos/stripe/brushfire/stargazers","contributors_url":"https://api.github.com/repos/stripe/brushfire/contributors","subscribers_url":"https://api.github.com/repos/stripe/brushfire/subscribers","subscription_url":"https://api.github.com/repos/stripe/brushfire/subscription","commits_url":"https://api.github.com/repos/stripe/brushfire/commits{/sha}","git_commits_url":"https://api.github.com/repos/stripe/brushfire/git/commits{/sha}","comments_url":"https://api.github.com/repos/stripe/brushfire/comments{/number}","issue_comment_url":"https://api.github.com/repos/stripe/brushfire/issues/comments{/number}","contents_url":"https://api.github.com/repos/stripe/brushfire/contents/{+path}","compare_url":"https://api.github.com/repos/stripe/brushfire/compare/{base}...{head}","merges_url":"https://api.github.com/repos/stripe/brushfire/merges","archive_url":"https://api.github.com/repos/stripe/brushfire/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/stripe/brushfire/downloads","issues_url":"https://api.github.com/repos/stripe/brushfire/issues{/number}","pulls_url":"https://api.github.com/repos/stripe/brushfire/pulls{/number}","milestones_url":"https://api.github.com/repos/stripe/brushfire/milestones{/number}","notifications_url":"https://api.github.com/repos/stripe/brushfire/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/stripe/brushfire/labels{/name}","releases_url":"https://api.github.com/repos/stripe/brushfire/releases{/id}","created_at":"2014-11-20T18:47:07Z","updated_at":"2015-03-02T20:41:52Z","pushed_at":"2015-03-02T20:41:52Z","git_url":"git://github.com/stripe/brushfire.git","ssh_url":"git@github.com:stripe/brushfire.git","clone_url":"https://github.com/stripe/brushfire.git","svn_url":"https://github.com/stripe/brushfire","homepage":null,"size":2227,"stargazers_count":134,"watchers_count":134,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":17,"mirror_url":null,"open_issues_count":15,"forks":17,"open_issues":15,"watchers":134,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/stripe/brushfire/pulls/38"},"html":{"href":"https://github.com/stripe/brushfire/pull/38"},"issue":{"href":"https://api.github.com/repos/stripe/brushfire/issues/38"},"comments":{"href":"https://api.github.com/repos/stripe/brushfire/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/stripe/brushfire/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/stripe/brushfire/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/stripe/brushfire/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/stripe/brushfire/statuses/33585c7f0de7a8b136c711cde9fbd3c4ab4498e4"}}}}