You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "yongjian.wu (JIRA)" <ji...@apache.org> on 2019/03/18 05:45:00 UTC
[jira] [Created] (HIVE-21463) Table "partition_keys" has been
specified with a primary-key to include column "TBL_ID"
yongjian.wu created HIVE-21463:
----------------------------------
Summary: 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
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)