You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Sushanth Sowmyan (JIRA)" <ji...@apache.org> on 2015/05/07 21:09:59 UTC

[jira] [Resolved] (HIVE-10614) schemaTool upgrade from 0.14.0 to 1.3.0 causes failure

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

Sushanth Sowmyan resolved HIVE-10614.
-------------------------------------
    Resolution: Fixed

Addendum committed on branch-1.2 and master.

> schemaTool upgrade from 0.14.0 to 1.3.0 causes failure
> ------------------------------------------------------
>
>                 Key: HIVE-10614
>                 URL: https://issues.apache.org/jira/browse/HIVE-10614
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>            Reporter: Hari Sankar Sivarama Subramaniyan
>            Assignee: Hari Sankar Sivarama Subramaniyan
>            Priority: Critical
>             Fix For: 1.2.0
>
>         Attachments: HIVE-10614.1-branch-0.12.patch, HIVE-10614.1.patch, HIVE-10614.2.addendum-branch-1.2.patch, HIVE-10614.2.addendum.patch
>
>
> ./schematool -dbType mysql -upgradeSchemaFrom 0.14.0 -verbose
> {code}
> +----------------------------------------------------------------------------------------------------------------+--+
> |                                                                                                                |
> +----------------------------------------------------------------------------------------------------------------+--+
> | < HIVE-7018 Remove Table and Partition tables column LINK_TARGET_ID from Mysql for other DBs do not have it >  |
> +----------------------------------------------------------------------------------------------------------------+--+
> 1 row selected (0.004 seconds)
> 0: jdbc:mysql://node-1.example.com/hive> DROP PROCEDURE IF EXISTS RM_TLBS_LINKID
> No rows affected (0.005 seconds)
> 0: jdbc:mysql://node-1.example.com/hive> DROP PROCEDURE IF EXISTS RM_PARTITIONS_LINKID
> No rows affected (0.006 seconds)
> 0: jdbc:mysql://node-1.example.com/hive> DROP PROCEDURE IF EXISTS RM_LINKID
> No rows affected (0.002 seconds)
> 0: jdbc:mysql://node-1.example.com/hive> CREATE PROCEDURE RM_TLBS_LINKID() BEGIN IF EXISTS (SELECT * FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_NAME` = 'TBLS' AND `COLUMN_NAME` = 'LINK_TARGET_ID') THEN ALTER TABLE `TBLS` DROP FOREIGN KEY `TBLS_FK3` ; ALTER TABLE `TBLS` DROP KEY `TBLS_N51` ; ALTER TABLE `TBLS` DROP COLUMN `LINK_TARGET_ID` ; END IF; END
> 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 '' at line 1 (state=42000,code=1064)
> Closing: 0: jdbc:mysql://node-1.example.com/hive?createDatabaseIfNotExist=true
> org.apache.hadoop.hive.metastore.HiveMetaException: Upgrade FAILED! Metastore state would be inconsistent !!
> org.apache.hadoop.hive.metastore.HiveMetaException: Upgrade FAILED! Metastore state would be inconsistent !!
> 	at org.apache.hive.beeline.HiveSchemaTool.doUpgrade(HiveSchemaTool.java:229)
> 	at org.apache.hive.beeline.HiveSchemaTool.main(HiveSchemaTool.java:468)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
> 	at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
> Caused by: java.io.IOException: Schema script failed, errorcode 2
> 	at org.apache.hive.beeline.HiveSchemaTool.runBeeLine(HiveSchemaTool.java:355)
> 	at org.apache.hive.beeline.HiveSchemaTool.runBeeLine(HiveSchemaTool.java:326)
> 	at org.apache.hive.beeline.HiveSchemaTool.doUpgrade(HiveSchemaTool.java:224)
> {code}
> Looks like HIVE-7018 has introduced stored procedure as part of mysql upgrade script and it is causing issues with schematool upgrade.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)