You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Prasanth Jayachandran (JIRA)" <ji...@apache.org> on 2017/11/29 01:35:00 UTC

[jira] [Comment Edited] (HIVE-18152) Idempotent state change for resource plan

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

Prasanth Jayachandran edited comment on HIVE-18152 at 11/29/17 1:34 AM:
------------------------------------------------------------------------

This is not frequent case anyway. Also this looks simpler. Doing it in ObjectStore will require special handling (new exception type or peek into message of already existing invalid exception), also thrift response has to updated to differentiate null vs empty RP case, where empty being no change to status. Based on WMAlterResourcePlanResponse, there has to be another change WMFullResourcePlan to differentiate no status change vs error case (returning null). Not much benefit doing so IMHO.


was (Author: prasanth_j):
This is not frequent case anyway. Also this looks simpler. Doing it in ObjectStore will require special handling (new exception type or peek into message of already existing invalid exception), also thrift response has to updated to different null vs empty RP case, where empty being no change to status. Based on WMAlterResourcePlanResponse, there has to be another change WMFullResourcePlan to differentiate no status change vs error case (returning null). Not much benefit doing so IMHO.

> Idempotent state change for resource plan
> -----------------------------------------
>
>                 Key: HIVE-18152
>                 URL: https://issues.apache.org/jira/browse/HIVE-18152
>             Project: Hive
>          Issue Type: Sub-task
>    Affects Versions: 3.0.0
>            Reporter: Prasanth Jayachandran
>            Assignee: Prasanth Jayachandran
>         Attachments: HIVE-18152.1.patch
>
>
> {code}
> show resource plans;
> +----------+----------+--------------------+
> | rp_name  |  status  | query_parallelism  |
> +----------+----------+--------------------+
> | llap     | ACTIVE   | 1                  |
> | global   | ENABLED  | 1                  |
> +----------+----------+--------------------+
> ALTER RESOURCE PLAN llap ACTIVATE;
> Error: Error while processing statement: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Cannot get a resource plan to apply (state=08S01,code=1)
> {code}
> It is better not to throw an error when current state is same as the altered state.



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