{"action":"created","comment":{"url":"https://api.github.com/repos/dgraph-io/dgraph/pulls/comments/234454469","pull_request_review_id":176098762,"id":234454469,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDQ1NDQ2OQ==","diff_hunk":"@@ -0,0 +1,129 @@\n+package distbulk\n+\n+import (\n+\t\"context\"\n+\t\"encoding/binary\"\n+\t\"flag\"\n+\t\"fmt\"\n+\t\"os\"\n+\n+\t\"github.com/chrislusf/gleam/distributed\"\n+\t\"github.com/chrislusf/gleam/flow\"\n+\t\"github.com/chrislusf/gleam/gio\"\n+\t\"github.com/chrislusf/gleam/plugins/file\"\n+\t\"github.com/chrislusf/gleam/util\"\n+\n+\t\"github.com/dgraph-io/badger\"\n+\t\"github.com/dgraph-io/dgraph/protos/pb\"\n+\t\"github.com/dgraph-io/dgraph/rdf\"\n+\n+\t\"google.golang.org/grpc\"\n+)\n+\n+const (\n+\tnumIds = 10000000\n+)\n+\n+var (\n+\tisDistributed = flag.Bool(\"distributed\", false, \"run in distributed or not\")\n+\tuidStart      uint64\n+\tuidEnd        uint64\n+\tzc            pb.ZeroClient\n+)\n+\n+func check(err error) {\n+\tif err != nil {\n+\t\tpanic(err)\n+\t}\n+}\n+\n+func allocateUids() error {\n+\tassignedIds, err := zc.AssignUids(context.Background(), &pb.Num{Val: numIds})\n+\tif err != nil {\n+\t\treturn err\n+\t}\n+\n+\tuidStart = assignedIds.StartId\n+\tuidEnd = assignedIds.EndId\n+\treturn nil\n+}\n+\n+func main() {","path":"dgraph/cmd/distbulk/uidassign.go","position":51,"original_position":51,"commit_id":"652a57e96168491c49d64c913db07f3f18a8694f","original_commit_id":"652a57e96168491c49d64c913db07f3f18a8694f","user":{"login":"golangcibot","id":42910462,"node_id":"MDQ6VXNlcjQyOTEwNDYy","avatar_url":"https://avatars1.githubusercontent.com/u/42910462?v=4","gravatar_id":"","url":"https://api.github.com/users/golangcibot","html_url":"https://github.com/golangcibot","followers_url":"https://api.github.com/users/golangcibot/followers","following_url":"https://api.github.com/users/golangcibot/following{/other_user}","gists_url":"https://api.github.com/users/golangcibot/gists{/gist_id}","starred_url":"https://api.github.com/users/golangcibot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/golangcibot/subscriptions","organizations_url":"https://api.github.com/users/golangcibot/orgs","repos_url":"https://api.github.com/users/golangcibot/repos","events_url":"https://api.github.com/users/golangcibot/events{/privacy}","received_events_url":"https://api.github.com/users/golangcibot/received_events","type":"User","site_admin":false},"body":"func `main` is unused","created_at":"2018-11-18T17:41:10Z","updated_at":"2018-11-18T17:41:11Z","html_url":"https://github.com/dgraph-io/dgraph/pull/2718#discussion_r234454469","pull_request_url":"https://api.github.com/repos/dgraph-io/dgraph/pulls/2718","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/dgraph-io/dgraph/pulls/comments/234454469"},"html":{"href":"https://github.com/dgraph-io/dgraph/pull/2718#discussion_r234454469"},"pull_request":{"href":"https://api.github.com/repos/dgraph-io/dgraph/pulls/2718"}}},"pull_request":{"url":"https://api.github.com/repos/dgraph-io/dgraph/pulls/2718","id":227743076,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3NzQzMDc2","html_url":"https://github.com/dgraph-io/dgraph/pull/2718","diff_url":"https://github.com/dgraph-io/dgraph/pull/2718.diff","patch_url":"https://github.com/dgraph-io/dgraph/pull/2718.patch","issue_url":"https://api.github.com/repos/dgraph-io/dgraph/issues/2718","number":2718,"state":"open","locked":false,"title":"[WIP] Distributed bulk loader","user":{"login":"svmhdvn","id":2187906,"node_id":"MDQ6VXNlcjIxODc5MDY=","avatar_url":"https://avatars2.githubusercontent.com/u/2187906?v=4","gravatar_id":"","url":"https://api.github.com/users/svmhdvn","html_url":"https://github.com/svmhdvn","followers_url":"https://api.github.com/users/svmhdvn/followers","following_url":"https://api.github.com/users/svmhdvn/following{/other_user}","gists_url":"https://api.github.com/users/svmhdvn/gists{/gist_id}","starred_url":"https://api.github.com/users/svmhdvn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svmhdvn/subscriptions","organizations_url":"https://api.github.com/users/svmhdvn/orgs","repos_url":"https://api.github.com/users/svmhdvn/repos","events_url":"https://api.github.com/users/svmhdvn/events{/privacy}","received_events_url":"https://api.github.com/users/svmhdvn/received_events","type":"User","site_admin":false},"body":"[more information will be added here soon]\r\n\r\nCloses #2628 \r\n\r\n<!-- Reviewable:start -->\r\n---\r\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/dgraph-io/dgraph/2718)\r\n<!-- Reviewable:end -->\r\n","created_at":"2018-11-01T20:07:38Z","updated_at":"2018-11-18T17:41:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8a5b4581a80180cbb7c9c3cb44e073a332a1489f","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dgraph-io/dgraph/pulls/2718/commits","review_comments_url":"https://api.github.com/repos/dgraph-io/dgraph/pulls/2718/comments","review_comment_url":"https://api.github.com/repos/dgraph-io/dgraph/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dgraph-io/dgraph/issues/2718/comments","statuses_url":"https://api.github.com/repos/dgraph-io/dgraph/statuses/652a57e96168491c49d64c913db07f3f18a8694f","head":{"label":"svmhdvn:distributed-bulk","ref":"distributed-bulk","sha":"652a57e96168491c49d64c913db07f3f18a8694f","user":{"login":"svmhdvn","id":2187906,"node_id":"MDQ6VXNlcjIxODc5MDY=","avatar_url":"https://avatars2.githubusercontent.com/u/2187906?v=4","gravatar_id":"","url":"https://api.github.com/users/svmhdvn","html_url":"https://github.com/svmhdvn","followers_url":"https://api.github.com/users/svmhdvn/followers","following_url":"https://api.github.com/users/svmhdvn/following{/other_user}","gists_url":"https://api.github.com/users/svmhdvn/gists{/gist_id}","starred_url":"https://api.github.com/users/svmhdvn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svmhdvn/subscriptions","organizations_url":"https://api.github.com/users/svmhdvn/orgs","repos_url":"https://api.github.com/users/svmhdvn/repos","events_url":"https://api.github.com/users/svmhdvn/events{/privacy}","received_events_url":"https://api.github.com/users/svmhdvn/received_events","type":"User","site_admin":false},"repo":{"id":155769377,"node_id":"MDEwOlJlcG9zaXRvcnkxNTU3NjkzNzc=","name":"dgraph","full_name":"svmhdvn/dgraph","private":false,"owner":{"login":"svmhdvn","id":2187906,"node_id":"MDQ6VXNlcjIxODc5MDY=","avatar_url":"https://avatars2.githubusercontent.com/u/2187906?v=4","gravatar_id":"","url":"https://api.github.com/users/svmhdvn","html_url":"https://github.com/svmhdvn","followers_url":"https://api.github.com/users/svmhdvn/followers","following_url":"https://api.github.com/users/svmhdvn/following{/other_user}","gists_url":"https://api.github.com/users/svmhdvn/gists{/gist_id}","starred_url":"https://api.github.com/users/svmhdvn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/svmhdvn/subscriptions","organizations_url":"https://api.github.com/users/svmhdvn/orgs","repos_url":"https://api.github.com/users/svmhdvn/repos","events_url":"https://api.github.com/users/svmhdvn/events{/privacy}","received_events_url":"https://api.github.com/users/svmhdvn/received_events","type":"User","site_admin":false},"html_url":"https://github.com/svmhdvn/dgraph","description":"Fast, Distributed Graph DB","fork":true,"url":"https://api.github.com/repos/svmhdvn/dgraph","forks_url":"https://api.github.com/repos/svmhdvn/dgraph/forks","keys_url":"https://api.github.com/repos/svmhdvn/dgraph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/svmhdvn/dgraph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/svmhdvn/dgraph/teams","hooks_url":"https://api.github.com/repos/svmhdvn/dgraph/hooks","issue_events_url":"https://api.github.com/repos/svmhdvn/dgraph/issues/events{/number}","events_url":"https://api.github.com/repos/svmhdvn/dgraph/events","assignees_url":"https://api.github.com/repos/svmhdvn/dgraph/assignees{/user}","branches_url":"https://api.github.com/repos/svmhdvn/dgraph/branches{/branch}","tags_url":"https://api.github.com/repos/svmhdvn/dgraph/tags","blobs_url":"https://api.github.com/repos/svmhdvn/dgraph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/svmhdvn/dgraph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/svmhdvn/dgraph/git/refs{/sha}","trees_url":"https://api.github.com/repos/svmhdvn/dgraph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/svmhdvn/dgraph/statuses/{sha}","languages_url":"https://api.github.com/repos/svmhdvn/dgraph/languages","stargazers_url":"https://api.github.com/repos/svmhdvn/dgraph/stargazers","contributors_url":"https://api.github.com/repos/svmhdvn/dgraph/contributors","subscribers_url":"https://api.github.com/repos/svmhdvn/dgraph/subscribers","subscription_url":"https://api.github.com/repos/svmhdvn/dgraph/subscription","commits_url":"https://api.github.com/repos/svmhdvn/dgraph/commits{/sha}","git_commits_url":"https://api.github.com/repos/svmhdvn/dgraph/git/commits{/sha}","comments_url":"https://api.github.com/repos/svmhdvn/dgraph/comments{/number}","issue_comment_url":"https://api.github.com/repos/svmhdvn/dgraph/issues/comments{/number}","contents_url":"https://api.github.com/repos/svmhdvn/dgraph/contents/{+path}","compare_url":"https://api.github.com/repos/svmhdvn/dgraph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/svmhdvn/dgraph/merges","archive_url":"https://api.github.com/repos/svmhdvn/dgraph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/svmhdvn/dgraph/downloads","issues_url":"https://api.github.com/repos/svmhdvn/dgraph/issues{/number}","pulls_url":"https://api.github.com/repos/svmhdvn/dgraph/pulls{/number}","milestones_url":"https://api.github.com/repos/svmhdvn/dgraph/milestones{/number}","notifications_url":"https://api.github.com/repos/svmhdvn/dgraph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/svmhdvn/dgraph/labels{/name}","releases_url":"https://api.github.com/repos/svmhdvn/dgraph/releases{/id}","deployments_url":"https://api.github.com/repos/svmhdvn/dgraph/deployments","created_at":"2018-11-01T20:05:04Z","updated_at":"2018-11-01T20:05:09Z","pushed_at":"2018-11-16T22:38:54Z","git_url":"git://github.com/svmhdvn/dgraph.git","ssh_url":"git@github.com:svmhdvn/dgraph.git","clone_url":"https://github.com/svmhdvn/dgraph.git","svn_url":"https://github.com/svmhdvn/dgraph","homepage":"https://dgraph.io","size":140242,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dgraph-io:master","ref":"master","sha":"a1475713bc7f5ce666b5740349283d1c22f46adc","user":{"login":"dgraph-io","id":13958706,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzOTU4NzA2","avatar_url":"https://avatars0.githubusercontent.com/u/13958706?v=4","gravatar_id":"","url":"https://api.github.com/users/dgraph-io","html_url":"https://github.com/dgraph-io","followers_url":"https://api.github.com/users/dgraph-io/followers","following_url":"https://api.github.com/users/dgraph-io/following{/other_user}","gists_url":"https://api.github.com/users/dgraph-io/gists{/gist_id}","starred_url":"https://api.github.com/users/dgraph-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgraph-io/subscriptions","organizations_url":"https://api.github.com/users/dgraph-io/orgs","repos_url":"https://api.github.com/users/dgraph-io/repos","events_url":"https://api.github.com/users/dgraph-io/events{/privacy}","received_events_url":"https://api.github.com/users/dgraph-io/received_events","type":"Organization","site_admin":false},"repo":{"id":41349039,"node_id":"MDEwOlJlcG9zaXRvcnk0MTM0OTAzOQ==","name":"dgraph","full_name":"dgraph-io/dgraph","private":false,"owner":{"login":"dgraph-io","id":13958706,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzOTU4NzA2","avatar_url":"https://avatars0.githubusercontent.com/u/13958706?v=4","gravatar_id":"","url":"https://api.github.com/users/dgraph-io","html_url":"https://github.com/dgraph-io","followers_url":"https://api.github.com/users/dgraph-io/followers","following_url":"https://api.github.com/users/dgraph-io/following{/other_user}","gists_url":"https://api.github.com/users/dgraph-io/gists{/gist_id}","starred_url":"https://api.github.com/users/dgraph-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgraph-io/subscriptions","organizations_url":"https://api.github.com/users/dgraph-io/orgs","repos_url":"https://api.github.com/users/dgraph-io/repos","events_url":"https://api.github.com/users/dgraph-io/events{/privacy}","received_events_url":"https://api.github.com/users/dgraph-io/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dgraph-io/dgraph","description":"Fast, Distributed Graph DB","fork":false,"url":"https://api.github.com/repos/dgraph-io/dgraph","forks_url":"https://api.github.com/repos/dgraph-io/dgraph/forks","keys_url":"https://api.github.com/repos/dgraph-io/dgraph/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dgraph-io/dgraph/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dgraph-io/dgraph/teams","hooks_url":"https://api.github.com/repos/dgraph-io/dgraph/hooks","issue_events_url":"https://api.github.com/repos/dgraph-io/dgraph/issues/events{/number}","events_url":"https://api.github.com/repos/dgraph-io/dgraph/events","assignees_url":"https://api.github.com/repos/dgraph-io/dgraph/assignees{/user}","branches_url":"https://api.github.com/repos/dgraph-io/dgraph/branches{/branch}","tags_url":"https://api.github.com/repos/dgraph-io/dgraph/tags","blobs_url":"https://api.github.com/repos/dgraph-io/dgraph/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dgraph-io/dgraph/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dgraph-io/dgraph/git/refs{/sha}","trees_url":"https://api.github.com/repos/dgraph-io/dgraph/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dgraph-io/dgraph/statuses/{sha}","languages_url":"https://api.github.com/repos/dgraph-io/dgraph/languages","stargazers_url":"https://api.github.com/repos/dgraph-io/dgraph/stargazers","contributors_url":"https://api.github.com/repos/dgraph-io/dgraph/contributors","subscribers_url":"https://api.github.com/repos/dgraph-io/dgraph/subscribers","subscription_url":"https://api.github.com/repos/dgraph-io/dgraph/subscription","commits_url":"https://api.github.com/repos/dgraph-io/dgraph/commits{/sha}","git_commits_url":"https://api.github.com/repos/dgraph-io/dgraph/git/commits{/sha}","comments_url":"https://api.github.com/repos/dgraph-io/dgraph/comments{/number}","issue_comment_url":"https://api.github.com/repos/dgraph-io/dgraph/issues/comments{/number}","contents_url":"https://api.github.com/repos/dgraph-io/dgraph/contents/{+path}","compare_url":"https://api.github.com/repos/dgraph-io/dgraph/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dgraph-io/dgraph/merges","archive_url":"https://api.github.com/repos/dgraph-io/dgraph/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dgraph-io/dgraph/downloads","issues_url":"https://api.github.com/repos/dgraph-io/dgraph/issues{/number}","pulls_url":"https://api.github.com/repos/dgraph-io/dgraph/pulls{/number}","milestones_url":"https://api.github.com/repos/dgraph-io/dgraph/milestones{/number}","notifications_url":"https://api.github.com/repos/dgraph-io/dgraph/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dgraph-io/dgraph/labels{/name}","releases_url":"https://api.github.com/repos/dgraph-io/dgraph/releases{/id}","deployments_url":"https://api.github.com/repos/dgraph-io/dgraph/deployments","created_at":"2015-08-25T07:15:56Z","updated_at":"2018-11-18T13:30:14Z","pushed_at":"2018-11-18T15:05:20Z","git_url":"git://github.com/dgraph-io/dgraph.git","ssh_url":"git@github.com:dgraph-io/dgraph.git","clone_url":"https://github.com/dgraph-io/dgraph.git","svn_url":"https://github.com/dgraph-io/dgraph","homepage":"https://dgraph.io","size":226135,"stargazers_count":6930,"watchers_count":6930,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":495,"mirror_url":null,"archived":false,"open_issues_count":169,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":495,"open_issues":169,"watchers":6930,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dgraph-io/dgraph/pulls/2718"},"html":{"href":"https://github.com/dgraph-io/dgraph/pull/2718"},"issue":{"href":"https://api.github.com/repos/dgraph-io/dgraph/issues/2718"},"comments":{"href":"https://api.github.com/repos/dgraph-io/dgraph/issues/2718/comments"},"review_comments":{"href":"https://api.github.com/repos/dgraph-io/dgraph/pulls/2718/comments"},"review_comment":{"href":"https://api.github.com/repos/dgraph-io/dgraph/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dgraph-io/dgraph/pulls/2718/commits"},"statuses":{"href":"https://api.github.com/repos/dgraph-io/dgraph/statuses/652a57e96168491c49d64c913db07f3f18a8694f"}},"author_association":"NONE"}}
{"actor":{"display_login":"golangcibot"}}