Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-16402

Alter table fails on Hive catalog

    XMLWordPrintableJSON

Details

    Description

      Hive version: 3.1.0

      I get the following error when trying to execute a simple alter table statement:

       

      ALTER TABLE ItemTransactions 
      SET (
       'connector.properties.bootstrap.servers' = 'gyula-1.gce.cloudera.com:9092'
      );
      
      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)
      

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            gyfora Gyula Fora
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: