From 6d749f9e91e8ef74aaed288646c93982b8c74666 Mon Sep 17 00:00:00 2001 From: "kedia,Akanksha" Date: Mon, 29 Jan 2024 14:26:01 +0530 Subject: [PATCH] Remove erroneous resource group documentation --- .../sphinx/admin/resource-groups-example1.sql | 3 --- .../src/main/sphinx/admin/resource-groups.rst | 27 +++++++++---------- .../admin/resources-groups-example.json | 4 --- 3 files changed, 12 insertions(+), 22 deletions(-) diff --git a/presto-docs/src/main/sphinx/admin/resource-groups-example1.sql b/presto-docs/src/main/sphinx/admin/resource-groups-example1.sql index 6b424a760023..49efc84e97d7 100644 --- a/presto-docs/src/main/sphinx/admin/resource-groups-example1.sql +++ b/presto-docs/src/main/sphinx/admin/resource-groups-example1.sql @@ -36,9 +36,6 @@ CREATE TABLE IF NOT EXISTS resource_groups ( INSERT INTO resource_groups (name, soft_memory_limit, hard_concurrency_limit, max_queued, jmx_export) VALUES ('global', '80%', 100, 1000, true); -INSERT INTO resource_groups (name, soft_memory_limit, hard_concurrency_limit, max_queued, jmx_export, parent_id) -VALUES ('user', '50%', 50, 500, false, LAST_INSERT_ID()); - CREATE TABLE IF NOT EXISTS selectors ( id BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY, resource_group_id BIGINT NOT NULL, diff --git a/presto-docs/src/main/sphinx/admin/resource-groups.rst b/presto-docs/src/main/sphinx/admin/resource-groups.rst index 6ee1dc308a13..d4c0196e6a6f 100644 --- a/presto-docs/src/main/sphinx/admin/resource-groups.rst +++ b/presto-docs/src/main/sphinx/admin/resource-groups.rst @@ -248,8 +248,6 @@ Here are the key components of selector rules in PrestoDB: * ``user`` (optional): This is a regular expression that matches the user who is submitting the query. -* ``userGroup`` (optional): Regex to match against every user group the user belongs to. - * ``source`` (optional): This matches the source of the query, which is typically the application submitting the query. @@ -321,30 +319,29 @@ There are four selectors, that define which queries run in which resource group: * The first selector matches queries from ``bob`` and places them in the admin group. -* The second selector matches queries from ``admin`` user group and places them in the admin group. - -* The third selector matches all data definition (DDL) queries from a source name that includes ``pipeline`` +* The second selector matches all data definition (DDL) queries from a source name that includes ``pipeline`` and places them in the ``global.data_definition`` group. This could help reduce queue times for this class of queries, since they are expected to be fast. -* The fourth selector matches queries from a source name that includes ``pipeline``, and places them in a +* The third selector matches queries from a source name that includes ``pipeline``, and places them in a dynamically-created per-user pipeline group under the ``global.pipeline`` group. -* The fifth selector matches queries that come from BI tools which have a source matching the regular - expression ``jdbc#(?.*)`` and have client provided tags that are a superset of ``hipri``. - These are placed in a dynamically-created sub-group under the ``global.adhoc`` group. - The dynamic sub-groups are created based on the values of named variables ``toolname`` and ``user``. - The values are derived from the source regular expression and the query user respectively. - Consider a query with a source ``jdbc#powerfulbi``, user ``kayla``, and client tags ``hipri`` and ``fast``. - This query is routed to the ``global.adhoc.bi-powerfulbi.kayla`` resource group. +* The fourth selector matches queries that come from BI tools which have a source matching the regular + expression ``jdbc#(?.*)``, and have client provided tags that are a superset of ``hi-pri``. + These are placed in a dynamically-created sub-group under the ``global.pipeline.tools`` group. The dynamic + sub-group is created based on the named variable ``toolname``, which is extracted from the + regular expression for source. + + Consider a query with a source ``jdbc#powerfulbi``, user ``kayla``, and + client tags ``hipri`` and ``fast``. This query is routed to the ``global.pipeline.bi-powerfulbi.kayla`` + resource group. * The last selector is a catch-all, which places all queries that have not yet been matched into a per-user adhoc group. Together, these selectors implement the following policy: -* The user ``bob`` and any user belonging to user group ``admin`` - is an admin and can run up to 50 concurrent queries. +* The user ``bob`` is an admin and can run up to 50 concurrent queries. Queries will be run based on user-provided priority. For the remaining users: diff --git a/presto-docs/src/main/sphinx/admin/resources-groups-example.json b/presto-docs/src/main/sphinx/admin/resources-groups-example.json index 15883923f2fa..e361e21b7660 100644 --- a/presto-docs/src/main/sphinx/admin/resources-groups-example.json +++ b/presto-docs/src/main/sphinx/admin/resources-groups-example.json @@ -88,10 +88,6 @@ "user": "bob", "group": "admin" }, - { - "userGroup": "admin", - "group": "admin" - }, { "source": ".*pipeline.*", "queryType": "DATA_DEFINITION",