Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
NO PRECOMMIT TESTS
The underlying failure seems to be visible from --verbose :
Metastore connection URL: jdbc:oracle:thin:@//aaa:bb:cc:dd:1521/XE Metastore Connection Driver : oracle.jdbc.driver.OracleDriver Metastore connection User: hiveuser Starting upgrade metastore schema from version 2.0.0 to 2.1.0 Upgrade script upgrade-2.0.0-to-2.1.0.oracle.sql Connecting to jdbc:oracle:thin:@//aaa:bb:cc:dd:1521/XE Connected to: Oracle (version Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production) Driver: Oracle JDBC driver (version 11.2.0.4.0) Transaction isolation: TRANSACTION_READ_COMMITTED 0: jdbc:oracle:thin:@//aaa:bb:cc:dd:1521/XE> !autocommit on Autocommit status: true 0: jdbc:oracle:thin:@//aaa:bb:cc:dd:1521/XE> SELECT 'Upgrading MetaStore schema from 2.0.0 to 2.1.0' AS Status from dual +-------------------------------------------------+--+ | STATUS | +-------------------------------------------------+--+ | Upgrading MetaStore schema from 2.0.0 to 2.1.0 | +-------------------------------------------------+--+ 1 row selected (0.072 seconds) 0: jdbc:oracle:thin:@//aaa:bb:cc:dd:1521/XE> CREATE TABLE IF NOT EXISTS KEY_CONSTRAINTS ( CHILD_CD_ID NUMBER, CHILD_INTEGER_IDX NUMBER, CHILD_TBL_ID NUMBER, PARENT_CD_ID NUMBER NOT NULL, PARENT_INTEGER_IDX ^M NUMBER NOT NULL, PARENT_TBL_ID NUMBER NOT NULL, POSITION NUMBER NOT NULL, CONSTRAINT_NAME VARCHAR(400) NOT NULL, CONSTRAINT_TYPE NUMBER NOT NULL, UPDATE_RULE NUMBER, DELETE_RULE NUMBER, ENABLE_VALIDATE_REL ^MY NUMBER NOT NULL ) Error: ORA-00922: missing or invalid option (state=42000,code=922) Closing: 0: jdbc:oracle:thin:@//aaa:bb:cc:dd:1521/XE org.apache.hadoop.hive.metastore.HiveMetaException: Upgrade FAILED! Metastore state would be inconsistent !! Underlying cause: java.io.IOException : Schema script failed, errorcode 2 org.apache.hadoop.hive.metastore.HiveMetaException: Upgrade FAILED! Metastore state would be inconsistent !! at org.apache.hive.beeline.HiveSchemaTool.doUpgrade(HiveSchemaTool.java:250) at org.apache.hive.beeline.HiveSchemaTool.doUpgrade(HiveSchemaTool.java:218) at org.apache.hive.beeline.HiveSchemaTool.main(HiveSchemaTool.java:500) 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:390) at org.apache.hive.beeline.HiveSchemaTool.runBeeLine(HiveSchemaTool.java:347) at org.apache.hive.beeline.HiveSchemaTool.doUpgrade(HiveSchemaTool.java:245) ... 8 more *** schemaTool failed ***
At the face of it, it looks like issue from the actual script ( 034-HIVE-13076.oracle.sql ) that's provided:
CREATE TABLE IF NOT EXISTS KEY_CONSTRAINTS ( CHILD_CD_ID NUMBER, CHILD_INTEGER_IDX NUMBER, CHILD_TBL_ID NUMBER, PARENT_CD_ID NUMBER NOT NULL, PARENT_INTEGER_IDX NUMBER NOT NULL, PARENT_TBL_ID NUMBER NOT NULL, POSITION NUMBER NOT NULL, CONSTRAINT_NAME VARCHAR(400) NOT NULL, CONSTRAINT_TYPE NUMBER NOT NULL, UPDATE_RULE NUMBER, DELETE_RULE NUMBER, ENABLE_VALIDATE_RELY NUMBER NOT NULL ) ; ALTER TABLE KEY_CONSTRAINTS ADD CONSTRAINT CONSTRAINTS_PK PRIMARY KEY (CONSTRAINT_NAME, POSITION); CREATE INDEX CONSTRAINTS_PT_INDEX ON KEY_CONSTRAINTS(PARENT_TBL_ID);