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

Sergey Shelukhin commented on HIVE-18457:
-----------------------------------------

Updated the output.

I'm not sure why it doesn't look like the flag is updated... seems to work fine 
in derby. Are there any errors from alter? we might need to investigate why DN 
won't update the table if this reproes.

> improve show plan output (triggers, mappings)
> ---------------------------------------------
>
>                 Key: HIVE-18457
>                 URL: https://issues.apache.org/jira/browse/HIVE-18457
>             Project: Hive
>          Issue Type: Sub-task
>    Affects Versions: 3.0.0
>            Reporter: Prasanth Jayachandran
>            Assignee: Sergey Shelukhin
>            Priority: Major
>         Attachments: HIVE-18457.patch
>
>
> Did the following sequence to add triggers to UNMANAGED. I can see the 
> triggers added to metastore by IS_IN_UNAMANGED flag is not set in metastore. 
> Also show resource plans does not show triggers in unmanaged pool.
> {code}
> 0: jdbc:hive2://localhost:10000> show resource plans;
> +----------+----------+--------------------+
> | rp_name  |  status  | query_parallelism  |
> +----------+----------+--------------------+
> | global   | ACTIVE   | NULL               |
> | llap     | ENABLED  | NULL               |
> +----------+----------+--------------------+
> 0: jdbc:hive2://localhost:10000>ALTER RESOURCE PLAN llap ACTIVATE;
> 0: jdbc:hive2://localhost:10000>ALTER RESOURCE PLAN global DISABLE;
> 0: jdbc:hive2://localhost:10000>CREATE TRIGGER global.highly_parallel WHEN 
> TOTAL_TASKS > 40 DO KILL;
> 0: jdbc:hive2://localhost:10000>ALTER TRIGGER global.highly_parallel ADD TO 
> UNMANAGED;
> 0: jdbc:hive2://localhost:10000>CREATE TRIGGER global.big_hdfs_read WHEN 
> HDFS_BYTES_READ > 3000000000 DO KILL;
> 0: jdbc:hive2://localhost:10000>ALTER TRIGGER global.big_hdfs_read ADD TO 
> UNMANAGED;
> 0: jdbc:hive2://localhost:10000>CREATE TRIGGER global.slow_query WHEN 
> EXECUTION_TIME > 100000 DO KILL;
> 0: jdbc:hive2://localhost:10000>ALTER TRIGGER global.slow_query ADD TO 
> UNMANAGED;
> 0: jdbc:hive2://localhost:10000>CREATE TRIGGER global.some_spills WHEN 
> SPILLED_RECORDS > 10 DO KILL;
> 0: jdbc:hive2://localhost:10000>ALTER TRIGGER global.some_spills ADD TO 
> UNMANAGED;
> 0: jdbc:hive2://localhost:10000>ALTER RESOURCE PLAN global ENABLE;
> 0: jdbc:hive2://localhost:10000>ALTER RESOURCE PLAN global ACTIVATE;
> 0: jdbc:hive2://localhost:10000> show resource plan global;
> +----------------------------------------------------+
> |                        line                        |
> +----------------------------------------------------+
> | global[status=ACTIVE,parallelism=null,defaultPool=default] |
> |     default[allocFraction=1.0,schedulingPolicy=null,parallelism=4] |
> +----------------------------------------------------+
> {code}
> {code:title=mysql}
> mysql> select * from wm_trigger;
> +------------+-------+-----------------+------------------------------+-------------------+-----------------+
> | TRIGGER_ID | RP_ID | NAME            | TRIGGER_EXPRESSION           | 
> ACTION_EXPRESSION | IS_IN_UNMANAGED |
> +------------+-------+-----------------+------------------------------+-------------------+-----------------+
> |         29 |     1 | highly_parallel | TOTAL_TASKS > 40             | KILL  
>             |                |
> |         33 |     1 | big_hdfs_read   | HDFS_BYTES_READ > 3000000000 | KILL  
>             |                |
> |         34 |     1 | slow_query      | EXECUTION_TIME > 100000      | KILL  
>             |                |
> |         35 |     1 | some_spills     | SPILLED_RECORDS > 10         | KILL  
>             |                |
> +------------+-------+-----------------+------------------------------+-------------------+-----------------+
> {code}
> From the above mysql table, IS_IN_UNMANAGED is not set and 'show resource 
> plan global' is not showing triggers defined in unmanaged pool. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to