You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Deepesh Khandelwal (JIRA)" <ji...@apache.org> on 2018/02/06 05:38:00 UTC

[jira] [Assigned] (HIVE-18631) Hive metastore schema initialization failing on mysql

     [ https://issues.apache.org/jira/browse/HIVE-18631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepesh Khandelwal reassigned HIVE-18631:
-----------------------------------------


> Hive metastore schema initialization failing on mysql
> -----------------------------------------------------
>
>                 Key: HIVE-18631
>                 URL: https://issues.apache.org/jira/browse/HIVE-18631
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>    Affects Versions: 3.0.0
>            Reporter: Deepesh Khandelwal
>            Assignee: Deepesh Khandelwal
>            Priority: Blocker
>
> Hive metastore schema on mysql is broken after the commit for HIVE-18546. Following error is seen during schema initialization:
> {noformat}
> 0: jdbc:mysql://localhost.localdomain> CREATE TABLE IF NOT EXISTS `TBLS` 
>  ( `TBL_ID` bigint(20) NOT NULL, `CREATE_TIME` int(11) NOT NULL, `DB_ID` bigint( 
> 20) DEFAULT NULL, `LAST_ACCESS_TIME` int(11) NOT NULL, `OWNER` varchar(767) CHAR 
> ACTER SET latin1 COLLATE latin1_bin DEFAULT NULL, `RETENTION` int(11) NOT NULL,  
> `SD_ID` bigint(20) DEFAULT NULL, `TBL_NAME` varchar(256) CHARACTER SET latin1 CO 
> LLATE latin1_bin DEFAULT NULL, `TBL_TYPE` varchar(128) CHARACTER SET latin1 COLL 
> ATE latin1_bin DEFAULT NULL, `VIEW_EXPANDED_TEXT` mediumtext, `VIEW_ORIGINAL_TEX 
> T` mediumtext, `IS_REWRITE_ENABLED` bit(1) NOT NULL DEFAULT 0 PRIMARY KEY (`TBL_ 
> ID`), UNIQUE KEY `UNIQUETABLE` (`TBL_NAME`,`DB_ID`), KEY `TBLS_N50` (`SD_ID`), K 
> EY `TBLS_N49` (`DB_ID`), CONSTRAINT `TBLS_FK1` FOREIGN KEY (`SD_ID`) REFERENCES  
> `SDS` (`SD_ID`), CONSTRAINT `TBLS_FK2` FOREIGN KEY (`DB_ID`) REFERENCES `DBS` (` 
> DB_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1
> Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(`TBL_ID`), UNIQUE KEY `UNIQUETABLE` (`TBL_NAME`,`DB_ID`), KEY `TBLS_N50` (`SD_I' at line 1 (state=42000,code=1064)
> Closing: 0: jdbc:mysql://localhost.localdomain/hivedb?createDatabaseIfNotExist=true
> org.apache.hadoop.hive.metastore.HiveMetaException: Schema initialization FAILED! Metastore state would be inconsistent !!
> Underlying cause: java.io.IOException : Schema script failed, errorcode 2
> org.apache.hadoop.hive.metastore.HiveMetaException: Schema initialization FAILED! Metastore state would be inconsistent !!
> 	at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:586)
> 	at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:559)
> 	at org.apache.hive.beeline.HiveSchemaTool.main(HiveSchemaTool.java:1183)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:498)
> 	at org.apache.hadoop.util.RunJar.run(RunJar.java:304)
> 	at org.apache.hadoop.util.RunJar.main(RunJar.java:218)
> Caused by: java.io.IOException: Schema script failed, errorcode 2
> 	at org.apache.hive.beeline.HiveSchemaTool.runBeeLine(HiveSchemaTool.java:957)
> 	at org.apache.hive.beeline.HiveSchemaTool.runBeeLine(HiveSchemaTool.java:935)
> 	at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:582)
> 	... 8 more
> *** schemaTool failed ***{noformat}
> In the file metastore/scripts/upgrade/mysql/hive-schema-3.0.0.mysql.sql one of the column definitions in the `TBLS` table is missing a comma at the end
> {code:java}
> `IS_REWRITE_ENABLED` bit(1) NOT NULL DEFAULT 0{code}



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