Upgrade FAILED! Metastore state would be inconsistent

77 Views Asked by At

I reinstalled Hive from 2.3.0 to the 3.1.0 version. So, when I was upgrading meta store (I use MySQL for Hive), I have the error below:

hduser@master:/usr/local/hive$ schematool -dbType mysql -upgradeSchemaFrom 2.3.0
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/hive/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/hadoop/share/hadoop/common/lib/slf4j-log4j12-1.7.25.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.apache.logging.slf4j.Log4jLoggerFactory]
Metastore connection URL:    jdbc:mysql://10.0.2.195/hivedb
Metastore Connection Driver :    com.mysql.jdbc.Driver
Metastore connection User:   hivedb_user
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
Starting upgrade metastore schema from version 2.3.0 to 3.1.0
Upgrade script upgrade-2.3.0-to-3.0.0.mysql.sql


java.lang.NullPointerException
org.apache.hadoop.hive.metastore.HiveMetaException: Upgrade FAILED! Metastore state would be inconsistent !!
Underlying cause: java.io.IOException : Schema script failed, errorcode 2
Use --verbose for detailed stacktrace.

I searched for the solution but none of them is works Could you help me, please?

0

There are 0 best solutions below