hadoop hive show databases报错

419 阅读1分钟

hive> show databases;

报错信息如下:

hive>Caught exception attempting to write metadata call information 
org.apache.hadoop.hive.ql.metadata.HiveException: 
java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient

解决方法:元数据出现问题,需要初始化hadoop元数据

输入命令:schematool -dbType mysql -initSchema就行了