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

During "schematool --verbose -dbType derby -initSchema" I'm getting "utocommit on" (with a missing ''a").

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Not A Bug
    • 3.1.2
    • Not Applicable
    • Database/Schema, Hive
    • None

    Description

      Hello Friends:

      I'm issuing the below command, but am getting the exception shown. This is a pseudo-distributed mode setup of HIVE and HADOOP (simple), so I've edited a tiny few files (just following the vanilla instructions – nothing fancy).

      Yet somewhere it looks like there's a typo, perhaps in this file:

       

      hive-schema-3.1.0.derby.sql

       

      From the below, utocommit on looks like it should be autocommit on.

      jdoe@fedora-33$ ${HIVE_HOME}/bin/schematool --verbose -dbType derby -initSchema
      SLF4J: Class path contains multiple SLF4J bindings.
      SLF4J: Found binding in [jar:file:/opt/hadoop/hadoop.d/share/hadoop/common/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      SLF4J: Found binding in [jar:file:/opt/hadoop/hive.d/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
      SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
      SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
      2021-04-20 21:09:57,605 INFO [main] conf.HiveConf (HiveConf.java:findConfigFile(187)) - Found configuration file file:/opt/hadoop/hive.d/conf/hive-site.xml
      2021-04-20 21:09:58,013 INFO [main] tools.HiveSchemaHelper (HiveSchemaHelper.java:logAndPrintToStdout(117)) - Metastore connection URL: jdbc:derby:;databaseName=metastore_db;create=true
      Metastore connection URL: jdbc:derby:;databaseName=metastore_db;create=true
      2021-04-20 21:09:58,014 INFO [main] tools.HiveSchemaHelper (HiveSchemaHelper.java:logAndPrintToStdout(117)) - Metastore Connection Driver : org.apache.derby.jdbc.EmbeddedDriver
      Metastore Connection Driver : org.apache.derby.jdbc.EmbeddedDriver
      2021-04-20 21:09:58,014 INFO [main] tools.HiveSchemaHelper (HiveSchemaHelper.java:logAndPrintToStdout(117)) - Metastore connection User: APP
      Metastore connection User: APP
      Starting metastore schema initialization to 3.1.0
      Initialization script hive-schema-3.1.0.derby.sql
      Connecting to jdbc:derby:;databaseName=metastore_db;create=true
      Connected to: Apache Derby (version 10.14.1.0 - (1808820))
      Driver: Apache Derby Embedded JDBC Driver (version 10.14.1.0 - (1808820))
      Transaction isolation: TRANSACTION_READ_COMMITTED
      0: jdbc:derby:> utocommit on
      Error: Syntax error: Encountered "utocommit" at line 1, column 1. (state=42X01,code=30000)
      Closing: 0: jdbc:derby:;databaseName=metastore_db;create=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:594)
       at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:567)
       at org.apache.hive.beeline.HiveSchemaTool.main(HiveSchemaTool.java:1517)
       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
       at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.base/java.lang.reflect.Method.invoke(Method.java:566)
       at org.apache.hadoop.util.RunJar.run(RunJar.java:323)
       at org.apache.hadoop.util.RunJar.main(RunJar.java:236)
      Caused by: java.io.IOException: Schema script failed, errorcode 2
       at org.apache.hive.beeline.HiveSchemaTool.runBeeLine(HiveSchemaTool.java:1226)
       at org.apache.hive.beeline.HiveSchemaTool.runBeeLine(HiveSchemaTool.java:1204)
       at org.apache.hive.beeline.HiveSchemaTool.doInit(HiveSchemaTool.java:590)
       ... 8 more
      *** schemaTool failed ***

       

      Versions are:

      Hive......: v3.1.2
      Hadoop....: v3.3.0

      Any ideas? Thank you.

      Attachments

        Activity

          People

            Unassigned Unassigned
            nyceyes NOELLE MILTON VEGA
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: