You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Stamatis Zampetakis (Jira)" <ji...@apache.org> on 2022/10/21 07:32:01 UTC

[jira] [Updated] (HIVE-25221) Hive Beeline & CLI: execute alter table comamnd With Error: Unable to alter partitions because table or database does not exist

     [ https://issues.apache.org/jira/browse/HIVE-25221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stamatis Zampetakis updated HIVE-25221:
---------------------------------------
    Fix Version/s:     (was: 2.3.9)

I cleared the fixVersion field since this ticket is not resolved. Please review this ticket and if the fix is already committed to a specific version please set the version accordingly and mark the ticket as RESOLVED.

According to the JIRA guidelines (https://cwiki.apache.org/confluence/display/Hive/HowToContribute) the fixVersion should be set only when the issue is resolved/closed.

> Hive Beeline & CLI: execute alter table comamnd With Error: Unable to alter partitions because table or database does not exist
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-25221
>                 URL: https://issues.apache.org/jira/browse/HIVE-25221
>             Project: Hive
>          Issue Type: Bug
>          Components: Beeline, CLI
>    Affects Versions: 2.3.7, 2.3.8
>            Reporter: XixiHua
>            Assignee: XixiHua
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Use Hive Beeline and CLI to execute the following command:
>  
> {code:java}
> alter table xxx.xxx partition(xxx) set location 'xxx';{code}
>  
> If don't execute +*use <schema>*+ first, there will fail with the error: 
>  Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. Unable to alter partition. Unable to alter partitions because table or database does not exist. even if the table does exist.
> and more info:
> {code:java}
> 2021-06-08T07:37:21,596 ERROR [pool-6-thread-173] metastore.RetryingHMSHandler: InvalidOperationException(message:Unable to alter partitions because table or database does not exist.)2021-06-08T07:37:21,596 ERROR [pool-6-thread-173] metastore.RetryingHMSHandler: InvalidOperationException(message:Unable to alter partitions because table or database does not exist.) at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.alter_partitions_with_environment_context(HiveMetaStore.java:3908) at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:148) at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:107) at com.sun.proxy.$Proxy27.alter_partitions_with_environment_context(Unknown Source) at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$alter_partitions_with_environment_context.getResult(ThriftHiveMetastore.java:12598) at org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$Processor$alter_partitions_with_environment_context.getResult(ThriftHiveMetastore.java:12582) at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) at org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:110) at org.apache.hadoop.hive.metastore.TUGIBasedProcessor$1.run(TUGIBasedProcessor.java:106) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:422) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1698) at org.apache.hadoop.hive.metastore.TUGIBasedProcessor.process(TUGIBasedProcessor.java:118) at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:286) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
> {code}
> but when execute add/drop partition, don't need to follow this mode.
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)