[
https://issues.apache.org/jira/browse/HIVE-18152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16269798#comment-16269798
]
Sergey Shelukhin commented on HIVE-18152:
-----------------------------------------
Hmm... it seems unnecessary to return the RP when the status did not change.
Cannot the check just be performed, with a better error message, in metastore
(ObjectStore) instead? That way it would also be inside a txn.
> 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)