{"action":"created","comment":{"url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/pulls/comments/231160776","pull_request_review_id":172066352,"id":231160776,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMTE2MDc3Ng==","diff_hunk":"@@ -88,20 +88,51 @@ def _wait_elasticsearch_healthy(es):\n     logging.getLogger(\"elasticsearch\").setLevel(logging.INFO)\n \n \n-def maybe_create_elasticsearch_index(elasticsearch_url, index_name):\n-    \"\"\"Creates Elasticsearchindex if it doesn't already exist.\"\"\"\n-    es = Elasticsearch([elasticsearch_url])\n+def get_es_client(elasticsearch_url):\n+    es = Elasticsearch([elasticsearch_url],\n+                       retry_on_timeout=True,","path":"indexer_util/indexer_util/indexer_util.py","position":9,"original_position":9,"commit_id":"344a4e97fc6fa33abc5a572da0f4b2187fac097a","original_commit_id":"e0b7dfc97cded77c1492f42a468428ffc12a1bfb","user":{"login":"bfcrampton","id":1890623,"node_id":"MDQ6VXNlcjE4OTA2MjM=","avatar_url":"https://avatars1.githubusercontent.com/u/1890623?v=4","gravatar_id":"","url":"https://api.github.com/users/bfcrampton","html_url":"https://github.com/bfcrampton","followers_url":"https://api.github.com/users/bfcrampton/followers","following_url":"https://api.github.com/users/bfcrampton/following{/other_user}","gists_url":"https://api.github.com/users/bfcrampton/gists{/gist_id}","starred_url":"https://api.github.com/users/bfcrampton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfcrampton/subscriptions","organizations_url":"https://api.github.com/users/bfcrampton/orgs","repos_url":"https://api.github.com/users/bfcrampton/repos","events_url":"https://api.github.com/users/bfcrampton/events{/privacy}","received_events_url":"https://api.github.com/users/bfcrampton/received_events","type":"User","site_admin":false},"body":"Verified that they are needed.","created_at":"2018-11-06T15:11:57Z","updated_at":"2018-11-06T15:11:57Z","html_url":"https://github.com/DataBiosphere/data-explorer-indexers/pull/94#discussion_r231160776","pull_request_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/pulls/94","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/pulls/comments/231160776"},"html":{"href":"https://github.com/DataBiosphere/data-explorer-indexers/pull/94#discussion_r231160776"},"pull_request":{"href":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/pulls/94"}},"in_reply_to_id":230905566},"pull_request":{"url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/pulls/94","id":228074689,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4MDc0Njg5","html_url":"https://github.com/DataBiosphere/data-explorer-indexers/pull/94","diff_url":"https://github.com/DataBiosphere/data-explorer-indexers/pull/94.diff","patch_url":"https://github.com/DataBiosphere/data-explorer-indexers/pull/94.patch","issue_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/issues/94","number":94,"state":"open","locked":false,"title":"Support indexing very large BigQuery tables","user":{"login":"bfcrampton","id":1890623,"node_id":"MDQ6VXNlcjE4OTA2MjM=","avatar_url":"https://avatars1.githubusercontent.com/u/1890623?v=4","gravatar_id":"","url":"https://api.github.com/users/bfcrampton","html_url":"https://github.com/bfcrampton","followers_url":"https://api.github.com/users/bfcrampton/followers","following_url":"https://api.github.com/users/bfcrampton/following{/other_user}","gists_url":"https://api.github.com/users/bfcrampton/gists{/gist_id}","starred_url":"https://api.github.com/users/bfcrampton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bfcrampton/subscriptions","organizations_url":"https://api.github.com/users/bfcrampton/orgs","repos_url":"https://api.github.com/users/bfcrampton/repos","events_url":"https://api.github.com/users/bfcrampton/events{/privacy}","received_events_url":"https://api.github.com/users/bfcrampton/received_events","type":"User","site_admin":false},"body":"FYI @danxmoran, this PR allowed us to index the table with 6600 columns and 121k rows. Maybe some of the changes will help you as well.\r\n\r\nRelevant changes:\r\n- Statically create all mappings before indexing and disable [Dynamic Mapping](https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic-mapping.html)\r\n- Remove use of pandas in favor of utilizing BigQuery extract API to dump entire table to sharded JSON files, and index those directly. Cuts down load time from ~2 hours to a few minutes for a 2GB table.\r\n- Set `refresh_interval = -1` and `replicas = 0` during indexing to improve performance. Reset to default values after complete.","created_at":"2018-11-02T22:32:33Z","updated_at":"2018-11-06T15:11:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1648ba8240f5d977f4f4a643da78c3d10edb3fc2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/pulls/94/commits","review_comments_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/pulls/94/comments","review_comment_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/issues/94/comments","statuses_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/statuses/344a4e97fc6fa33abc5a572da0f4b2187fac097a","head":{"label":"DataBiosphere:bc/nhs-local-indexing","ref":"bc/nhs-local-indexing","sha":"344a4e97fc6fa33abc5a572da0f4b2187fac097a","user":{"login":"DataBiosphere","id":32805087,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyODA1MDg3","avatar_url":"https://avatars0.githubusercontent.com/u/32805087?v=4","gravatar_id":"","url":"https://api.github.com/users/DataBiosphere","html_url":"https://github.com/DataBiosphere","followers_url":"https://api.github.com/users/DataBiosphere/followers","following_url":"https://api.github.com/users/DataBiosphere/following{/other_user}","gists_url":"https://api.github.com/users/DataBiosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/DataBiosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataBiosphere/subscriptions","organizations_url":"https://api.github.com/users/DataBiosphere/orgs","repos_url":"https://api.github.com/users/DataBiosphere/repos","events_url":"https://api.github.com/users/DataBiosphere/events{/privacy}","received_events_url":"https://api.github.com/users/DataBiosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":123707251,"node_id":"MDEwOlJlcG9zaXRvcnkxMjM3MDcyNTE=","name":"data-explorer-indexers","full_name":"DataBiosphere/data-explorer-indexers","private":false,"owner":{"login":"DataBiosphere","id":32805087,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyODA1MDg3","avatar_url":"https://avatars0.githubusercontent.com/u/32805087?v=4","gravatar_id":"","url":"https://api.github.com/users/DataBiosphere","html_url":"https://github.com/DataBiosphere","followers_url":"https://api.github.com/users/DataBiosphere/followers","following_url":"https://api.github.com/users/DataBiosphere/following{/other_user}","gists_url":"https://api.github.com/users/DataBiosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/DataBiosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataBiosphere/subscriptions","organizations_url":"https://api.github.com/users/DataBiosphere/orgs","repos_url":"https://api.github.com/users/DataBiosphere/repos","events_url":"https://api.github.com/users/DataBiosphere/events{/privacy}","received_events_url":"https://api.github.com/users/DataBiosphere/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DataBiosphere/data-explorer-indexers","description":null,"fork":false,"url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers","forks_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/forks","keys_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/teams","hooks_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/hooks","issue_events_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/issues/events{/number}","events_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/events","assignees_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/assignees{/user}","branches_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/branches{/branch}","tags_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/tags","blobs_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/statuses/{sha}","languages_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/languages","stargazers_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/stargazers","contributors_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/contributors","subscribers_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/subscribers","subscription_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/subscription","commits_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/contents/{+path}","compare_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/merges","archive_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/downloads","issues_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/issues{/number}","pulls_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/pulls{/number}","milestones_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/milestones{/number}","notifications_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/labels{/name}","releases_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/releases{/id}","deployments_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/deployments","created_at":"2018-03-03T16:00:03Z","updated_at":"2018-11-06T00:28:37Z","pushed_at":"2018-11-06T02:01:48Z","git_url":"git://github.com/DataBiosphere/data-explorer-indexers.git","ssh_url":"git@github.com:DataBiosphere/data-explorer-indexers.git","clone_url":"https://github.com/DataBiosphere/data-explorer-indexers.git","svn_url":"https://github.com/DataBiosphere/data-explorer-indexers","homepage":null,"size":177,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":2,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"DataBiosphere:master","ref":"master","sha":"6a34e3c2e88bc56f785af48352fb4d8c87c895f3","user":{"login":"DataBiosphere","id":32805087,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyODA1MDg3","avatar_url":"https://avatars0.githubusercontent.com/u/32805087?v=4","gravatar_id":"","url":"https://api.github.com/users/DataBiosphere","html_url":"https://github.com/DataBiosphere","followers_url":"https://api.github.com/users/DataBiosphere/followers","following_url":"https://api.github.com/users/DataBiosphere/following{/other_user}","gists_url":"https://api.github.com/users/DataBiosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/DataBiosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataBiosphere/subscriptions","organizations_url":"https://api.github.com/users/DataBiosphere/orgs","repos_url":"https://api.github.com/users/DataBiosphere/repos","events_url":"https://api.github.com/users/DataBiosphere/events{/privacy}","received_events_url":"https://api.github.com/users/DataBiosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":123707251,"node_id":"MDEwOlJlcG9zaXRvcnkxMjM3MDcyNTE=","name":"data-explorer-indexers","full_name":"DataBiosphere/data-explorer-indexers","private":false,"owner":{"login":"DataBiosphere","id":32805087,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyODA1MDg3","avatar_url":"https://avatars0.githubusercontent.com/u/32805087?v=4","gravatar_id":"","url":"https://api.github.com/users/DataBiosphere","html_url":"https://github.com/DataBiosphere","followers_url":"https://api.github.com/users/DataBiosphere/followers","following_url":"https://api.github.com/users/DataBiosphere/following{/other_user}","gists_url":"https://api.github.com/users/DataBiosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/DataBiosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataBiosphere/subscriptions","organizations_url":"https://api.github.com/users/DataBiosphere/orgs","repos_url":"https://api.github.com/users/DataBiosphere/repos","events_url":"https://api.github.com/users/DataBiosphere/events{/privacy}","received_events_url":"https://api.github.com/users/DataBiosphere/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DataBiosphere/data-explorer-indexers","description":null,"fork":false,"url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers","forks_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/forks","keys_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/teams","hooks_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/hooks","issue_events_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/issues/events{/number}","events_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/events","assignees_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/assignees{/user}","branches_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/branches{/branch}","tags_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/tags","blobs_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/statuses/{sha}","languages_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/languages","stargazers_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/stargazers","contributors_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/contributors","subscribers_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/subscribers","subscription_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/subscription","commits_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/contents/{+path}","compare_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/merges","archive_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/downloads","issues_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/issues{/number}","pulls_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/pulls{/number}","milestones_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/milestones{/number}","notifications_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/labels{/name}","releases_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/releases{/id}","deployments_url":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/deployments","created_at":"2018-03-03T16:00:03Z","updated_at":"2018-11-06T00:28:37Z","pushed_at":"2018-11-06T02:01:48Z","git_url":"git://github.com/DataBiosphere/data-explorer-indexers.git","ssh_url":"git@github.com:DataBiosphere/data-explorer-indexers.git","clone_url":"https://github.com/DataBiosphere/data-explorer-indexers.git","svn_url":"https://github.com/DataBiosphere/data-explorer-indexers","homepage":null,"size":177,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":6,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":2,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/pulls/94"},"html":{"href":"https://github.com/DataBiosphere/data-explorer-indexers/pull/94"},"issue":{"href":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/issues/94"},"comments":{"href":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/issues/94/comments"},"review_comments":{"href":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/pulls/94/comments"},"review_comment":{"href":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/pulls/94/commits"},"statuses":{"href":"https://api.github.com/repos/DataBiosphere/data-explorer-indexers/statuses/344a4e97fc6fa33abc5a572da0f4b2187fac097a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bfcrampton"}}