{"action":"created","comment":{"url":"https://api.github.com/repos/apache/spark/pulls/comments/38249715","id":38249715,"diff_hunk":"@@ -1056,6 +988,70 @@ object DecisionTree extends Serializable with Logging {\n     }\n   }\n \n+  private def findSplitsBinsBySorting(\n+      input: RDD[LabeledPoint],\n+      metadata: DecisionTreeMetadata,\n+      continuousFeatures: IndexedSeq[Int]): (Array[Array[Split]], Array[Array[Bin]]) = {\n+    def findSplits(\n+        featureIndex: Int,\n+        featureSamples: Iterable[Double]): (Int, (Array[Split], Array[Bin])) = {\n+      val splits = {\n+        val featureSplits = findSplitsForContinuousFeature(\n+          featureSamples.toArray,\n+          metadata,\n+          featureIndex)\n+        logDebug(s\"featureIndex = $featureIndex, numSplits = ${featureSplits.length}\")\n+\n+        featureSplits.map(threshold => new Split(featureIndex, threshold, Continuous, Nil))\n+      }\n+\n+      val bins = {\n+        val lowSplit = new DummyLowSplit(featureIndex, Continuous)\n+        val highSplit = new DummyHighSplit(featureIndex, Continuous)\n+        (lowSplit +: splits.toSeq :+ highSplit).sliding(2).map {","path":"mllib/src/main/scala/org/apache/spark/mllib/tree/DecisionTree.scala","position":139,"original_position":139,"commit_id":"93c9e71f6c62b122647c4bdd2f9dead710ae360f","original_commit_id":"93c9e71f6c62b122647c4bdd2f9dead710ae360f","user":{"login":"manishamde","id":1067223,"avatar_url":"https://avatars.githubusercontent.com/u/1067223?v=3","gravatar_id":"","url":"https://api.github.com/users/manishamde","html_url":"https://github.com/manishamde","followers_url":"https://api.github.com/users/manishamde/followers","following_url":"https://api.github.com/users/manishamde/following{/other_user}","gists_url":"https://api.github.com/users/manishamde/gists{/gist_id}","starred_url":"https://api.github.com/users/manishamde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manishamde/subscriptions","organizations_url":"https://api.github.com/users/manishamde/orgs","repos_url":"https://api.github.com/users/manishamde/repos","events_url":"https://api.github.com/users/manishamde/events{/privacy}","received_events_url":"https://api.github.com/users/manishamde/received_events","type":"User","site_admin":false},"body":"A comment here will be helpful.","created_at":"2015-08-28T22:14:04Z","updated_at":"2015-08-28T22:14:04Z","html_url":"https://github.com/apache/spark/pull/8246#discussion_r38249715","pull_request_url":"https://api.github.com/repos/apache/spark/pulls/8246","_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/comments/38249715"},"html":{"href":"https://github.com/apache/spark/pull/8246#discussion_r38249715"},"pull_request":{"href":"https://api.github.com/repos/apache/spark/pulls/8246"}}},"pull_request":{"url":"https://api.github.com/repos/apache/spark/pulls/8246","id":42621777,"html_url":"https://github.com/apache/spark/pull/8246","diff_url":"https://github.com/apache/spark/pull/8246.diff","patch_url":"https://github.com/apache/spark/pull/8246.patch","issue_url":"https://api.github.com/repos/apache/spark/issues/8246","number":8246,"state":"open","locked":false,"title":"[SPARK-10064] [ML] Parallelize decision tree bin split calculations","user":{"login":"NathanHowell","id":170829,"avatar_url":"https://avatars.githubusercontent.com/u/170829?v=3","gravatar_id":"","url":"https://api.github.com/users/NathanHowell","html_url":"https://github.com/NathanHowell","followers_url":"https://api.github.com/users/NathanHowell/followers","following_url":"https://api.github.com/users/NathanHowell/following{/other_user}","gists_url":"https://api.github.com/users/NathanHowell/gists{/gist_id}","starred_url":"https://api.github.com/users/NathanHowell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NathanHowell/subscriptions","organizations_url":"https://api.github.com/users/NathanHowell/orgs","repos_url":"https://api.github.com/users/NathanHowell/repos","events_url":"https://api.github.com/users/NathanHowell/events{/privacy}","received_events_url":"https://api.github.com/users/NathanHowell/received_events","type":"User","site_admin":false},"body":"Reimplement `DecisionTree.findSplitsBins` via `RDD` to parallelize bin calculation.\r\n\r\nWith large feature spaces the current implementation is very slow. This change limits the features that are distributed (or collected) to just the continuous features, and performs the split calculations in parallel. It completes on a real multi terabyte dataset in less than a minute instead of multiple hours.","created_at":"2015-08-17T18:59:24Z","updated_at":"2015-08-28T22:14:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"82f5ca2dbac67618bc6ed3446965f9cf256dce66","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/spark/pulls/8246/commits","review_comments_url":"https://api.github.com/repos/apache/spark/pulls/8246/comments","review_comment_url":"https://api.github.com/repos/apache/spark/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/spark/issues/8246/comments","statuses_url":"https://api.github.com/repos/apache/spark/statuses/93c9e71f6c62b122647c4bdd2f9dead710ae360f","head":{"label":"NathanHowell:SPARK-10064","ref":"SPARK-10064","sha":"93c9e71f6c62b122647c4bdd2f9dead710ae360f","user":{"login":"NathanHowell","id":170829,"avatar_url":"https://avatars.githubusercontent.com/u/170829?v=3","gravatar_id":"","url":"https://api.github.com/users/NathanHowell","html_url":"https://github.com/NathanHowell","followers_url":"https://api.github.com/users/NathanHowell/followers","following_url":"https://api.github.com/users/NathanHowell/following{/other_user}","gists_url":"https://api.github.com/users/NathanHowell/gists{/gist_id}","starred_url":"https://api.github.com/users/NathanHowell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NathanHowell/subscriptions","organizations_url":"https://api.github.com/users/NathanHowell/orgs","repos_url":"https://api.github.com/users/NathanHowell/repos","events_url":"https://api.github.com/users/NathanHowell/events{/privacy}","received_events_url":"https://api.github.com/users/NathanHowell/received_events","type":"User","site_admin":false},"repo":{"id":18179192,"name":"spark","full_name":"NathanHowell/spark","owner":{"login":"NathanHowell","id":170829,"avatar_url":"https://avatars.githubusercontent.com/u/170829?v=3","gravatar_id":"","url":"https://api.github.com/users/NathanHowell","html_url":"https://github.com/NathanHowell","followers_url":"https://api.github.com/users/NathanHowell/followers","following_url":"https://api.github.com/users/NathanHowell/following{/other_user}","gists_url":"https://api.github.com/users/NathanHowell/gists{/gist_id}","starred_url":"https://api.github.com/users/NathanHowell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NathanHowell/subscriptions","organizations_url":"https://api.github.com/users/NathanHowell/orgs","repos_url":"https://api.github.com/users/NathanHowell/repos","events_url":"https://api.github.com/users/NathanHowell/events{/privacy}","received_events_url":"https://api.github.com/users/NathanHowell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NathanHowell/spark","description":"Mirror of Apache Spark","fork":true,"url":"https://api.github.com/repos/NathanHowell/spark","forks_url":"https://api.github.com/repos/NathanHowell/spark/forks","keys_url":"https://api.github.com/repos/NathanHowell/spark/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NathanHowell/spark/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NathanHowell/spark/teams","hooks_url":"https://api.github.com/repos/NathanHowell/spark/hooks","issue_events_url":"https://api.github.com/repos/NathanHowell/spark/issues/events{/number}","events_url":"https://api.github.com/repos/NathanHowell/spark/events","assignees_url":"https://api.github.com/repos/NathanHowell/spark/assignees{/user}","branches_url":"https://api.github.com/repos/NathanHowell/spark/branches{/branch}","tags_url":"https://api.github.com/repos/NathanHowell/spark/tags","blobs_url":"https://api.github.com/repos/NathanHowell/spark/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NathanHowell/spark/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NathanHowell/spark/git/refs{/sha}","trees_url":"https://api.github.com/repos/NathanHowell/spark/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NathanHowell/spark/statuses/{sha}","languages_url":"https://api.github.com/repos/NathanHowell/spark/languages","stargazers_url":"https://api.github.com/repos/NathanHowell/spark/stargazers","contributors_url":"https://api.github.com/repos/NathanHowell/spark/contributors","subscribers_url":"https://api.github.com/repos/NathanHowell/spark/subscribers","subscription_url":"https://api.github.com/repos/NathanHowell/spark/subscription","commits_url":"https://api.github.com/repos/NathanHowell/spark/commits{/sha}","git_commits_url":"https://api.github.com/repos/NathanHowell/spark/git/commits{/sha}","comments_url":"https://api.github.com/repos/NathanHowell/spark/comments{/number}","issue_comment_url":"https://api.github.com/repos/NathanHowell/spark/issues/comments{/number}","contents_url":"https://api.github.com/repos/NathanHowell/spark/contents/{+path}","compare_url":"https://api.github.com/repos/NathanHowell/spark/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NathanHowell/spark/merges","archive_url":"https://api.github.com/repos/NathanHowell/spark/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NathanHowell/spark/downloads","issues_url":"https://api.github.com/repos/NathanHowell/spark/issues{/number}","pulls_url":"https://api.github.com/repos/NathanHowell/spark/pulls{/number}","milestones_url":"https://api.github.com/repos/NathanHowell/spark/milestones{/number}","notifications_url":"https://api.github.com/repos/NathanHowell/spark/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NathanHowell/spark/labels{/name}","releases_url":"https://api.github.com/repos/NathanHowell/spark/releases{/id}","created_at":"2014-03-27T14:43:27Z","updated_at":"2014-03-27T15:13:30Z","pushed_at":"2015-08-17T18:49:02Z","git_url":"git://github.com/NathanHowell/spark.git","ssh_url":"git@github.com:NathanHowell/spark.git","clone_url":"https://github.com/NathanHowell/spark.git","svn_url":"https://github.com/NathanHowell/spark","homepage":null,"size":114598,"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":"f10660fe7b809be2059da4f9781a5743f117a35a","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-08-28T21:59:27Z","pushed_at":"2015-08-28T22:03:20Z","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":1693463,"stargazers_count":5236,"watchers_count":5236,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4803,"mirror_url":"git://git.apache.org/spark.git","open_issues_count":366,"forks":4803,"open_issues":366,"watchers":5236,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/spark/pulls/8246"},"html":{"href":"https://github.com/apache/spark/pull/8246"},"issue":{"href":"https://api.github.com/repos/apache/spark/issues/8246"},"comments":{"href":"https://api.github.com/repos/apache/spark/issues/8246/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/spark/pulls/8246/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/spark/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/spark/pulls/8246/commits"},"statuses":{"href":"https://api.github.com/repos/apache/spark/statuses/93c9e71f6c62b122647c4bdd2f9dead710ae360f"}}}}