[ https://issues.apache.org/jira/browse/HIVE-25221?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
XixiHua reassigned HIVE-25221: ------------------------------ > Hive 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: CLI > Affects Versions: 2.3.8, 2.3.7 > Reporter: XixiHua > Assignee: XixiHua > Priority: Major > > Use Hive 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.3.4#803005)