Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-13784

Hive Metastore start failed on Oracle DB

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 2.1.0
    • 2.1.0
    • Metastore
    • None

    Description

      NO PRECOMMIT TESTS

      During hive metastore start, hive is trying to execute this script hive-schema-2.1.0.oracle.sql:

      Metastore connection URL:	 jdbc:oracle:thin:@//172.22.114.220:1521/XE
      Metastore Connection Driver :	 oracle.jdbc.driver.OracleDriver
      Metastore connection User:	 hiveuser
      Starting metastore schema initialization to 2.1.0
      Initialization script hive-schema-2.1.0.oracle.sql
      Connecting to jdbc:oracle:thin:@//172.22.114.220: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.2.0)
      Transaction isolation: TRANSACTION_READ_COMMITTED
      0: jdbc:oracle:thin:@//172.22.114.220:1521/XE> !autocommit on
      Autocommit status: true
      0: jdbc:oracle:thin:@//172.22.114.220:1521/XE> CREATE TABLE SEQUENCE_TABLE ( SEQ 
      UENCE_NAME VARCHAR2(255) NOT NULL, NEXT_VAL NUMBER NOT NULL )
      No rows affected (0.208 seconds)
      ......................................................
      

      but inthe end of this script we are getting Error:

      0: jdbc:oracle:thin:@//172.22.114.220:1521/XE> CREATE INDEX CONSTRAINTS_PARENT_T 
      BL_ID_INDEX ON KEY_CONSTRAINTS(PARENT_TBL_ID)
      Error: ORA-00972: identifier is too long (state=42000,code=972)
      
      Closing: 0: jdbc:oracle:thin:@//172.22.114.220:1521/XE
      org.apache.hadoop.hive.metastore.HiveMetaException: Schema initialization FAILED! Metastore state would be inconsistent !!
      org.apache.hadoop.hive.metastore.HiveMetaException: Schema initialization FAILED! Metastore state would be inconsistent !!
      	at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:291)
      	at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:264)
      	at org.apache.hive.beeline.HiveSchemaTool.main(HiveSchemaTool.java:505)
      	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.doInit(HiveSchemaTool.java:287)
      	... 8 more
      *** schemaTool failed ***
      

      We have a problem with too long identifier: CONSTRAINTS_PARENT_TBL_ID_INDEX (31 symbol), it should be 30 symbols of max length.

      Attachments

        1. HIVE-13784.1.patch
          1 kB
          Hari Sankar Sivarama Subramaniyan

        Activity

          People

            hsubramaniyan Hari Sankar Sivarama Subramaniyan
            hsubramaniyan Hari Sankar Sivarama Subramaniyan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: