hive初始化报错:.HiveMetaException: Schema initialization FAILED! Metastore state would be inconsistent !!

报错信息和截图:

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 !!

hive初始化报错:.HiveMetaException: Schema initialization FAILED! Metastore state would be inconsistent !!_第1张图片

解决方法:

进入mysql删除hive数据库:drop database hive;

hive初始化报错:.HiveMetaException: Schema initialization FAILED! Metastore state would be inconsistent !!_第2张图片

再重新执行初始化代码就成功了

schematool -dbType mysql -initSchema --verbose

hive初始化报错:.HiveMetaException: Schema initialization FAILED! Metastore state would be inconsistent !!_第3张图片

你可能感兴趣的:(报错问题,hadoop,hive,apache)