Currently, we specify resource groups via a config file but we are now transitioning to specifying via database through the implementation of a CRUD API. The purpose of this change is to improve the overall time used to update resource groups. Previously, redeployment was necessary every time we needed to make a change (big or small) to the resource groups.
First, I implemented the backend by creating dao files for each of these four tables (resource_groups, selectors, resource_groups_global_properties, exact_source_match_selectors), integrating them to the API file, and writing unit tests for all dao files. Next, I created separate CRUD APIs for each table in PrestoResource.java and tested them in the local Presto Gateway environment using CURL commands & Postman (specified in the README).
In this PR, I decided to not include API calls to the Exact Source Match Selectors table, since this table does not seem to be used at Lyft as of now (the backend code I had for this table is written and/or commented out).
Currently, we specify resource groups via a config file but we are now transitioning to specifying via database through the implementation of a CRUD API. The purpose of this change is to improve the overall time used to update resource groups. Previously, redeployment was necessary every time we needed to make a change (big or small) to the resource groups.
First, I implemented the backend by creating dao files for each of these four tables (resource_groups, selectors, resource_groups_global_properties, exact_source_match_selectors), integrating them to the API file, and writing unit tests for all dao files. Next, I created separate CRUD APIs for each table in PrestoResource.java and tested them in the local Presto Gateway environment using CURL commands & Postman (specified in the README).
In this PR, I decided to not include API calls to the Exact Source Match Selectors table, since this table does not seem to be used at Lyft as of now (the backend code I had for this table is written and/or commented out).
Table Schemas: https://github.com/lyft/presto/blob/master/presto-resource-group-managers/src/test/java/io/prestosql/plugin/resourcegroups/db/H2ResourceGroupsDao.java
JIRA Descriptions: Resource Groups: https://jira.lyft.net/browse/DATA-10162 Selectors: https://jira.lyft.net/browse/DATA-10164 Global Properties: https://jira.lyft.net/browse/DATA-10163 Exact Source Match Selectors: https://jira.lyft.net/browse/DATA-10165
The previous two PRs I made are https://github.com/lyft/presto-gateway/pull/112 and https://github.com/lyft/presto-gateway/pull/113.