hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HIVE-21463) Table "partition_keys" has been specified with a primary-key to include column "TBL_ID"
Date Thu, 21 Mar 2019 08:50:00 GMT

    [ https://issues.apache.org/jira/browse/HIVE-21463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16797922#comment-16797922
] 

Andy edited comment on HIVE-21463 at 3/21/19 8:49 AM:
------------------------------------------------------

The same question

Hadoop 3.1.2   Hive3.0.0&Hive3.1.1
{code:java}
Caused by: org.datanucleus.exceptions.NucleusUserException: Table "partition_keys" has been
specified with a primary-key to include column "TBL_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)
~[datanucleus-rdbms-4.1.19.jar:?]
at org.datanucleus.store.rdbms.table.CollectionTable.initialize(CollectionTable.java:235)
~[datanucleus-rdbms-4.1.19.jar:?]
at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.initializeClassTables(RDBMSStoreManager.java:3279)
~[datanucleus-rdbms-4.1.19.jar:?]
at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.run(RDBMSStoreManager.java:2889)
~[datanucleus-rdbms-4.1.19.jar:?]
at org.datanucleus.store.rdbms.AbstractSchemaTransaction.execute(AbstractSchemaTransaction.java:119)
~[datanucleus-rdbms-4.1.19.jar:?]
at org.datanucleus.store.rdbms.RDBMSStoreManager.manageClasses(RDBMSStoreManager.java:1627)
~[datanucleus-rdbms-4.1.19.jar:?]
at org.datanucleus.store.rdbms.RDBMSStoreManager.getDatastoreClass(RDBMSStoreManager.java:672)
~[datanucleus-rdbms-4.1.19.jar:?]
at org.datanucleus.store.rdbms.RDBMSStoreManager.getPropertiesForGenerator(RDBMSStoreManager.java:2088)
~[datanucleus-rdbms-4.1.19.jar:?]
at org.datanucleus.store.AbstractStoreManager.getStrategyValue(AbstractStoreManager.java:1271)
~[datanucleus-core-4.1.17.jar:?]
at org.datanucleus.ExecutionContextImpl.newObjectId(ExecutionContextImpl.java:3760) ~[datanucleus-core-4.1.17.jar:?]
at org.datanucleus.state.StateManagerImpl.setIdentity(StateManagerImpl.java:2267) ~[datanucleus-core-4.1.17.jar:?]
at org.datanucleus.state.StateManagerImpl.initialiseForPersistentNew(StateManagerImpl.java:484)
~[datanucleus-core-4.1.17.jar:?]
at org.datanucleus.state.StateManagerImpl.initialiseForPersistentNew(StateManagerImpl.java:120)
~[datanucleus-core-4.1.17.jar:?]
at org.datanucleus.state.ObjectProviderFactoryImpl.newForPersistentNew(ObjectProviderFactoryImpl.java:218)
~[datanucleus-core-4.1.17.jar:?]
at org.datanucleus.ExecutionContextImpl.persistObjectInternal(ExecutionContextImpl.java:2079)
~[datanucleus-core-4.1.17.jar:?]
at org.datanucleus.ExecutionContextImpl.persistObjectWork(ExecutionContextImpl.java:1923)
~[datanucleus-core-4.1.17.jar:?]
at org.datanucleus.ExecutionContextImpl.persistObject(ExecutionContextImpl.java:1778) ~[datanucleus-core-4.1.17.jar:?]
at org.datanucleus.ExecutionContextThreadedImpl.persistObject(ExecutionContextThreadedImpl.java:217)
~[datanucleus-core-4.1.17.jar:?]
at org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:724)
~[datanucleus-api-jdo-4.2.4.jar:?]
at org.datanucleus.api.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:749)
~[datanucleus-api-jdo-4.2.4.jar:?]
at org.apache.hadoop.hive.metastore.ObjectStore.createTable(ObjectStore.java:1301) ~[hive-exec-3.0.0.jar:3.0.0]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_66]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_66]
at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_66]
at org.apache.hadoop.hive.metastore.RawStoreProxy.invoke(RawStoreProxy.java:97) ~[hive-exec-3.0.0.jar:3.0.0]
at com.sun.proxy.$Proxy36.createTable(Unknown Source) ~[?:?]
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_core(HiveMetaStore.java:1824)
~[hive-exec-3.0.0.jar:3.0.0]
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_core(HiveMetaStore.java:1724)
~[hive-exec-3.0.0.jar:3.0.0]
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(HiveMetaStore.java:1952)
~[hive-exec-3.0.0.jar:3.0.0]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_66]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_66]
at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_66]
at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:147)
~[hive-exec-3.0.0.jar:3.0.0]
at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:108)
~[hive-exec-3.0.0.jar:3.0.0]
at com.sun.proxy.$Proxy38.create_table_with_environment_context(Unknown Source) ~[?:?]
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.create_table_with_environment_context(HiveMetaStoreClient.java:2857)
~[hive-exec-3.0.0.jar:3.0.0]
at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.create_table_with_environment_context(SessionHiveMetaStoreClient.java:121)
~[hive-exec-3.0.0.jar:3.0.0]
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable(HiveMetaStoreClient.java:826)
~[hive-exec-3.0.0.jar:3.0.0]
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable(HiveMetaStoreClient.java:811)
~[hive-exec-3.0.0.jar:3.0.0]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_66]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_66]
at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_66]
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:212)
~[hive-exec-3.0.0.jar:3.0.0]
at com.sun.proxy.$Proxy39.createTable(Unknown Source) ~[?:?]
at org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:926) ~[hive-exec-3.0.0.jar:3.0.0]
... 24 more
{code}


was (Author: andyruby):
The same question

Hadoop 3.1.2   Hive3.1.1
{code:java}
Caused by: org.datanucleus.exceptions.NucleusUserException: Table "partition_keys" has been
specified with a primary-key to include column "TBL_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)
~[datanucleus-rdbms-4.1.19.jar:?]
at org.datanucleus.store.rdbms.table.CollectionTable.initialize(CollectionTable.java:235)
~[datanucleus-rdbms-4.1.19.jar:?]
at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.initializeClassTables(RDBMSStoreManager.java:3279)
~[datanucleus-rdbms-4.1.19.jar:?]
at org.datanucleus.store.rdbms.RDBMSStoreManager$ClassAdder.run(RDBMSStoreManager.java:2889)
~[datanucleus-rdbms-4.1.19.jar:?]
at org.datanucleus.store.rdbms.AbstractSchemaTransaction.execute(AbstractSchemaTransaction.java:119)
~[datanucleus-rdbms-4.1.19.jar:?]
at org.datanucleus.store.rdbms.RDBMSStoreManager.manageClasses(RDBMSStoreManager.java:1627)
~[datanucleus-rdbms-4.1.19.jar:?]
at org.datanucleus.store.rdbms.RDBMSStoreManager.getDatastoreClass(RDBMSStoreManager.java:672)
~[datanucleus-rdbms-4.1.19.jar:?]
at org.datanucleus.store.rdbms.RDBMSStoreManager.getPropertiesForGenerator(RDBMSStoreManager.java:2088)
~[datanucleus-rdbms-4.1.19.jar:?]
at org.datanucleus.store.AbstractStoreManager.getStrategyValue(AbstractStoreManager.java:1271)
~[datanucleus-core-4.1.17.jar:?]
at org.datanucleus.ExecutionContextImpl.newObjectId(ExecutionContextImpl.java:3760) ~[datanucleus-core-4.1.17.jar:?]
at org.datanucleus.state.StateManagerImpl.setIdentity(StateManagerImpl.java:2267) ~[datanucleus-core-4.1.17.jar:?]
at org.datanucleus.state.StateManagerImpl.initialiseForPersistentNew(StateManagerImpl.java:484)
~[datanucleus-core-4.1.17.jar:?]
at org.datanucleus.state.StateManagerImpl.initialiseForPersistentNew(StateManagerImpl.java:120)
~[datanucleus-core-4.1.17.jar:?]
at org.datanucleus.state.ObjectProviderFactoryImpl.newForPersistentNew(ObjectProviderFactoryImpl.java:218)
~[datanucleus-core-4.1.17.jar:?]
at org.datanucleus.ExecutionContextImpl.persistObjectInternal(ExecutionContextImpl.java:2079)
~[datanucleus-core-4.1.17.jar:?]
at org.datanucleus.ExecutionContextImpl.persistObjectWork(ExecutionContextImpl.java:1923)
~[datanucleus-core-4.1.17.jar:?]
at org.datanucleus.ExecutionContextImpl.persistObject(ExecutionContextImpl.java:1778) ~[datanucleus-core-4.1.17.jar:?]
at org.datanucleus.ExecutionContextThreadedImpl.persistObject(ExecutionContextThreadedImpl.java:217)
~[datanucleus-core-4.1.17.jar:?]
at org.datanucleus.api.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:724)
~[datanucleus-api-jdo-4.2.4.jar:?]
at org.datanucleus.api.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:749)
~[datanucleus-api-jdo-4.2.4.jar:?]
at org.apache.hadoop.hive.metastore.ObjectStore.createTable(ObjectStore.java:1301) ~[hive-exec-3.0.0.jar:3.0.0]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_66]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_66]
at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_66]
at org.apache.hadoop.hive.metastore.RawStoreProxy.invoke(RawStoreProxy.java:97) ~[hive-exec-3.0.0.jar:3.0.0]
at com.sun.proxy.$Proxy36.createTable(Unknown Source) ~[?:?]
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_core(HiveMetaStore.java:1824)
~[hive-exec-3.0.0.jar:3.0.0]
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_core(HiveMetaStore.java:1724)
~[hive-exec-3.0.0.jar:3.0.0]
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_with_environment_context(HiveMetaStore.java:1952)
~[hive-exec-3.0.0.jar:3.0.0]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_66]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_66]
at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_66]
at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invokeInternal(RetryingHMSHandler.java:147)
~[hive-exec-3.0.0.jar:3.0.0]
at org.apache.hadoop.hive.metastore.RetryingHMSHandler.invoke(RetryingHMSHandler.java:108)
~[hive-exec-3.0.0.jar:3.0.0]
at com.sun.proxy.$Proxy38.create_table_with_environment_context(Unknown Source) ~[?:?]
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.create_table_with_environment_context(HiveMetaStoreClient.java:2857)
~[hive-exec-3.0.0.jar:3.0.0]
at org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient.create_table_with_environment_context(SessionHiveMetaStoreClient.java:121)
~[hive-exec-3.0.0.jar:3.0.0]
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable(HiveMetaStoreClient.java:826)
~[hive-exec-3.0.0.jar:3.0.0]
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable(HiveMetaStoreClient.java:811)
~[hive-exec-3.0.0.jar:3.0.0]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_66]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_66]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_66]
at java.lang.reflect.Method.invoke(Method.java:497) ~[?:1.8.0_66]
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.invoke(RetryingMetaStoreClient.java:212)
~[hive-exec-3.0.0.jar:3.0.0]
at com.sun.proxy.$Proxy39.createTable(Unknown Source) ~[?:?]
at org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:926) ~[hive-exec-3.0.0.jar:3.0.0]
... 24 more
{code}

> Table "partition_keys" has been specified with a primary-key to include column "TBL_ID"
> ---------------------------------------------------------------------------------------
>
>                 Key: HIVE-21463
>                 URL: https://issues.apache.org/jira/browse/HIVE-21463
>             Project: Hive
>          Issue Type: Bug
>          Components: Database/Schema
>    Affects Versions: 2.3.4
>            Reporter: yongjian.wu
>            Priority: Major
>
> Hi,when i use the Hive-2.3.4 with the mariadb10.2.14 as the mete data db,i meet the bellow
error message:
> hive> create table jian(ii char(1));
> FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Table
"partition_keys" has been specified with a primary-key to include column "TBL_ID" but this
column is not found in the table. Please check your <primary-key> column specification.)
> and about my mete data db you can see:
> 13:41:25 (root@localhost) [jian]> show create table partition_keys;
> | partition_keys | CREATE TABLE `partition_keys` (
>  `TBL_ID` bigint(20) NOT NULL,
>  `PKEY_COMMENT` varchar(4000) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL,
>  `PKEY_NAME` varchar(128) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
>  `PKEY_TYPE` varchar(767) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL,
>  `INTEGER_IDX` int(11) NOT NULL,
>  PRIMARY KEY (`TBL_ID`,`PKEY_NAME`),
>  KEY `PARTITION_KEYS_N49` (`TBL_ID`),
>  CONSTRAINT `PARTITION_KEYS_FK1` FOREIGN KEY (`TBL_ID`) REFERENCES `tbls` (`TBL_ID`)
> ) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
> when i create a database is can be working bu when create table it is error occur
> hive> create database jiantest;
> OK
> Time taken: 6.783 seconds
> hive> show databases;
> OK
> default
> jiantest
> Time taken: 0.236 seconds, Fetched: 2 row(s)
>  
>  
>  
> this my config file if needed:
> [root@hadoop hive-2.3.4]# cat conf/hive-site.xml 
> <configuration>
>  <property>
>  <name>hive.metastore.local</name>
>  <value>true</value>
>  </property>
>  <property>
>  <name>javax.jdo.option.ConnectionURL</name>
>  <value>jdbc:mysql://172.17.0.5:3306/jian?characterEncoding=latin1</value>
>  </property>
>  <property>
>  <name>javax.jdo.option.ConnectionDriverName</name>
>  <value>org.mariadb.jdbc.Driver</value>
>  <description>mariadb-java-client-2.4.0.jar</description>
>  </property>
>  <property>
>  <name>javax.jdo.option.ConnectionUserName</name>
>  <value>jian</value>
>  </property>
>  <property>
>  <name>javax.jdo.option.ConnectionPassword</name>
>  <value>123456</value>
>  </property>
>  <property>
>  <name>hive.metastore.schema.verification</name>
>  <value>false</value>
>  </property>
>  
> </configuration>
>  
> waiting for you reply,thank you
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message