{"action":"created","comment":{"url":"https://api.github.com/repos/prestodb/presto/pulls/comments/61630150","id":61630150,"diff_hunk":"@@ -0,0 +1,153 @@\n+============================\n+Resource Group Configuration\n+============================\n+\n+.. note::\n+    Resource groups are currently experimental and must be enabled with the\n+    ``experimental.resource-groups-enabled=true`` config flag.\n+\n+Resource groups place limits on resource usage, and can enforce queueing policies on\n+queries that run within them or divide their resources among sub groups. A query\n+belongs to a single resource group, and consumes resources from that group (and its ancestors).\n+Except for the limit on queued queries, when a resource group runs out of a resource\n+it does not cause running queries to fail; instead new queries become queued.\n+A resource group may have sub groups or may accept queries, but may not do both.\n+\n+The resource groups and associated selection rules are defined in a JSON file\n+The filename of the JSON config file should be specified with the\n+``resource-groups.config-file`` config property.\n+\n+Resource Group Properties\n+-------------------------\n+\n+* ``name`` (required): name of the group.\n+\n+* ``maxQueued`` (required): maximum number of queued queries.\n+\n+* ``maxRunning`` (required): maximum number of running queries.\n+\n+* ``softMemoryLimit`` (required): maximum amount of distributed memory this\n+  group may use before new queries become queued. May be specified as\n+  an absolute value (i.e. \"1GB\") or as a percentage of the cluster's memory.\n+\n+* ``schedulingPolicy`` (optional): specifies how queued queries are selected to run,\n+  and how sub groups become eligible to start their queries. May be one of three values:\n+\n+    * ``fair`` (default): queued queries are processed first-in-first-out, and sub groups\n+      must take turns starting new queries (if they have any queued).\n+\n+    * ``weighted``: queued queries are selected stochastically in proportion to their priority\n+      (specified via the ``query_priority`` session property). Sub groups are selected","path":"presto-docs/src/main/sphinx/admin/resource-groups.rst","position":40,"original_position":40,"commit_id":"5e37590dd0a619665ea78a56c436343632f8e195","original_commit_id":"5e37590dd0a619665ea78a56c436343632f8e195","user":{"login":"dain","id":58298,"avatar_url":"https://avatars.githubusercontent.com/u/58298?v=3","gravatar_id":"","url":"https://api.github.com/users/dain","html_url":"https://github.com/dain","followers_url":"https://api.github.com/users/dain/followers","following_url":"https://api.github.com/users/dain/following{/other_user}","gists_url":"https://api.github.com/users/dain/gists{/gist_id}","starred_url":"https://api.github.com/users/dain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dain/subscriptions","organizations_url":"https://api.github.com/users/dain/orgs","repos_url":"https://api.github.com/users/dain/repos","events_url":"https://api.github.com/users/dain/events{/privacy}","received_events_url":"https://api.github.com/users/dain/received_events","type":"User","site_admin":false},"body":"maybe link to the session property documentation","created_at":"2016-04-29T19:07:12Z","updated_at":"2016-04-29T19:07:12Z","html_url":"https://github.com/prestodb/presto/pull/5161#discussion_r61630150","pull_request_url":"https://api.github.com/repos/prestodb/presto/pulls/5161","_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments/61630150"},"html":{"href":"https://github.com/prestodb/presto/pull/5161#discussion_r61630150"},"pull_request":{"href":"https://api.github.com/repos/prestodb/presto/pulls/5161"}}},"pull_request":{"url":"https://api.github.com/repos/prestodb/presto/pulls/5161","id":68417560,"html_url":"https://github.com/prestodb/presto/pull/5161","diff_url":"https://github.com/prestodb/presto/pull/5161.diff","patch_url":"https://github.com/prestodb/presto/pull/5161.patch","issue_url":"https://api.github.com/repos/prestodb/presto/issues/5161","number":5161,"state":"open","locked":false,"title":"Add docs for resource groups","user":{"login":"cberner","id":842688,"avatar_url":"https://avatars.githubusercontent.com/u/842688?v=3","gravatar_id":"","url":"https://api.github.com/users/cberner","html_url":"https://github.com/cberner","followers_url":"https://api.github.com/users/cberner/followers","following_url":"https://api.github.com/users/cberner/following{/other_user}","gists_url":"https://api.github.com/users/cberner/gists{/gist_id}","starred_url":"https://api.github.com/users/cberner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cberner/subscriptions","organizations_url":"https://api.github.com/users/cberner/orgs","repos_url":"https://api.github.com/users/cberner/repos","events_url":"https://api.github.com/users/cberner/events{/privacy}","received_events_url":"https://api.github.com/users/cberner/received_events","type":"User","site_admin":false},"body":"Also clean up the selector code","created_at":"2016-04-29T18:56:06Z","updated_at":"2016-04-29T19:07:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef369fbd0955ffa5a6e321632fcb7ae9db54b375","assignee":{"login":"dain","id":58298,"avatar_url":"https://avatars.githubusercontent.com/u/58298?v=3","gravatar_id":"","url":"https://api.github.com/users/dain","html_url":"https://github.com/dain","followers_url":"https://api.github.com/users/dain/followers","following_url":"https://api.github.com/users/dain/following{/other_user}","gists_url":"https://api.github.com/users/dain/gists{/gist_id}","starred_url":"https://api.github.com/users/dain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dain/subscriptions","organizations_url":"https://api.github.com/users/dain/orgs","repos_url":"https://api.github.com/users/dain/repos","events_url":"https://api.github.com/users/dain/events{/privacy}","received_events_url":"https://api.github.com/users/dain/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/prestodb/presto/pulls/5161/commits","review_comments_url":"https://api.github.com/repos/prestodb/presto/pulls/5161/comments","review_comment_url":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}","comments_url":"https://api.github.com/repos/prestodb/presto/issues/5161/comments","statuses_url":"https://api.github.com/repos/prestodb/presto/statuses/5e37590dd0a619665ea78a56c436343632f8e195","head":{"label":"cberner:resource_groups","ref":"resource_groups","sha":"5e37590dd0a619665ea78a56c436343632f8e195","user":{"login":"cberner","id":842688,"avatar_url":"https://avatars.githubusercontent.com/u/842688?v=3","gravatar_id":"","url":"https://api.github.com/users/cberner","html_url":"https://github.com/cberner","followers_url":"https://api.github.com/users/cberner/followers","following_url":"https://api.github.com/users/cberner/following{/other_user}","gists_url":"https://api.github.com/users/cberner/gists{/gist_id}","starred_url":"https://api.github.com/users/cberner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cberner/subscriptions","organizations_url":"https://api.github.com/users/cberner/orgs","repos_url":"https://api.github.com/users/cberner/repos","events_url":"https://api.github.com/users/cberner/events{/privacy}","received_events_url":"https://api.github.com/users/cberner/received_events","type":"User","site_admin":false},"repo":{"id":10272630,"name":"presto","full_name":"cberner/presto","owner":{"login":"cberner","id":842688,"avatar_url":"https://avatars.githubusercontent.com/u/842688?v=3","gravatar_id":"","url":"https://api.github.com/users/cberner","html_url":"https://github.com/cberner","followers_url":"https://api.github.com/users/cberner/followers","following_url":"https://api.github.com/users/cberner/following{/other_user}","gists_url":"https://api.github.com/users/cberner/gists{/gist_id}","starred_url":"https://api.github.com/users/cberner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cberner/subscriptions","organizations_url":"https://api.github.com/users/cberner/orgs","repos_url":"https://api.github.com/users/cberner/repos","events_url":"https://api.github.com/users/cberner/events{/privacy}","received_events_url":"https://api.github.com/users/cberner/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cberner/presto","description":"","fork":true,"url":"https://api.github.com/repos/cberner/presto","forks_url":"https://api.github.com/repos/cberner/presto/forks","keys_url":"https://api.github.com/repos/cberner/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cberner/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cberner/presto/teams","hooks_url":"https://api.github.com/repos/cberner/presto/hooks","issue_events_url":"https://api.github.com/repos/cberner/presto/issues/events{/number}","events_url":"https://api.github.com/repos/cberner/presto/events","assignees_url":"https://api.github.com/repos/cberner/presto/assignees{/user}","branches_url":"https://api.github.com/repos/cberner/presto/branches{/branch}","tags_url":"https://api.github.com/repos/cberner/presto/tags","blobs_url":"https://api.github.com/repos/cberner/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cberner/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cberner/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/cberner/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cberner/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/cberner/presto/languages","stargazers_url":"https://api.github.com/repos/cberner/presto/stargazers","contributors_url":"https://api.github.com/repos/cberner/presto/contributors","subscribers_url":"https://api.github.com/repos/cberner/presto/subscribers","subscription_url":"https://api.github.com/repos/cberner/presto/subscription","commits_url":"https://api.github.com/repos/cberner/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/cberner/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/cberner/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/cberner/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/cberner/presto/contents/{+path}","compare_url":"https://api.github.com/repos/cberner/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cberner/presto/merges","archive_url":"https://api.github.com/repos/cberner/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cberner/presto/downloads","issues_url":"https://api.github.com/repos/cberner/presto/issues{/number}","pulls_url":"https://api.github.com/repos/cberner/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/cberner/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/cberner/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cberner/presto/labels{/name}","releases_url":"https://api.github.com/repos/cberner/presto/releases{/id}","deployments_url":"https://api.github.com/repos/cberner/presto/deployments","created_at":"2013-05-24T18:37:52Z","updated_at":"2016-03-18T20:43:12Z","pushed_at":"2016-04-29T18:47:09Z","git_url":"git://github.com/cberner/presto.git","ssh_url":"git@github.com:cberner/presto.git","clone_url":"https://github.com/cberner/presto.git","svn_url":"https://github.com/cberner/presto","homepage":null,"size":51165,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"prestodb:master","ref":"master","sha":"253d1d5f6606c56a9b1eaedd9da3127dadc3dae7","user":{"login":"prestodb","id":6882181,"avatar_url":"https://avatars.githubusercontent.com/u/6882181?v=3","gravatar_id":"","url":"https://api.github.com/users/prestodb","html_url":"https://github.com/prestodb","followers_url":"https://api.github.com/users/prestodb/followers","following_url":"https://api.github.com/users/prestodb/following{/other_user}","gists_url":"https://api.github.com/users/prestodb/gists{/gist_id}","starred_url":"https://api.github.com/users/prestodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prestodb/subscriptions","organizations_url":"https://api.github.com/users/prestodb/orgs","repos_url":"https://api.github.com/users/prestodb/repos","events_url":"https://api.github.com/users/prestodb/events{/privacy}","received_events_url":"https://api.github.com/users/prestodb/received_events","type":"Organization","site_admin":false},"repo":{"id":5349565,"name":"presto","full_name":"prestodb/presto","owner":{"login":"prestodb","id":6882181,"avatar_url":"https://avatars.githubusercontent.com/u/6882181?v=3","gravatar_id":"","url":"https://api.github.com/users/prestodb","html_url":"https://github.com/prestodb","followers_url":"https://api.github.com/users/prestodb/followers","following_url":"https://api.github.com/users/prestodb/following{/other_user}","gists_url":"https://api.github.com/users/prestodb/gists{/gist_id}","starred_url":"https://api.github.com/users/prestodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prestodb/subscriptions","organizations_url":"https://api.github.com/users/prestodb/orgs","repos_url":"https://api.github.com/users/prestodb/repos","events_url":"https://api.github.com/users/prestodb/events{/privacy}","received_events_url":"https://api.github.com/users/prestodb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/prestodb/presto","description":"Distributed SQL query engine for big data","fork":false,"url":"https://api.github.com/repos/prestodb/presto","forks_url":"https://api.github.com/repos/prestodb/presto/forks","keys_url":"https://api.github.com/repos/prestodb/presto/keys{/key_id}","collaborators_url":"https://api.github.com/repos/prestodb/presto/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/prestodb/presto/teams","hooks_url":"https://api.github.com/repos/prestodb/presto/hooks","issue_events_url":"https://api.github.com/repos/prestodb/presto/issues/events{/number}","events_url":"https://api.github.com/repos/prestodb/presto/events","assignees_url":"https://api.github.com/repos/prestodb/presto/assignees{/user}","branches_url":"https://api.github.com/repos/prestodb/presto/branches{/branch}","tags_url":"https://api.github.com/repos/prestodb/presto/tags","blobs_url":"https://api.github.com/repos/prestodb/presto/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/prestodb/presto/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/prestodb/presto/git/refs{/sha}","trees_url":"https://api.github.com/repos/prestodb/presto/git/trees{/sha}","statuses_url":"https://api.github.com/repos/prestodb/presto/statuses/{sha}","languages_url":"https://api.github.com/repos/prestodb/presto/languages","stargazers_url":"https://api.github.com/repos/prestodb/presto/stargazers","contributors_url":"https://api.github.com/repos/prestodb/presto/contributors","subscribers_url":"https://api.github.com/repos/prestodb/presto/subscribers","subscription_url":"https://api.github.com/repos/prestodb/presto/subscription","commits_url":"https://api.github.com/repos/prestodb/presto/commits{/sha}","git_commits_url":"https://api.github.com/repos/prestodb/presto/git/commits{/sha}","comments_url":"https://api.github.com/repos/prestodb/presto/comments{/number}","issue_comment_url":"https://api.github.com/repos/prestodb/presto/issues/comments{/number}","contents_url":"https://api.github.com/repos/prestodb/presto/contents/{+path}","compare_url":"https://api.github.com/repos/prestodb/presto/compare/{base}...{head}","merges_url":"https://api.github.com/repos/prestodb/presto/merges","archive_url":"https://api.github.com/repos/prestodb/presto/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/prestodb/presto/downloads","issues_url":"https://api.github.com/repos/prestodb/presto/issues{/number}","pulls_url":"https://api.github.com/repos/prestodb/presto/pulls{/number}","milestones_url":"https://api.github.com/repos/prestodb/presto/milestones{/number}","notifications_url":"https://api.github.com/repos/prestodb/presto/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/prestodb/presto/labels{/name}","releases_url":"https://api.github.com/repos/prestodb/presto/releases{/id}","deployments_url":"https://api.github.com/repos/prestodb/presto/deployments","created_at":"2012-08-09T01:03:37Z","updated_at":"2016-04-29T17:33:59Z","pushed_at":"2016-04-29T18:56:06Z","git_url":"git://github.com/prestodb/presto.git","ssh_url":"git@github.com:prestodb/presto.git","clone_url":"https://github.com/prestodb/presto.git","svn_url":"https://github.com/prestodb/presto","homepage":"https://prestodb.io","size":150014,"stargazers_count":4705,"watchers_count":4705,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1368,"mirror_url":null,"open_issues_count":559,"forks":1368,"open_issues":559,"watchers":4705,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/prestodb/presto/pulls/5161"},"html":{"href":"https://github.com/prestodb/presto/pull/5161"},"issue":{"href":"https://api.github.com/repos/prestodb/presto/issues/5161"},"comments":{"href":"https://api.github.com/repos/prestodb/presto/issues/5161/comments"},"review_comments":{"href":"https://api.github.com/repos/prestodb/presto/pulls/5161/comments"},"review_comment":{"href":"https://api.github.com/repos/prestodb/presto/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/prestodb/presto/pulls/5161/commits"},"statuses":{"href":"https://api.github.com/repos/prestodb/presto/statuses/5e37590dd0a619665ea78a56c436343632f8e195"}}}}