[ 
https://issues.apache.org/jira/browse/HIVE-17508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16183188#comment-16183188
 ] 

Prasanth Jayachandran commented on HIVE-17508:
----------------------------------------------

Sure. Will fix the findFirst so that it can handle multiple rules for same 
variable/counter.

.2 patch just did that. The only parsing it does it figure out what type of 
counter it is (time vs fs), also validate the value which has to happen even if 
we just split by '>'.
.3 patch added more sugar to counter value to make it more generic which also 
uses the HiveConf's size and time validators. So I would say it is already 
primitive :) I agree we should use antlr for much better validation and 
parsing. Will definitely take it up in the follow up.


> Implement pool rules and triggers based on counters
> ---------------------------------------------------
>
>                 Key: HIVE-17508
>                 URL: https://issues.apache.org/jira/browse/HIVE-17508
>             Project: Hive
>          Issue Type: Sub-task
>    Affects Versions: 3.0.0
>            Reporter: Prasanth Jayachandran
>            Assignee: Prasanth Jayachandran
>         Attachments: HIVE-17508.1.patch, HIVE-17508.2.patch, 
> HIVE-17508.3.patch, HIVE-17508.3.patch, HIVE-17508.WIP.2.patch, 
> HIVE-17508.WIP.patch
>
>
> Workload management can defined Rules that are bound to a resource plan. Each 
> rule can have a trigger expression and an action associated with it. Trigger 
> expressions are evaluated at runtime after configurable check interval, based 
> on which actions like killing a query, moving a query to different pool etc. 
> will get invoked. Simple rule could be something like
> {code}
> CREATE RULE slow_query IN resource_plan_name
> WHEN execution_time_ms > 10000
> MOVE TO slow_queue
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to