Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.0.0-alpha-1, 4.0.0-alpha-2
Description
I test with example dataconnector_mysql.q. When I execute show tables from remote database, it failed with WARN log:
2022-04-27T16:52:34,696 WARN [Metastore-Handler-Pool: Thread-48] jdbc.AbstractJDBCConnectorProvider: Driver class not found in classpath:org.mariadb.jdbc.Driver 2022-04-27T16:52:34,698 WARN [Metastore-Handler-Pool: Thread-48] metastore.HMSHandler: Unexpected exception while getting table(s) in remote database db_mysql org.apache.hadoop.hive.metastore.api.MetaException: Could not instantiate a provider for database db_mysql
And so I add mariadb-java-client-2.5.0.jar to hive lib, It is ok to show tables from remote database, but this leads to failure on native database:
2022-04-27T17:01:38,763 ERROR [Metastore-Handler-Pool: Thread-43] Datastore.Schema: An exception was thrown while adding/validating class(es) : Table "columns_v2" has been specified with a primary-key to include column "CD_ID" but this column is not found in the table. Please check your <primary-key> column specification. Table "columns_v2" has been specified with a primary-key to include column "CD_ID" but this column is not found in the table. Please check your <primary-key> column specification. org.datanucleus.exceptions.NucleusUserException: Table "columns_v2" has been specified with a primary-key to include column "CD_ID" but this column is not found in the table. Please check your <primary-key> column specification. at org.datanucleus.store.rdbms.table.ElementContainerTable.applyUserPrimaryKeySpecification(ElementContainerTable.java:225) at org.datanucleus.store.rdbms.table.CollectionTable.initialize(CollectionTable.java:235) at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.initializeClassTables(RDBMSStoreManager.java:3318) at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.run(RDBMSStoreManager.java:2938) at org.datanucleus.store.rdbms.AbstractSchemaTransaction.execute(AbstractSchemaTransaction.java:118)
If I change MySQLConnectorProvider driver from mariadb to mysql, It's good to both remote mysql database and native database.
Attachments
Issue Links
- links to