You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Hankó Gergely (Jira)" <ji...@apache.org> on 2022/03/24 09:20:00 UTC

[jira] [Commented] (HIVE-25041) During "schematool --verbose -dbType derby -initSchema" I'm getting "utocommit on" (with a missing ''a").

    [ https://issues.apache.org/jira/browse/HIVE-25041?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17511715#comment-17511715 ] 

Hankó Gergely commented on HIVE-25041:
--------------------------------------

I wasn't able to reproduce this issue. 

The `!autocommit on` line is prepended by HiveSchemaTool to the content of hive-schema-3.1.0.derby.sql and this script is saved as a tmp file then it is run by Beeline. The first two characters are either chopped at saving or by jline at reading but I couldn't find any clue in code how this could happen. I tried different encodings suspecting that maybe the BOM of UTF-16 can cause such anomaly but it didn't on my system.

If we can't get more information I suggest to close this ticket as "cannot reproduce".

> During "schematool --verbose -dbType derby -initSchema" I'm getting "utocommit on" (with a missing ''a").
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-25041
>                 URL: https://issues.apache.org/jira/browse/HIVE-25041
>             Project: Hive
>          Issue Type: Bug
>          Components: Database/Schema, Hive
>    Affects Versions: 3.1.2
>            Reporter: NOELLE MILTON VEGA
>            Priority: Blocker
>
> 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:
>  
> {noformat}
> hive-schema-3.1.0.derby.sql{noformat}
>  
> From the below, {color:#0747a6}*utocommit on*{color} looks like it should be {color:#0747a6}*autocommit on*{color}.
> {code:java}
> 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 ***{code}
>  
> Versions are:
> {code:java}
> Hive......: v3.1.2
> Hadoop....: v3.3.0{code}
> Any ideas? Thank you.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)