Gyula Fora created FLINK-16402:
----------------------------------
Summary: Alter table fails on Hive catalog
Key: FLINK-16402
URL: https://issues.apache.org/jira/browse/FLINK-16402
Project: Flink
Issue Type: Bug
Components: Table SQL / Client
Affects Versions: 1.10.0
Reporter: Gyula Fora
Hive version: 3.1.0
I get the following error when trying to execute a simple alter table statement:
{code:java}
ALTER TABLE ItemTransactions
SET (
'connector.properties.bootstrap.servers' = 'gyula-1.gce.cloudera.com:9092'
);
{code}
{code:java}
Caused by: org.apache.flink.table.api.TableException: Could not execute ALTER
TABLE hive.default.ItemTransactions SET
(connector.properties.zookeeper.connect: [dummy], connector.version:
[universal], format.schema: [ROW(transactionId LONG, ts LONG, itemId STRING,
quantity INT)], connector.topic: [transaction.log.1], is_generic: [true],
connector.startup-mode: [earliest-offset], connector.type: [kafka],
connector.properties.bootstrap.servers: [gyula-1.gce.cloudera.com:9092],
connector.properties.group.id: [testGroup], format.type: [json])Caused by:
org.apache.flink.table.api.TableException: Could not execute ALTER TABLE
hive.default.ItemTransactions SET (connector.properties.zookeeper.connect:
[dummy], connector.version: [universal], format.schema: [ROW(transactionId
LONG, ts LONG, itemId STRING, quantity INT)], connector.topic:
[transaction.log.1], is_generic: [true], connector.startup-mode:
[earliest-offset], connector.type: [kafka],
connector.properties.bootstrap.servers: [gyula-1.gce.cloudera.com:9092],
connector.properties.group.id: [testGroup], format.type: [json]) at
org.apache.flink.table.api.internal.TableEnvironmentImpl.sqlUpdate(TableEnvironmentImpl.java:545)
at
org.apache.flink.table.api.java.internal.StreamTableEnvironmentImpl.sqlUpdate(StreamTableEnvironmentImpl.java:331)
at
org.apache.flink.table.client.gateway.local.LocalExecutor.lambda$applyUpdate$17(LocalExecutor.java:690)
at
org.apache.flink.table.client.gateway.local.ExecutionContext.wrapClassLoader(ExecutionContext.java:240)
at
org.apache.flink.table.client.gateway.local.LocalExecutor.applyUpdate(LocalExecutor.java:688)
... 9 moreCaused by:
org.apache.flink.table.catalog.exceptions.CatalogException: Failed to rename
table default.ItemTransactions at
org.apache.flink.table.catalog.hive.HiveCatalog.alterTable(HiveCatalog.java:433)
at
org.apache.flink.table.api.internal.TableEnvironmentImpl.sqlUpdate(TableEnvironmentImpl.java:537)
... 13 moreCaused by: MetaException(message:A managed table's location needs
to be under the hive warehouse root
directory,table:ItemTransactions,location:/warehouse/tablespace/external/hive/itemtransactions,Hive
warehouse:/warehouse/tablespace/managed/hive) at
org.apache.hadoop.hive.metastore.api.ThriftHiveMetastore$alter_table_req_result$alter_table_req_resultStandardScheme.read(ThriftHiveMetastore.java)
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)