{"action":"created","comment":{"url":"https://api.github.com/repos/twitter/cassovary/pulls/comments/39910841","id":39910841,"diff_hunk":"@@ -0,0 +1,153 @@\n+package com.twitter.cassovary.graph\n+\n+import java.io.{BufferedOutputStream, DataOutputStream, File, FileOutputStream}\n+\n+import com.twitter.cassovary.graph.StoredGraphDir.StoredGraphDir\n+import com.twitter.cassovary.util.NodeNumberer\n+import com.twitter.cassovary.util.io.{AdjacencyListGraphReader, IntLongSource, MemoryMappedIntLongSource}\n+\n+/**\n+ * A graph which reads edge data from a memory mapped file.  There is no object overhead per node: the memory\n+ * used for n nodes and m edges with both in-neighbor and out-neighbor access is exactly 8 + 16*n + 8*m bytes.\n+ * Also, Loading is very fast because no parsing of text is required.  Loading time is exactly the time it takes the operating system","path":"cassovary-core/src/main/scala/com/twitter/cassovary/graph/MemoryMappedDirectedGraph.scala","position":12,"original_position":12,"commit_id":"ff23aed521aad5affb2ef754f260629e3c55adec","original_commit_id":"ff23aed521aad5affb2ef754f260629e3c55adec","user":{"login":"plofgren","id":6324377,"avatar_url":"https://avatars.githubusercontent.com/u/6324377?v=3","gravatar_id":"","url":"https://api.github.com/users/plofgren","html_url":"https://github.com/plofgren","followers_url":"https://api.github.com/users/plofgren/followers","following_url":"https://api.github.com/users/plofgren/following{/other_user}","gists_url":"https://api.github.com/users/plofgren/gists{/gist_id}","starred_url":"https://api.github.com/users/plofgren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plofgren/subscriptions","organizations_url":"https://api.github.com/users/plofgren/orgs","repos_url":"https://api.github.com/users/plofgren/repos","events_url":"https://api.github.com/users/plofgren/events{/privacy}","received_events_url":"https://api.github.com/users/plofgren/received_events","type":"User","site_admin":false},"body":"Sounds good.","created_at":"2015-09-18T23:30:04Z","updated_at":"2015-09-18T23:30:04Z","html_url":"https://github.com/twitter/cassovary/pull/201#discussion_r39910841","pull_request_url":"https://api.github.com/repos/twitter/cassovary/pulls/201","_links":{"self":{"href":"https://api.github.com/repos/twitter/cassovary/pulls/comments/39910841"},"html":{"href":"https://github.com/twitter/cassovary/pull/201#discussion_r39910841"},"pull_request":{"href":"https://api.github.com/repos/twitter/cassovary/pulls/201"}}},"pull_request":{"url":"https://api.github.com/repos/twitter/cassovary/pulls/201","id":44843515,"html_url":"https://github.com/twitter/cassovary/pull/201","diff_url":"https://github.com/twitter/cassovary/pull/201.diff","patch_url":"https://github.com/twitter/cassovary/pull/201.patch","issue_url":"https://api.github.com/repos/twitter/cassovary/issues/201","number":201,"state":"open","locked":false,"title":"Memory mapped graph","user":{"login":"plofgren","id":6324377,"avatar_url":"https://avatars.githubusercontent.com/u/6324377?v=3","gravatar_id":"","url":"https://api.github.com/users/plofgren","html_url":"https://github.com/plofgren","followers_url":"https://api.github.com/users/plofgren/followers","following_url":"https://api.github.com/users/plofgren/following{/other_user}","gists_url":"https://api.github.com/users/plofgren/gists{/gist_id}","starred_url":"https://api.github.com/users/plofgren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plofgren/subscriptions","organizations_url":"https://api.github.com/users/plofgren/orgs","repos_url":"https://api.github.com/users/plofgren/repos","events_url":"https://api.github.com/users/plofgren/events{/privacy}","received_events_url":"https://api.github.com/users/plofgren/received_events","type":"User","site_admin":false},"body":"This is a graph that stores its data in a memory mapped file. This enables two nice features:\r\n1) No object overhead.  The memory used for n nodes and m edges with both in-neighbor and out-neighbor access is exactly 8 + 16*n + 8*m bytes\r\n2) Nearly instant graph loading.  The twitter-2010 graph with 1.5 billion edges loads in seconds if the binary graph file is already in OS cache, and otherwise loads in the time it takes the OS to transfer the file from disk to RAM.\r\n\r\n@pankajgupta ","created_at":"2015-09-12T01:13:23Z","updated_at":"2015-09-18T23:30:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1a21781b8a1a94f6c2f8993249d63d94b6e5a88c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/twitter/cassovary/pulls/201/commits","review_comments_url":"https://api.github.com/repos/twitter/cassovary/pulls/201/comments","review_comment_url":"https://api.github.com/repos/twitter/cassovary/pulls/comments{/number}","comments_url":"https://api.github.com/repos/twitter/cassovary/issues/201/comments","statuses_url":"https://api.github.com/repos/twitter/cassovary/statuses/ff23aed521aad5affb2ef754f260629e3c55adec","head":{"label":"plofgren:plofgren-memory-mapped-graph","ref":"plofgren-memory-mapped-graph","sha":"ff23aed521aad5affb2ef754f260629e3c55adec","user":{"login":"plofgren","id":6324377,"avatar_url":"https://avatars.githubusercontent.com/u/6324377?v=3","gravatar_id":"","url":"https://api.github.com/users/plofgren","html_url":"https://github.com/plofgren","followers_url":"https://api.github.com/users/plofgren/followers","following_url":"https://api.github.com/users/plofgren/following{/other_user}","gists_url":"https://api.github.com/users/plofgren/gists{/gist_id}","starred_url":"https://api.github.com/users/plofgren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plofgren/subscriptions","organizations_url":"https://api.github.com/users/plofgren/orgs","repos_url":"https://api.github.com/users/plofgren/repos","events_url":"https://api.github.com/users/plofgren/events{/privacy}","received_events_url":"https://api.github.com/users/plofgren/received_events","type":"User","site_admin":false},"repo":{"id":29319928,"name":"cassovary","full_name":"plofgren/cassovary","owner":{"login":"plofgren","id":6324377,"avatar_url":"https://avatars.githubusercontent.com/u/6324377?v=3","gravatar_id":"","url":"https://api.github.com/users/plofgren","html_url":"https://github.com/plofgren","followers_url":"https://api.github.com/users/plofgren/followers","following_url":"https://api.github.com/users/plofgren/following{/other_user}","gists_url":"https://api.github.com/users/plofgren/gists{/gist_id}","starred_url":"https://api.github.com/users/plofgren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/plofgren/subscriptions","organizations_url":"https://api.github.com/users/plofgren/orgs","repos_url":"https://api.github.com/users/plofgren/repos","events_url":"https://api.github.com/users/plofgren/events{/privacy}","received_events_url":"https://api.github.com/users/plofgren/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/plofgren/cassovary","description":"Cassovary is a simple big graph processing library for the JVM","fork":true,"url":"https://api.github.com/repos/plofgren/cassovary","forks_url":"https://api.github.com/repos/plofgren/cassovary/forks","keys_url":"https://api.github.com/repos/plofgren/cassovary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/plofgren/cassovary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/plofgren/cassovary/teams","hooks_url":"https://api.github.com/repos/plofgren/cassovary/hooks","issue_events_url":"https://api.github.com/repos/plofgren/cassovary/issues/events{/number}","events_url":"https://api.github.com/repos/plofgren/cassovary/events","assignees_url":"https://api.github.com/repos/plofgren/cassovary/assignees{/user}","branches_url":"https://api.github.com/repos/plofgren/cassovary/branches{/branch}","tags_url":"https://api.github.com/repos/plofgren/cassovary/tags","blobs_url":"https://api.github.com/repos/plofgren/cassovary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/plofgren/cassovary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/plofgren/cassovary/git/refs{/sha}","trees_url":"https://api.github.com/repos/plofgren/cassovary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/plofgren/cassovary/statuses/{sha}","languages_url":"https://api.github.com/repos/plofgren/cassovary/languages","stargazers_url":"https://api.github.com/repos/plofgren/cassovary/stargazers","contributors_url":"https://api.github.com/repos/plofgren/cassovary/contributors","subscribers_url":"https://api.github.com/repos/plofgren/cassovary/subscribers","subscription_url":"https://api.github.com/repos/plofgren/cassovary/subscription","commits_url":"https://api.github.com/repos/plofgren/cassovary/commits{/sha}","git_commits_url":"https://api.github.com/repos/plofgren/cassovary/git/commits{/sha}","comments_url":"https://api.github.com/repos/plofgren/cassovary/comments{/number}","issue_comment_url":"https://api.github.com/repos/plofgren/cassovary/issues/comments{/number}","contents_url":"https://api.github.com/repos/plofgren/cassovary/contents/{+path}","compare_url":"https://api.github.com/repos/plofgren/cassovary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/plofgren/cassovary/merges","archive_url":"https://api.github.com/repos/plofgren/cassovary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/plofgren/cassovary/downloads","issues_url":"https://api.github.com/repos/plofgren/cassovary/issues{/number}","pulls_url":"https://api.github.com/repos/plofgren/cassovary/pulls{/number}","milestones_url":"https://api.github.com/repos/plofgren/cassovary/milestones{/number}","notifications_url":"https://api.github.com/repos/plofgren/cassovary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/plofgren/cassovary/labels{/name}","releases_url":"https://api.github.com/repos/plofgren/cassovary/releases{/id}","created_at":"2015-01-15T21:49:58Z","updated_at":"2015-04-12T16:35:09Z","pushed_at":"2015-09-04T21:05:23Z","git_url":"git://github.com/plofgren/cassovary.git","ssh_url":"git@github.com:plofgren/cassovary.git","clone_url":"https://github.com/plofgren/cassovary.git","svn_url":"https://github.com/plofgren/cassovary","homepage":"http://twitter.com/cassovary","size":2962,"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":"twitter:master","ref":"master","sha":"07952977c18d06c6e473bc2af2b47628d79e0683","user":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"repo":{"id":3509388,"name":"cassovary","full_name":"twitter/cassovary","owner":{"login":"twitter","id":50278,"avatar_url":"https://avatars.githubusercontent.com/u/50278?v=3","gravatar_id":"","url":"https://api.github.com/users/twitter","html_url":"https://github.com/twitter","followers_url":"https://api.github.com/users/twitter/followers","following_url":"https://api.github.com/users/twitter/following{/other_user}","gists_url":"https://api.github.com/users/twitter/gists{/gist_id}","starred_url":"https://api.github.com/users/twitter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twitter/subscriptions","organizations_url":"https://api.github.com/users/twitter/orgs","repos_url":"https://api.github.com/users/twitter/repos","events_url":"https://api.github.com/users/twitter/events{/privacy}","received_events_url":"https://api.github.com/users/twitter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twitter/cassovary","description":"Cassovary is a simple big graph processing library for the JVM","fork":false,"url":"https://api.github.com/repos/twitter/cassovary","forks_url":"https://api.github.com/repos/twitter/cassovary/forks","keys_url":"https://api.github.com/repos/twitter/cassovary/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twitter/cassovary/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twitter/cassovary/teams","hooks_url":"https://api.github.com/repos/twitter/cassovary/hooks","issue_events_url":"https://api.github.com/repos/twitter/cassovary/issues/events{/number}","events_url":"https://api.github.com/repos/twitter/cassovary/events","assignees_url":"https://api.github.com/repos/twitter/cassovary/assignees{/user}","branches_url":"https://api.github.com/repos/twitter/cassovary/branches{/branch}","tags_url":"https://api.github.com/repos/twitter/cassovary/tags","blobs_url":"https://api.github.com/repos/twitter/cassovary/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twitter/cassovary/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twitter/cassovary/git/refs{/sha}","trees_url":"https://api.github.com/repos/twitter/cassovary/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twitter/cassovary/statuses/{sha}","languages_url":"https://api.github.com/repos/twitter/cassovary/languages","stargazers_url":"https://api.github.com/repos/twitter/cassovary/stargazers","contributors_url":"https://api.github.com/repos/twitter/cassovary/contributors","subscribers_url":"https://api.github.com/repos/twitter/cassovary/subscribers","subscription_url":"https://api.github.com/repos/twitter/cassovary/subscription","commits_url":"https://api.github.com/repos/twitter/cassovary/commits{/sha}","git_commits_url":"https://api.github.com/repos/twitter/cassovary/git/commits{/sha}","comments_url":"https://api.github.com/repos/twitter/cassovary/comments{/number}","issue_comment_url":"https://api.github.com/repos/twitter/cassovary/issues/comments{/number}","contents_url":"https://api.github.com/repos/twitter/cassovary/contents/{+path}","compare_url":"https://api.github.com/repos/twitter/cassovary/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twitter/cassovary/merges","archive_url":"https://api.github.com/repos/twitter/cassovary/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twitter/cassovary/downloads","issues_url":"https://api.github.com/repos/twitter/cassovary/issues{/number}","pulls_url":"https://api.github.com/repos/twitter/cassovary/pulls{/number}","milestones_url":"https://api.github.com/repos/twitter/cassovary/milestones{/number}","notifications_url":"https://api.github.com/repos/twitter/cassovary/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twitter/cassovary/labels{/name}","releases_url":"https://api.github.com/repos/twitter/cassovary/releases{/id}","created_at":"2012-02-21T23:22:30Z","updated_at":"2015-09-18T17:57:33Z","pushed_at":"2015-09-17T18:24:16Z","git_url":"git://github.com/twitter/cassovary.git","ssh_url":"git@github.com:twitter/cassovary.git","clone_url":"https://github.com/twitter/cassovary.git","svn_url":"https://github.com/twitter/cassovary","homepage":"http://twitter.com/cassovary","size":54406,"stargazers_count":757,"watchers_count":757,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":101,"mirror_url":null,"open_issues_count":30,"forks":101,"open_issues":30,"watchers":757,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/twitter/cassovary/pulls/201"},"html":{"href":"https://github.com/twitter/cassovary/pull/201"},"issue":{"href":"https://api.github.com/repos/twitter/cassovary/issues/201"},"comments":{"href":"https://api.github.com/repos/twitter/cassovary/issues/201/comments"},"review_comments":{"href":"https://api.github.com/repos/twitter/cassovary/pulls/201/comments"},"review_comment":{"href":"https://api.github.com/repos/twitter/cassovary/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/twitter/cassovary/pulls/201/commits"},"statuses":{"href":"https://api.github.com/repos/twitter/cassovary/statuses/ff23aed521aad5affb2ef754f260629e3c55adec"}}}}